We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • This is a manual topic for Easy 2 Gallery 1.4.7-pl by goldsky.

    Changelogs
    ***************** 1.4.7 ******************
    Fixes:
    + Bugfixed the sibling infos for prev up next navigation
    + Updated the slideshow’s limit to be able to use the Template Variable
    + Bugfixed the config file checker
    + Bugfixed the language’s multibyte string

    Brief Description:

    See the HELP tab inside the module for the complete instruction.

    Module Features:
    * Creation and editing of folders with unlimited nesting capabilities
    * Image or zip package uploading via POST method.
    * Synchronization of gallery with files and folders uploaded via FTP.
    * Editing of image info
    * Comments moderation.

    Snippet features:

    * Image viewing.
    * Comments viewing and adding
    * High customisation capabilities with templates and placeholders.
    * Breadcrumbs
    * Pagination
    * Integrated javascript display modes:
    o - colorbox
    o - highslide
    o - fancybox
    o - shadowbox
    o - slimbox
    o - lightwindow
    READ their licenses for a commercial usage.
    * Possible to display random image or single image
    * Possible to sort pictures and folders
    * Slideshows:
    o - Simple
    o - Galleriffic
    o - SmoothGallery
    o - GalleryView
    o - ContentFlow
    READ their licenses for a commercial usage.

    Wiki: http://wiki.modxcms.com/index.php/Easy2gallery

    Installation Instructions

    1. Unpack archive in root folder of you modx installation
    2. If this is your fresh installation: create a new folder ’gallery’, the default path is assets/images/gallery.
    You can change this from the default.config.easy2gallery.php (fresh installation) from this value:

    ’dir’ => ’assets/images/gallery/’,
    If this is an upgrade, this module will use the existing config.easy2gallery.php values, if any.
    3. Create new module, name it anything (Eg: Easy 2 Gallery), type:
    <?php
    $o = include_once(MODX_BASE_PATH.'assets/modules/easy2/index.php');
    return $o;
    

    , click save.
    4. Refresh modx manager, then open the module tab.
    5. Install following instructions.
    6. If install is successful, remove install folder, manually or by clicking delete button. module won’t work if this folder exists.

    Upgrade

    1. Unpack archive in root folder of you modx installation
    2. If there is one (upgrade from below of E2G 1.4.0-rc4), COPY your existing

    config.easy2gallery.php
    file to

    assets/modules/easy2/includes/configs/
    folder.
    2. Open the module tab, upgrade following instructions
    3. If upgrade is successful, remove install folder, manually or by clicking delete button. module won’t work if this folder exists.
    4. Edit ALL of your viewers, change the folder directives.
    eg: assets/libs/highslide => assets/libs/viewers/highslide
    5. CLEAR MODX CACHE
      Rico
      Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
      MODx is great, but knowing how to use it well makes it perfect!

      www.virtudraft.com

      Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

      Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

      Maintainter/contributor of Babel

      Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
      • 11798
      • 43 Posts
      Many thanks for this wonderful module, Goldsky!

      I just tried it and it works perfectly! smiley

      Nevertheless I have a tiny request here: Would it be possible to put a link on each of the slideshow pictures, instead of linking it to the next following picture?
      If that would work, you could put a slideshow on your website - for example to display products - and link it to the appropriate landing page.

      Sorry for this question, if it already works. I did not find this function inside the documentation.

      Many thanks in advance and
      best regards
        • 34895
        • 1 Posts
        how can i use it with modx 2.1.2?
        • Quote from: Hardoman at Jul 21, 2011, 12:48 PM

          Nevertheless I have a tiny request here: Would it be possible to put a link on each of the slideshow pictures, instead of linking it to the next following picture?
          If that would work, you could put a slideshow on your website - for example to display products - and link it to the appropriate landing page.
          Yes you can.
          There is a redirect link field on the detail info of each file.

          The trick is on your slideshow’s index file.
          Let say we duplicate the smoothgallery’s as smoothgallery2.php, you need to add this parameter to your snippet call:
          &ss_indexfile=`the_path_to_smoothgallery2.php`
          change this part:
          <?php //highlighting
          
              // ------------- start the images looping ------------- //
              for ($i = 0; $i < $ssFiles['count']; $i++) {
                  $output .= '
              <div class="imageElement">
                  <h3>' . $ssFiles['title'][$i] . '</h3>
                  <p>' . $ssFiles['description'][$i] . '</p>
                  <a href="'
                          // making flexible FURL or not
                          . $modx->makeUrl(
                                  $modx->documentIdentifier
                                  , $modx->aliases
                                  , 'sid=' . $ssParams['sid']
                                  . '&fid=' . $ssFiles['id'][$i]
                          )
                          . '#' . $ssParams['sid'] . '_' . $ssFiles['id'][$i] . '"'
                          . ' title="open image" class="open"></a>
                  <img src="' . $ssFiles['resizedimg'][$i] . '" class="full" alt="" />
                  <img src="' . $ssFiles['thumbsrc'][$i] . '" class="thumbnail" alt="" />
              </div>';
              }
              // ------------- end the images looping ------------- //
          


          to be like this:
          <?php //highlighting
          
              // ------------- start the images looping ------------- //
              for ($i = 0; $i < $ssFiles['count']; $i++) {
                  if (!empty($ssFiles['redirect_link'][$i])) {
                      $redirectLink = $modx->makeUrl($ssFiles['redirect_link'][$i]); // <-- here is the redirect link
                      $title = $ssFiles['summary'][$i]; // <-- here is the hover thing
                  } else {
                      $redirectLink = $modx->makeUrl(
                                      $modx->documentIdentifier
                                      , $modx->aliases
                                      , 'sid=' . $ssParams['sid']
                                      . '&fid=' . $ssFiles['id'][$i]
                              )
                              . '#' . $ssParams['sid'] . '_' . $ssFiles['id'][$i];
                      $title = 'open image';
                  }
                  $output .= '
              <div class="imageElement">
                  <h3>' . $ssFiles['title'][$i] . '</h3>
                  <p>' . $ssFiles['description'][$i] . '</p>
                  <a href="'
                          // making flexible FURL or not
                          . $redirectLink
                          . '" title="' . $title . '" class="open"></a>
                  <img src="' . $ssFiles['resizedimg'][$i] . '" class="full" alt="" />
                  <img src="' . $ssFiles['thumbsrc'][$i] . '" class="thumbnail" alt="" />
              </div>';
              }
              // ------------- end the images looping ------------- //
          
            Rico
            Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
            MODx is great, but knowing how to use it well makes it perfect!

            www.virtudraft.com

            Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

            Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

            Maintainter/contributor of Babel

            Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
          • Quote from: Fukurokudzu at Jul 21, 2011, 05:11 PM

            how can i use it with modx 2.1.2?
            you can not.
            this is for evo only. smiley
              Rico
              Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
              MODx is great, but knowing how to use it well makes it perfect!

              www.virtudraft.com

              Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

              Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

              Maintainter/contributor of Babel

              Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
              • 36689
              • 0 Posts
              Hi goldsky
              I’m trying to edit the js call for fancybox and I can’t find the right file to edit.
              Can you please point me in the right direction?
              thanks
              Nir
              • Menu > Viewer > click the fancybox link, to edit its headers.
                  Rico
                  Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                  MODx is great, but knowing how to use it well makes it perfect!

                  www.virtudraft.com

                  Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                  Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                  Maintainter/contributor of Babel

                  Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.
                  • 36689
                  • 0 Posts
                  Thanks mate!
                    • 11798
                    • 43 Posts
                    Quote from: goldsky at Jul 22, 2011, 12:28 PM


                    Yes you can.
                    There is a redirect link field on the detail info of each file.


                    Thanks for your quick reply and instructions, Goldsky. It is working! laugh

                    Best regards!
                      • 15001
                      • 697 Posts
                      Hi goldsky,

                      I see that for each picture the thumbnails are created several times and suffixed with something like "_id17_sid0_137x77.jpg".

                      Is there a reason for this, or can I safely remove suffixes in thumbnail names to make these named like the main pictures?

                      I have on the pages three calls to the e2g snippet, which are pointing to different galleries.
                      Those snippets return the picture names as values of hidden input fields.
                      One of the pictures is then loaded and displayed as background (using the supersized jQuery plugin).

                      Because the picture is quite large and requires time to load, I would like to set the thumbnail as "lowsrc" or equivalent whilst the main picture is loaded. For this reason my interest in making the thumbnail names same as those of the main pictures.

                      I don't need the advanced features like comments, a.s.o.

                      Thank you for your answer.

                      N.B. In e2g.snippet.class we find:
                               * Use document ID and session ID to separate between different snippet calls
                               * on the same/different page(s) with different settings
                               * but unfortunately with the same dimension.
                               */
                              $e2g_static_instances = $this->e2gsnip_cfg['e2g_static_instances'];
                              $docid = $modx->documentIdentifier;
                              $thumb_path = '_thumbnails/' . substr($path, 0, strrpos($path, '.')) . '_id' . $docid . '_sid' . $e2g_static_instances . '_' . $w . 'x' . $h . '.jpg';