WordPress.org

Ready to get started?Download WordPress

Forums

Slideshow
[resolved] Developer requested: Generate unique ID per slideshow? (4 posts)

  1. wzshop
    Member
    Posted 11 months ago #

    Hello,
    I was wondering if someone can help me to get/generate an unique ID per slideshow, so i can use it as in reference in other scripts.

    Anyone who can help me? Small budget available.
    Hope to hear from you.
    Robbert

    http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/

  2. wzshop
    Member
    Posted 11 months ago #

    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.

  3. 1timothy412
    Member
    Posted 9 months ago #

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

  4. netdiva790
    Member
    Posted 8 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic