We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11055 ☆ A M B ☆
    • 3,112 Posts
    you should add a custom javascript code for that.
    have you done it?
      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.
      • 18913
      • 654 Posts
      I was trying to change the <a> tag to something like
        <a href="#" onClick="window.open('e2g_src_placeholder','e2g_title_placeholder','width=some_width,height=some_height')></a>
      

      as per a forum question on the original SmoothGallery site. I thought I might be able to do this with a chunk and the &tpl parameter. But that didn’t work. Then I thought that specifying the glib parameter might take care of it. Finally, I figured that I might be overlooking the use of the landingpage parameter - or just missing something else.

      Do I need to copy the smoothgallery slideshow and dig into it’s code? Is there a different to specify the use of one of the popup libraries?

      Thanks in advance and apologies if I’ve missed a discussion on this.
      Matt
        • 11055 ☆ A M B ☆
        • 3,112 Posts
        I guess you must edit the smoothgallery’s index file, and add these:
        <?php
        
        $modx->regClientCSS(MODX_BASE_URL . 'assets/libs/viewers/colorbox/colorbox.css');
        $modx->regClientStartupScript(MODX_BASE_URL . 'assets/libs/jquery/jquery-1.4.2.min.js');
        $modx->regClientStartupScript(MODX_BASE_URL . 'assets/libs/viewers/colorbox/jquery.colorbox-min.js');
        $modx->regClientStartupScript(MODX_BASE_URL . 'assets/libs/viewers/colorbox/e2g.colorbox.js');
        


        When you use the Javascript function, you should call their files first, right?
          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.
          • 18913
          • 654 Posts
          Yes, I’m doing that. But I can’t seem to figure out how to combine the code needed for a popup with the slideshow code...
          Matt
            • 25058
            • 11 Posts
            Hello

            Help correct the errors Easy 2 Gallery 1.4.0-RC-4
            First, do not show any one slide, but after the substitution of the parameter & ss_allowedratio = `all` things working, but the slideshow is displayed for debugging the page in firebug firefox writes an error

            jQuery is not defined
            <script type="text/javascript"> jQuery.noConflict ();</ script>

            In the browser, IE 8 debugger writes
            ’jQuery’ - a definition
            and also stops at the line
            <script type="text/javascript"> jQuery.noConflict ();</ script>

            Even when you turn on debug mode in the module error

            Error 8: Undefined variable: php_errormsg
            File: ....... \ manager \ processors \ execute_module.processor.php Line: 117

            Working on a local server

            Help this is all correct, thank you in advance.
              • 11055 ☆ A M B ☆
              • 3,112 Posts
              Quote from: mconsidine at Mar 01, 2011, 12:06 PM

              Yes, I’m doing that. But I can’t seem to figure out how to combine the code needed for a popup with the slideshow code...
              Matt
              attach here the modified smoothgallery’s index file.
              i’ll try to show you.
                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.
                • 11055 ☆ A M B ☆
                • 3,112 Posts
                @rider76,
                what’s your snippet call?
                  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.
                  • 18913
                  • 654 Posts
                  @goldsky : Thanks for the help. What I’ve done is added this code
                  	$modx->regClientCSS(MODX_BASE_URL . 'assets/libs/fancybox/jquery.fancybox-1.3.1.css');
                  	$modx->regClientCSS(MODX_BASE_URL . 'assets/modules/easy2/templates/default/style_css3.css');
                  	//$modx->regClientStartupScript('http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js');
                  
                  	$modx->regClientStartupScript(MODX_BASE_URL . 'assets/libs/fancybox/jquery.fancybox-1.3.1.pack.js');
                  	$modx->regClientStartupScript(MODX_BASE_URL . 'assets/libs/fancybox/jquery.easing-1.3.pack.js');
                  	$modx->regClientStartupScript(MODX_BASE_URL . 'assets/libs/fancybox/jquery.mousewheel-3.0.2.pack.js');
                  	$modx->regClientStartupScript(MODX_BASE_URL . 'assets/libs/fancybox/e2g.fancybox.js');
                  /*
                  	$modx->regClientStartupHTMLBlock('
                  		<script type="text/javascript">
                  			$(document).ready(function() {
                  				$("a.open").fancybox({
                  					\'padding\'         : 10,
                  					\'margin\'          : 0,
                  					\'transitionIn\'    : \'elastic\',
                  					\'transitionOut\'   : \'elastic\',
                  					\'titlePosition\'   : \'over\',
                  					\'type\'            : \'image\',
                  					\'titleFormat\'     : function(title, currentArray, currentIndex, currentOpts) {
                  						return \'<span id="fancybox-title-over">Image \' + (currentIndex + 1) + \' / \' + currentArray.length + (title.length ? \'   \' + title : \'\') + \'</span>\';
                  					}
                  				});
                  			});
                  		</script>
                  	');		
                  */
                  

                  just prior to the section where the looping starts for the slideshow. What I’m trying to do is associate fancybox (in this case) with the "open" class in the <a> tags for the images.

                  But the part that is commented out in the above code seems to conflict with the mootools call invoked by smoothgallery.

                  Can you suggest how to fix this? (I’ve been trying, as I hope you can see smiley )
                  Matt
                  PS The commented-out line for the call to jquery.min is actually include further up in the template. That’s why it’s commented out here.
                    • 11055 ☆ A M B ☆
                    • 3,112 Posts
                    @mconsidine,
                    which smoothgallery’s slideshow?
                      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.
                      • 25058
                      • 11 Posts
                      Quote from: goldsky at Mar 01, 2011, 06:32 PM

                      @rider76,
                      what’s your snippet call?

                      Thanks for the quick response! Call the snippet in a chank now looks like this:
                      [! easy2? &gid = `2,3,4,5` &slideshow = `smoothgallery` &ss_config = `timedgallery` &ss_allowedratio = `all`!]

                      The page displays the code:
                      <script type="text/javascript"> jQuery.noConflict ();</ script>
                      <script type="text/javascript" src="/assets/libs/slideshows/smoothgallery/scripts/mootools.v1.11.js"> </ script>
                      <script type="text/javascript" src="/assets/libs/slideshows/smoothgallery/scripts/jd.gallery.v2.js"> </ script>
                      <script type="text/javascript" src="/assets/libs/slideshows/smoothgallery/scripts/jd.gallery.set.js"> </ script>
                      <script type="text/javascript" src="/assets/libs/slideshows/smoothgallery/scripts/jd.gallery.transitions.js"> </ script>

                      In general, I’ve tried various slideshow, but the result is always the same.
                      Prior to the substitution of the parameter & ss_allowedratio = `all` worked only slideshow simple
                      Sorry if I’m expressing myself clear, I write through the translator google