We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22448
    • 241 Posts
    Hi Goldsky,

    just a quick update and a question.

    I got Scrollable component to work using custom gallery and thumbnail templates. Here’s my snippet call:

    [!easy2? &gid=`[*articleGallery*]` &ecm=`0` &pagination=`0` &crumbs=`0` &tpl=`assets/chunks/easy2gallery/gallery.tpl` &thumb_tpl=`assets/chunks/easy2gallery/thumbnail.tpl` &glib=`scrollable+prettyPhoto` !]


    Scrollable is a part of the jQuery Tools library that i prefer to jQuery UI. Scrollable creates a dynamic strip of content that can be scrolled horizontally across multiple content "pages", which allows to solve the pagination issue i discussed previously. Now the url of the page doesn’t change as a user paginates through the content of the gallery.

    The second step was to integrate prettyPhoto media box which was very easy using a custom Viewer.
    Now to the question. As instructed i added rel="prettyPhoto[[+easy2:show_group+]]" to the viewer’s link attribute field. The only problem is that [+easy2:show_group+] does not insert any value into the page. How is show_group placeholder populated? Is the value coming from the gallery definition or should it be added through the snippet call?

    Thanks.

      • 11055 ☆ A M B ☆
      • 3,112 Posts
      do you mind to attach the js here?
        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.
        • 22448
        • 241 Posts
        Sorry for the belated reply. I missed your message somehow. My code is below.
        I also came across another issue that i’m trying to resolve now. If i add a name to an image in the easy2gallery backend it stops being included in the displayed gallery. When i remove the Name value the image appears in the gallery.
        Here’s the example in action http://www.smart-space.co.uk/building-installations/production-space.html.


        Gallery call:
        <div id="gallery-frame" class="clearfix">
        [*imageGallery:is=`0`:then=``:else=`[!easy2? &gid=`[*imageGallery*]` &ecm=`0` &pagination=`0` &crumbs=`0` &tpl=`assets/chunks/easy2gallery/gallery_tpl.chk` &thumb_tpl=`assets/chunks/easy2gallery/thumbnail_tpl.chk` &glib=`scrollable+prettyPhoto` !]`*]
        </div>


        Template code in gallery_tpl.chk:
        <div class="e2g_wrapper" id="[+easy2:wrapper+]_[+easy2:sid+]">
            <!-- "previous page" action -->
        	<a class="prevPage browse left"></a>
            <!-- root element for scrollable -->
            <div class="scrollable thumbs" id="e2g_gallery_[+easy2:sid+]">
                [+easy2:content+]
            </div>
            <!-- "next page" action -->
        	<a class="nextPage browse right"></a>
            <br clear="all" />
        </div>


        Thumb code:
        <div class="thumb">
            [+easy2:thumbplugin+]
        	<a href="[+easy2:link+]" title="[+easy2:summary+]" [+easy2:glibact+]>
        		<img src="[+easy2:src+]" alt="[+easy2:title+]" width="[+easy2:w+]" height="[+easy2:h+]" />
                </a>
        </div>


        Code to initialize scrollable and PrettyPhoto light box. Instead of inserting it through easy2gallery ui i have a single config.js file that initializes all of my javascript components if they exist on the page. Note that the latest version of scrollable was not as good as the one in JQuery Tools version 1.1.2. So i’m still using the older version.

        	// ********** initialize thumb gallery ******
        	if ($('div.scrollable.thumbs').length > 0) {
        		
        		$('div.scrollable.thumbs').scrollable( {
        			size : 5,
        			easing : "swing",
        			loop : false,
        			speed : 600, 
        			clickable: false
        		});
        	}
        
        	// ********** initialize Pretty Photo lightbox ******
        	if ($("a[rel^='prettyPhoto']").length > 0) {
        
        			$("a[rel^='prettyPhoto']").prettyPhoto({
        				overlay_gallery: false	
        			});
        		
        		}


        And finally thumb link attribute:
        rel="prettyPhoto[show]"




          • 11055 ☆ A M B ☆
          • 3,112 Posts
          aren’t you interested to upgrade to RC4 ?
            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.
            • 22448
            • 241 Posts
            For sure. Didn’t realize it was available.
            Thanks.
              • 14651
              • 46 Posts
              Здравствуйте! Проблема с кэшем. После установления галлереи, стало быстро расти колличество файлов на ftp. Оказалось что из 3-х галлерей Easy2 генерирует около 30 000 эскизов за 2-3 дня, фотографий в галлереях не более 150, как исправить ошибку?

              Еще, на каждой странице портала выводится 3 случайных фото из этих альбомов, может он для каждой старницы формирует отдельные эскизы?

              modx 1.0.6

              Сайт www.nikopol.me/photo [ed. note: jonick last edited this post 14 years, 3 months ago.]
                не просто дизайнеру копаться в скриптах...спасибо за понимание
                • 11055 ☆ A M B ☆
                • 3,112 Posts
                are you using this version?
                  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.
                  • 14651
                  • 46 Posts
                  Oh, sorry 1.4.10-rc4
                  Как решить проблему?
                    не просто дизайнеру копаться в скриптах...спасибо за понимание
                    • 11055 ☆ A M B ☆
                    • 3,112 Posts
                    you can PM me your access, I'll check it from manager.
                    this is my skype: liatmatasaya
                      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.