We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10190
    • 187 Posts
    Quote from: Frisco at Jan 31, 2006, 08:03 AM

    is there a possibility to upload more then one image at the same time, i.e. a zipfile containing more then one photo? Another possibility would be to put the pics via ftp on the server and tell epg2 where to look.
    ...

    As I know a little bit PHP and as I like modx, I thought to contribute and provide a patch for EPG2. Digging into it I found that the pictures are stored in the database, table EPG2_pictures, fields pic_thumb and pic_large.

    Knowing not much about picture galleries, the one thing I know is that I was always told to never store binaries in the database itself but in the filesystem. The database should contain references to the filesystem then. Has that changed? Big systems like ezpublish do it that way (references to the filesystem I mean).

    Don’t get me wrong, I like what I’ve seen so far, but before investing time in coding I wanted to get that clear to me.

    Frisco
      • 32241
      • 1,495 Posts
      It’s all depends on preference and the requirement of the system. Some people like to have everything being stored on database. But my own preference will be to have the file stored in file system though, so whichever it is, it will work for me.

      FYI, MySql using file system to store its data, just like access. Correct me if I’m wrong. But MySql has a better engine to manage the whole thing just like a big database server out there.
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Unless it’s changed from when I got certified, Access stores all information in one big file, with the option of breaking it into two files, one for metadata and the other for all data. So that file just keeps getting bigger and bigger. All other databases store their data in many files, each table in a separate file.

        There is a very interesting data storage engine called /rdb http://www.rdb.com/ that stores the data as plain-text (or optionally encrypted) files, and uses a set of Unix shell scripts as an engine. Very fast, very clean, and you can access your data any way you please. Their white-paper, The UNIX Shell as a 4GL (fourth-generation language) is a fascinating read on both file system manipulation and relational database functionality.

          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 10190
          • 187 Posts
          Quote from: Frisco at Feb 06, 2006, 08:11 AM

          Quote from: Frisco at Jan 31, 2006, 08:03 AM

          is there a possibility to upload more then one image at the same time, i.e. a zipfile containing more then one photo? Another possibility would be to put the pics via ftp on the server and tell epg2 where to look.
          ...

          As I know a little bit PHP and as I like modx, I thought to contribute and provide a patch for EPG2. ...

          Well, I’ve done it so far - one can put images via FTP on the server where modx is installed and EPG2 stores them all in one loop. No need to upload one by one. This was very important to me, as I have to build a website with some hundred pictures in the galleries.

          Just copy the content of module.epg2.tpl in the textarea of the gallerie module (not the snippet!) and copy style.css over assets/modules/epg2/style.css and you’re done.

          You will recognize a new field called "Upload dir" when inserting a new picture. It expects a path like /assets/galleries/ftp (no slash at the end, provide the correct access rights to the ftp dir) with the images inside it. Each image will than be processed and stored in the database as it would be if you used the upload field "Image file". The images remain there, they are not automatically removed.

          @Nick and Raymond:
          May changes are marked with frisco, just search for it. Basically I changed module.epg2.tpl at three points:

          1. function EPG2_form_p_create: added input field for ftp dir
          2. function EPG2_p_create: look if ftp_upload is set, if so, process all files inside via getpictures
          3. function getpictures(): new optional parameter pic_name, if ftp_upload is set take the image from pic_name instead of the uploaded file

          Any feedback is greatly appreciated!
            • 8471
            • 333 Posts
            Thanks Frisco! For me the new module works great smiley
              Sorry for my bad English grin
              • 6726
              • 7,075 Posts
              Quote from: Mark at Feb 05, 2006, 05:39 PM

              Here is a nice, nearly finished CSS theme for EPG2.0 to match the MODx Manager Theme. There are no changes to the php code whatso-ever.

              Forgot : it should be included in the distribution on top of the thread !
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l'outil id
                • 21595
                • 159 Posts
                It works goor for me ! Thanks
                  • 10190
                  • 187 Posts
                  Nice. If it works for everybody, maybe it could be included at the top of page one as well?

                  Frisco
                    • 18397
                    • 3,250 Posts
                    Quote from: davidm at Feb 15, 2006, 02:59 AM

                    Quote from: Mark at Feb 05, 2006, 05:39 PM

                    Here is a nice, nearly finished CSS theme for EPG2.0 to match the MODx Manager Theme. There are no changes to the php code whatso-ever.

                    Forgot : it should be included in the distribution on top of the thread !


                    That might not be a good idea considering the theme only works properly in Firefox...
                      • 21595
                      • 159 Posts
                      is somebody there who could implement lightbox jS on this gallery with chunk and snippet
                      i think a large piece of work is done there but i m not a coder

                      implementation/ http://og5.net/index.php?Blog=wusch&bid=894
                      demo http://og5.net/imageBox/
                      Thanks