We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18913
    • 654 Posts
    While I’m here, I’ve got another question for goldsky. All the transitions provided are great, but I came across one more that I don’t think is included in your slideshow but could be smiley I know you’ve got a lot on your plate, but could you provide any pointers to how the "Ken Burns effect" could be implemented as a slideshow transition?

    It is described here
    http://en.wikipedia.org/wiki/Ken_Burns_Effect

    and I see code here
    http://www.electricprism.com/aeron/slideshow%201/
    and here
    http://tobia.github.com/CrossSlide/

    It’s basically a combination of fade,pan and zoom all at once. Maybe those are built in different places to code you’ve already added??

    Thanks in advance!
    Matt
      • 18913
      • 654 Posts
      @goldsky -
      This call
      [!searchpics? &tags=`knob,nose,bolts`!]
      [+tagresults+]
      [!easy2? &fid=`[+tagresults+]` &slideshow=`smoothgallery` &ss_config=`slidingtransition` &landingpage=`51`!]
      


      generates this
      80,2 snippet calls wrong file id:80,2 


      while this
      [!easy2? &fid=`80,2` &slideshow=`smoothgallery` &ss_config=`slidingtransition` &landingpage=`51`!]

      gets me the slideshow.

      I haven’t done a lot of playing around with placeholders, so I’m sure I’m overlooking something simple...
      Matt
        • 11055 ☆ A M B ☆
        • 3,112 Posts
        Quote from: mconsidine at May 28, 2010, 05:57 PM

        <?php
        //$tags=explode(',',$tags);
        //$tags=implode("','", $tags);
        
        $query="SELECT modx_easy2_files.filename FROM modx_easy2_files LEFT JOIN phototags ON modx_easy2_files.id = phototags.pic WHERE phototags.title IN ('". $tags . "')";
        


          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.
          • 10608
          • 36 Posts
          @goldsky: thanks for your help, it’s fixed!

          It would be great if this Easy 2 Gallery would also support Uploadify as in EvoGallery. ;-)
            • 11055 ☆ A M B ☆
            • 3,112 Posts
            Quote from: mconsidine at May 29, 2010, 07:43 AM

            While I’m here, I’ve got another question for goldsky. All the transitions provided are great, but I came across one more that I don’t think is included in your slideshow but could be smiley I know you’ve got a lot on your plate, but could you provide any pointers to how the "Ken Burns effect" could be implemented as a slideshow transition?

            Thanks in advance!
            Matt
            For a quick concept, just remember these steps:

            1. Prepare page headers.
            I used to use MODx’s API:

            • $modx->regClientCSS($css_file)
            • $modx->regClientStartupHTMLBlock(’<script ...>raw script inside html header</script>’)
            • $modx->regClientStartupScript($js_file)

            2. Do you have options?
            Again, this is not mandatory. If you only make one slideshow for your purpose, you can skip this process.
            <?php // highligthing
            if ($ss_config=='myoption_1') {
               // ... your code here
            }
            

            This is what &ss_config’s value is about.

            3. Available variables
            The available parameters to be retrieved are:
            <?php // highligthing
            $_ssfile['id'][]          // image's id
            $_ssfile['dirid'][]       // dir's id
            $_ssfile['src'][]         // image's file path
            $_ssfile['filename'][]    // image's name
            $_ssfile['title'][]       // image's name (if exist) or filename
            $_ssfile['name'][]        // image's name
            $_ssfile['description'][] // image's description
            $_ssfile['thumbsrc'][]    // image's thumbnail path
            
            $_ssfile['resizedimg'][]  // resized image's path (if you have a resctrictive size of slideshow box area,
                                      // I recommend you to use this, although it means it'll create another file with thumbnail engine.)
            


            4. Image looping
            Now, let’s play.
            Do you know?
            To make each of slideshows I’ve created, I only open the browser’s source page, copy the wrapper, and take that one of the images looping, and change the code.
            Let me show you an example.

            http://jonraasch.com/blog/a-simple-jquery-slideshow
            <div id="slideshow">
                <img src="img/img1.jpg" alt="" class="active" />
                <img src="img/img2.jpg" alt="" />
                <img src="img/img3.jpg" alt="" />
            </div>
            

            The wrapper is <div id="slideshow">.
            The image looping code is <img src="[imagefile].jpg" alt="" />

            <?php // highligthing
            if ($ss_config=='myoption_1') {
            // $ss_display is the results
            
                // open the gallery wrapper
                $ss_display = '
                <div id="slideshow">';
            
                    // *********** start image looping *********** //
                    
                    // $j comes out from the &ss_limit
                    // $count is the image counter
                    $j=0;
                    for ($i=0;$i<$count;$i++) {
                    $ss_display .= '
                            <img src="'.$_ssfile['src'][$i].'" alt="" title="'.$_ssfile['title'][$i].'" '
                            . ( $i == 0 ? 'class="active" ' : '' ) // first image is active class
                            . '/>';
            
                    $j++;
                    if ($j==$ss_limit) break;
                    }
            
                    // ************ end image looping ************ //
                    
                // close the gallery wrapper
                $ss_display .= '
                </div>';
            }
            


            Tasty, huh? laugh
            I haven’t try the links you gave me, but the concept is still the same.
              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
              Quote from: geertdeg at May 29, 2010, 08:59 AM

              @goldsky: thanks for your help, it’s fixed!

              It would be great if this Easy 2 Gallery would also support Uploadify as in EvoGallery. ;-)
              Yeah, I’ve been mentioned about that also.
              But since Easy 2 Gallery has able to load multiple upload, and zip upload, I don’t think we need a more fancy one tongue
              Perhaps later, if it has been proven that it’s a requirement.
                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 - I must be missing something. The change you suggested doesn’t work. To test what’s going on, I made a test snippet which just returns the value of &fid=`[+tagresults+]`. This correctly returns the string value, in this case "80,2".

                When I hardcode that in the easy2 call, it works.

                When I give it the placeholder, it doesn’t.

                It looks like the query being sent to mysql ends up with the string "[+tagresults+]" and not "80,2". So I guess I need to look into how to pass parameters to snippets again. (This is Evo 1.0.3, fwiw...)

                Can anyone point out what I’m missing?
                Matt
                  • 11055 ☆ A M B ☆
                  • 3,112 Posts
                  &fid=`[!tagresults!]`

                  tagresults is a snippet, right? not a placeholder?
                    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
                    No, actually I was setting a placeholder. I’ve got a workaround though. This is what the main easy2 call page looks like now :
                    [!searchpics? &tags=`knob,bolts,nose`!]
                    [!easy2_wrapper!]
                    


                    where "easy2_wrapper" is this snippet :
                    <?php
                    $output = $modx->runSnippet('easy2',array(  
                        'fid' => $modx->getPlaceholder('tagresults'),
                        'slideshow' => 'smoothgallery',
                        'ss_config' => 'slidingtransition',
                        'landingpage' => '51'  
                    ));
                    return $output;
                    ?>
                    


                    Clearly, another approach to this would be to just add this to the end of the "searchpics" snippet and get rid of the placeholder altogether. I might end up doing that, but didn’t know if having the info available outside of the snippets would be useful. I’m thinking the answer to that might be "no" and that I should put it all in one snippet, such as this (which also works ) :
                    <?php
                    //[ ! tagpics? &tags=`knob,nose,bolts` ! ]
                    $tags=explode(',',$tags);
                    $tags="'" . implode("','", $tags) . "'";
                    
                    $query='SELECT modx_easy2_files.id FROM modx_easy2_files LEFT JOIN phototags ON modx_easy2_files.id = phototags.pic WHERE phototags.title IN ('. $tags . ')';
                    
                    $rs=$modx->db->query($query);
                    $pics=array();
                    while ($row=$modx->db->getRow($rs)){
                    	$pics[$row['id']]=$row['id'];
                    } 
                    
                    $tagresults = implode(',',$pics);
                    
                    $output = $modx->runSnippet('easy2',array(  
                        'fid' => $tagresults,
                        'slideshow' => 'smoothgallery',
                        'ss_config' => 'slidingtransition',
                        'landingpage' => '51'  
                    ));
                    return $output;
                    ?>
                    


                    Anyway, this works.

                    I did find one glitch though which seems to be unrelated to what I’m doing. If I call easy2 with only one value for fid (e.g. "80"), I get an image box but no image. I can click on it and see the full image on the landing page. And the infozone area contains the right filename. But the main slideshow box is blank. I get this error even if I just call easy2 like this
                    [!easy2? &fid=`80` &slideshow=`smoothgallery` &ss_config=`slidingtransition` &landingpage=`51`!]
                    


                    Okay, onto investigating the goofy hover state of the image area tag as well as the cumulus snippet. I’m thinking I should now just be able to have words in the tag cloud set or otherwise pass their value to the above snippet...
                    Matt
                      • 11055 ☆ A M B ☆
                      • 3,112 Posts
                      Quote from: mconsidine at May 29, 2010, 04:40 PM

                      I did find one glitch though which seems to be unrelated to what I’m doing. If I call easy2 with only one value for fid (e.g. "80"), I get an image box but no image. I can click on it and see the full image on the landing page. And the infozone area contains the right filename. But the main slideshow box is blank. I get this error even if I just call easy2 like this
                      [!easy2? &fid=`80` &slideshow=`smoothgallery` &ss_config=`slidingtransition` &landingpage=`51`!]
                      

                      Sounds familiar to me. I’ve seen this problem before, and found out that the image src link was wrong.
                      Check about it from the browser’s HTML source.

                      Again, what was the error?

                      PS:
                      As the time we’re speaking, I also try your goal but in different way, so perhaps my answers not quite right, since I look it from different side.
                      My snippet call becomes:

                      [!easy2! &tags=`dogs, puppy` &plugins=`landingpage:phototags`]

                      But i’ll keep post to look over the grand idea.
                        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.