Support » Plugin: Slideshow » Developer requested: Generate unique ID per slideshow?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Fixed it:
    in views/slideshowplugin/slideshow.php

    <?php if (empty($_SESSION['count'])) {
       $_SESSION['count'] = 1;
    } else {
       $_SESSION['count']++;
    } ?>

    In /slideshow.php

    if(isset($_SESSION['count'])):
      unset($_SESSION['count']);
      endif;

    and in views/slideshowplugin/slideshowslide/frontend_attachment:

    if(empty($url))
    			$anchorTagAttributes = 'rel="lightbox[' . $_SESSION['count'] . ']" href="' . $imageSrc . '" ' . (!empty($urlTarget) ? ' target="' . $urlTarget . '" ' : '');

    For more detailed info, leave a response.

    Do you just add those to the plugin’s code, and if so, won’t it be erased in a plugin update?

    Can these ids be used for anything else? Like to generate a unique id for an entry/post?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Developer requested: Generate unique ID per slideshow?’ is closed to new replies.