We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Is it possible to somehow amend the code so that each slide in a smoothgallery can be hyperlinked to a specific resource?

    I am using version 1.4.10-rc4 on Evo 1.0.5
    • You might use the redirect_link data and placeholder for the link, instead.
      If you edit the image (and folder), you can see it as the last field.
      After that, you can copy-rename the assets/libs/smoothgallery/smoothgallery.php, then append your snippet call with
      [!easy2? ... &ss_indexfile=`your_new_filename`!]
      


      Then start to make the change of the link tags as your need.
        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.
      • I followed those steps but it didn't work. However, I found your comments on this thread http://forums.modx.com/thread/50737/support-comments-for-easy-2-gallery-1-4-7-pl and also made the changes in the php file to the "start images looping" section. Now it's working perfectly - thanks!!
        • I followed those steps but it didn't work. However, I found your comments on this thread http://forums.modx.com/thread/50737/support-comments-for-easy-2-gallery-1-4-7-pl and also made the changes in the php file to the "start images looping" section. Now it's working perfectly - thanks!!
            • 51771
            • 1 Posts
            Some necroposts smiley
            same redirect for galleryview filmstrip:

            Edit: assets/libs/slideshows/galleryview/galleryview.php
            find at 299 line:
                // ------------- start the images looping ------------- //
                for ($i = 0; $i < $ssFiles['count']; $i++) {
                    $output .= '
                        <li>
                            <a target="_self" href="'
                            . $modx->makeUrl(
                                    $modx->documentIdentifier,
                                    $modx->aliases,
                                    'sid=' . $ssParams['sid']
                                    . '&fid=' . $ssFiles['id'][$i]
                            )
                            . '#' . $ssParams['sid'] . '_' . $ssFiles['id'][$i] . '">
                                <img src="' . $ssFiles['thumbsrc'][$i] . '" alt="' . $ssFiles['alias'][$i] . '" title="' . $ssFiles['title'][$i] . '" />
                            </a>
                        </li>
                        ';
                }
                // ------------- end the images looping ------------- //


            replace for
                // ------------- start the images looping ------------- //
                for ($i = 0; $i < $ssFiles['count']; $i++) {
            		
            		if (!empty($ssFiles['redirect_link'][$i])) {
            			$redirectLink1 = preg_replace('/[^\d]+/', '', ($ssFiles['redirect_link'][$i]));	// <-- removes anything but numbers		
                        $redirectLink = $modx->makeUrl($redirectLink1); // <-- 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 .= '
                        <li>
                            <a target="_self" href="' . $redirectLink . '">
                                <img src="' . $ssFiles['thumbsrc'][$i] . '" alt="' . $ssFiles['alias'][$i] . '" title="' . $ssFiles['title'][$i] . '" />
                            </a>
                        </li>
                        ';
                }
                // ------------- end the images looping ------------- //
            
            [ed. note: urfinjuz last edited this post 8 years, 2 months ago.]