We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    This is an auto-generated topic for <a href="http://modxcms.com/extras/package/535">autoGallery 2.0-0</a> by ramsay.

    Brief Description:
    Created to produce simple cropped galleries from folders of uploaded images, autoGallery will automatically generate thumbnails from a folder full of images. Since it uses MODx chunks for display it is easy to integrate with any funky image gallery display utility (thickbox, lightbox etc) using the chunk.

    Version 2.0 now has special handling for .flv and .mp3 files. You can designate a different chunk to be used for these, so they can play in a player when selected from the gallery. You can create a thumbnail for them by simply including an image names filename.flv.jpg (where filename.flv is the video file).
      • 9714
      • 38 Posts
      Hello,

      I need some help with AutoGallery 2.0.
      I would like to select the path were to grab a directory full of images but not using the document id as the folder name.

      Example:
      images/directory/directory/directory/directory/screenshots

      Were the "screenshots" directory would be the 114 in your example.

      I realize that you can use the "basepath" & "gallery" feature but then you can’t remove the document id, or am I doing something wrong?


      Any help would be great,
      -FireDart


      ---

      Well got the above working as it says it’s grabbing the images from a directory but I get this error:
      Fatal error: Cannot redeclare dbinit() (previously declared in /home/content/##/########/html/assets/snippets/AutoGallery.inc.php:14) in /home/content/##/########/html/assets/snippets/AutoGallery.inc.php on line 30

      The "##/########" is my account number. Don’t really know if someone can do something with it....


      Any help would be great,
      -FireDart
        -FireDart
        • 9714
        • 38 Posts
        I still need help, can anyone help me?

        Here is were am at:

        It says to create the following tables in MySql if they don’t exist, but it seems to be calling a variable 2 times called "$dbrows" which is messing up the code:
        function dbInit() {
          global $dbrows;
          $dbrows = Array();
        
          mysql_query("CREATE TABLE IF NOT EXISTS `modx_gallery_info` (
          `gallery` varchar(255) NOT NULL,
          `entity` varchar(255) NOT NULL,
          `title` varchar(1024) NOT NULL,
          `description` varchar(10240) NOT NULL,
          PRIMARY KEY  (`gallery`,`entity`)
        ) ENGINE=MyISAM DEFAULT CHARSET=latin1;");
        
          $result = mysql_query('SELECT * FROM modx_gallery_info');
          while($row = mysql_fetch_assoc($result)) {
            $dbrows[$row['entity']] = $row;
          }
        
        }
        


        Is it bad coding on the coders part or am I just missing something? and could I just manually putting in the MySql code and that would fix it?

        Am still learning PHP & MySql so if am wrong sorry,
        -FireDart
          -FireDart
          • 24449
          • 81 Posts
          Sorry, I’ve only just found this thread during a random search for the keyword AutoGallery.

          Did this issue get resolved? Yes, the DB code is a bit odd and needs cleaning up but it has worked so far for most people.

          Most of the AG forum action is over at http://modxcms.com/forums/index.php/topic,39083.120.html


          Ramsay