WordPress.org

Ready to get started?Download WordPress

Forums

  1. timelessbeing
    Member
    Posted 1 year ago #

    Is there some way to make a gallery that does not automatically advance? I only want the slide to change when the user clicks a thumbnail. Thanks.

    http://wordpress.org/extend/plugins/photonic/

  2. David Lingren
    Member
    Posted 1 year ago #

    Maybe this is a good time to implement the "pause" parameter...

    Photonic Extension for [mla_gallery] shortcode in Media Library Assistant

  3. Sayontan Sinha
    Member
    Plugin Author

    Posted 1 year ago #

    Maybe this is a good time to implement the "pause" parameter...

    The pause parameter is supported internally, but it doesn't show up as a shortcode option. You can add pause="0" or pause="1" and it will work (or at least I believe it should work).

    But I think the original post asks something different - it asks about not automatically starting the slideshow. This would require invoking the pause function on the JQuery Cycle object, as opposed to passing the pause parameter.

  4. timelessbeing
    Member
    Posted 1 year ago #

    I tried adding pause="1" and "0" to the shortcut but the slides still cycled automatically.

  5. Sayontan Sinha
    Member
    Plugin Author

    Posted 1 year ago #

    I tried adding pause="1" and "0" to the shortcut but the slides still cycled automatically.

    ??
    I didn't say that you needed to do it. I was merely responding to David's suggestion (which wasn't the answer to the question you were asking). Adding the pause parameter isn't supposed to solve anything in your case.

    For your question see the second para of my response:

    But I think the original post asks something different - it asks about not automatically starting the slideshow. This would require invoking the pause function on the JQuery Cycle object, as opposed to passing the pause parameter.

    What you are asking for is a code change, which without testing I cannot provide with certainty. Basically if you open photonic.php and locate the code that does the slideshow, you will see this:

    $j(this).cycle({
    						pause: <?php if (empty($pause)) echo 0; else echo 1; ?>,
    						fit: 1,
    						width: '100%',
    						<?php if (isset($fx)) { ?>
    						fx: '<?php echo $fx; ?>',
    						<?php } ?>
    						<?php if (isset($speed)) { ?>
    						speed: '<?php echo $speed; ?>',
    						<?php } ?>
    						<?php if (isset($timeout)) { ?>
    						timeout: '<?php echo $timeout; ?>',
    						<?php } ?>
    						<?php if ($style == 'strip-above' || $style == 'strip-below') { ?>
    						pager: '#' + thisId + '-nav',
    
    						pagerAnchorBuilder: function(idx, slide) {
    							var thumbIds = <?php echo json_encode($thumbs); ?>;
    							var image = slide.children[0];
    							var lastDash = image.id.lastIndexOf('-');
    							var imageId = image.id.substr(lastDash + 1);
    							var thumbDetails = thumbIds[imageId];
    							return '<li><a href="#" title="' + image.alt + '"><img src="' + thumbDetails[0] + '" width="<?php echo $thumb_width; ?>" height="<?php echo $thumb_height; ?>" alt="' + image.alt + '" /></a></li>';
    						}
    						<?php } ?>
    					});

    Amend it to say:

    $j(this).cycle({
    						pause: <?php if (empty($pause)) echo 0; else echo 1; ?>,
    						fit: 1,
    						width: '100%',
    						<?php if (isset($fx)) { ?>
    						fx: '<?php echo $fx; ?>',
    						<?php } ?>
    						<?php if (isset($speed)) { ?>
    						speed: '<?php echo $speed; ?>',
    						<?php } ?>
    						<?php if (isset($timeout)) { ?>
    						timeout: '<?php echo $timeout; ?>',
    						<?php } ?>
    						<?php if ($style == 'strip-above' || $style == 'strip-below') { ?>
    						pager: '#' + thisId + '-nav',
    
    						pagerAnchorBuilder: function(idx, slide) {
    							var thumbIds = <?php echo json_encode($thumbs); ?>;
    							var image = slide.children[0];
    							var lastDash = image.id.lastIndexOf('-');
    							var imageId = image.id.substr(lastDash + 1);
    							var thumbDetails = thumbIds[imageId];
    							return '<li><a href="#" title="' + image.alt + '"><img src="' + thumbDetails[0] + '" width="<?php echo $thumb_width; ?>" height="<?php echo $thumb_height; ?>" alt="' + image.alt + '" /></a></li>';
    						}
    						<?php } ?>
    					}).cycle('pause');
  6. timelessbeing
    Member
    Posted 1 year ago #

    I thought you told me to add it.

    I'll just wait for the next release. For now, I will use a very large timeout value.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.