Results 1 to 5 of 5

Thread: Lightbox 2.05 combined with conveyor belt slideshow problem

  1. #1
    Join Date
    Nov 2007
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Lightbox 2.05 combined with conveyor belt slideshow problem

    I am using the conveyor belt slideshow combined with Lightbox 2.05, setup as a multiple picture slideshow. Everything is working fine apart from when the Lightbox slideshow opens it triples the pictures shown.

    For example if I have a 3 picture gallery slideshow, Lightbox will say Image 1 of 9 instead of Image 1 of 3. It will display the 3 pictures in the gallery and then repeat them a further 2 times.

    Does anyone have any suggestions or solutions to this problem?

    Any help would be gratefully appreciated. Im ripping my hair out.

    Thanks
    Craig

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'd use SlimBox2:

    http://www.digitalia.be/software/slimbox2

    And replace its init with:

    Code:
    // Live invocation for use with other scripts, image maps, AJAX, etc. - also skips duplicates when forming groups
    // Uses the rev attribute of the tag for a caption, freeing up the title for other uses or to be blank.
    // Remove the AUTOLOAD CODE BLOCK if using this, or replace it with this code.
    // Live Load Script (c)2011 John Davenport Scheuer - for use with Slimbox 2.04
    // as first seen in http://www.dynamicdrive.com/forums/
    // username: jscheuer1 - This Notice Must Remain for Legal Use
    (function($){
    	if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
    		$('*[href][rel^=lightbox]').live('click', function(e){
    			var t = this, rel = t.getAttribute('rel'), hrefs = [], links = [], index;
    			if(rel === 'lightbox'){
    				$.slimbox(t.href, t.getAttribute('rev') || '', { /* Options */ });
    			} else {
    				$('*[href][rel="' + rel + '"]').each(function(){
    					if($.inArray(this.href, hrefs) < 0){
    						if(t.href === this.href){index = hrefs.length;}
    						hrefs.push(this.href);
    						links.push([this.href, this.getAttribute('rev') || '']);
    					}
    				});
    				$.slimbox(links, index, {loop: true /* , Aditional Options */ });
    			}
    			e.preventDefault();
    		});
    	}
    })(jQuery);
    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    dabsy86 (07-22-2011)

  4. #3
    Join Date
    Nov 2007
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your reply. I will give that a go.

    Update - I have tried using Slimbox and with your change of code and everything works spot on. One minor snag is that the gallery keeps looping even when it is set to false. Not a major issue which i'm sure we can live with.

    Thanks again for your help.
    Last edited by dabsy86; 07-22-2011 at 11:02 AM.

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I didn't have that problem. Can you give us a link to the page?

    But we might not need that. After changing:

    Code:
    $.slimbox(links, index, {loop: true /* , Aditional Options */ });
    to:

    Code:
    $.slimbox(links, index, {loop: false /* , Aditional Options */ });
    and be sure not to quote the word false, otherwise it evaluates to true, make sure to clear the browser's cache and refresh the page.

    If you're still having that problem and want help. Post a link to the live page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #5
    Join Date
    Nov 2007
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    That has done the trick thanks for your help. Works perfectly now.

    I didn't spot the loop function in the change of code you provided. Thanks for pointing that out.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •