WordPress.org

Forums

Flickr Gallery
lightbox doesn't work (10 posts)

  1. oldcastle
    Member
    Posted 4 years ago #

    Hi,

    As you can see here http://jilliz.com/salaya/presidential-suite/
    the lightbox is not working.

    Any idea?
    Cheers,

    http://wordpress.org/extend/plugins/flickr-gallery/

  2. Jay Collier
    Member
    Posted 4 years ago #

    Similar problem.

    The lightbox is working on one of my sites ...

    <http://jaycollier.net>

    ... and not the other ...

    <http://wgbhalumni.org/>

    The only difference is that the one not working is a search query:

    [flickr-gallery mode="search" per_page="6" pagination="0" group_id="397450@N23"]

  3. DanCoulter
    Member
    Plugin Author

    Posted 4 years ago #

    @oldcastle
    Your theme is throwing a Javascript error. That's why it's not working.

  4. DanCoulter
    Member
    Plugin Author

    Posted 4 years ago #

    @jcollier

    Something in your theme is inserting HTML tags into the Javascript block. I don't know why, that's not happening on any of my sites, so I don't think it's the default the_content filter.

  5. alpha_llama
    Member
    Posted 4 years ago #

    Firstly, this may be my fav WP plugin ever made. Thanks a ton DanCoulter.

    I'm having similar issues with Lightbox. (I'm thinking it must be theme-related cause it worked wonderfully before I changed it.)

    Any ideas how to troubleshoot? Here's a page on my site with a broken lightbox flickr gallery: http://eckcite.com/2010/07/ccbar-ranch/ . I'm using this theme: http://wpcrunchy.com/our-themes/obscure

    Thanks in advance. Using flickr-gallery.1.5.2 btw

  6. b41l3y
    Member
    Posted 4 years ago #

    Hi All-

    I was having a similar issue and noticed that I did not have jQuery included correctly in my theme.

    This helped out and solved my issue:
    http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/

    Cheers!

  7. alpha_llama
    Member
    Posted 4 years ago #

    Okay, I think I'm gaining on it:

    I noticed for my theme that does not work with lightbox, theme-specific scripts are instantiated with script tags (no php here) and then dumped at wp_head like this:

    <script type="text/javascript" src= ... </script>

    I changed themes back to the one that worked with lightbox, and noticed that theme-specific scripts are called with wp_enqueue_script.

    I'm kind of a php and jQuery n00b, but I'm thinking I need to tweak my broken theme use wp_enque_script instead. I'll make a backup, change things up, and check back after I do. Meanwhile, any suggestions? Am i on the right track here?

  8. alpha_llama
    Member
    Posted 4 years ago #

    Getting Close. I wp_enqueue_script'ed all of the theme-specific scripts, and now instead of just linking to Flickr, the overlay generates and the little loading animation comes up. But that's where it stops. The animation will play forever and my flickr images will never load in the flightbox.

    The end of my <head> looks like this now:

    wp_enqueue_script('jquery');
    enqueue_the_scripts();
    wp_head();

    If I swap the order of the last 2 lines, it breaks to just linking to flickr. Help!

  9. DanCoulter
    Member
    Plugin Author

    Posted 4 years ago #

    @alpha_llama

    You've got a Javascript error on that page that might be breaking it. You've got a home page specific call to the jQuery cycle plugin being called on every page. You need to make sure that the call to that plugin only happens on the home page. You can wrap it in something like this:

    <?php if ( is_front_page() ) : ?>
    jQuery("#foo").cycle();
    <?php endif; ?>
  10. alpha_llama
    Member
    Posted 4 years ago #

    I got it working this morning (probably about the time of prev post) by systematically turning on/off all js scripts. My enqueue_the_scripts() function is pretty much this:

    wp_enqueue_script('script1','path/to/file',array('jquery'));
    wp_enqueue_script('script2','path/to/file',array('jquery'));
    ...
    wp_enqueue_script('scriptN','path/to/file',array('jquery'))

    and the lightbox came alive when I commented out the enqueue for the theme's easing script! Coincidentally, I guess I wasn't using it anyway.

    @DanCoulter

    Thanks a lot. You're right, I don't need that call anywhere except the home page. I'll fix that, too. Can't find it now, but after reading another one of your posts here, [99% of the time its another js breaking lightbox] I was able to narrow it down. Thanks again for such an awesome plugin!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Flickr Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic