WordPress.org

Forums

NextGEN Gallery Optimizer
[resolved] Fancybox doesn't work on Calendar Page (4 posts)

  1. bru-u-kno
    Member
    Posted 2 years ago #

    I use NextGen Optimizer and on regular sites it works very well, but on the calendar page the pictures are shown without fancybox effect.

    I don't know why so kindly take a look on my the site http://www.singin-gold.com/blog/calendar/

    Thanks in advance.

    Regards,
    Bruno

    http://wordpress.org/extend/plugins/nextgen-gallery-optimizer/

  2. Mark Jeldi
    Member
    Plugin Author

    Posted 2 years ago #

    Hey Bruno,

    Good to hear from you again!

    I've been looking into your Calendar page, and I believe the reason Fancybox isn't loading is due to the dynamic "More Info" dropdown the images are contained in. At a guess, it seems you've either got your NextGEN shortcode nested within another plugin's shortcode for the effect, or it's being inserted via a direct do_shortcode() call.

    Unfortunately, it's not currently possible in WordPress to detect if either of these methods are used on a page before the head section is loaded (re: Optimizer's FAQ), and loading the extra lightbox scripts sitewide would defeat the purpose of the plugin.

    However, I've recently come up with a solution whereby if you tell Optimizer where you want the necessary scripts to run, it will both load them conditionally in the head where they won't break, and only on the pages you specify (not sitewide). I'm currently working on a conditional-building form for the plugin's settings page, but until then, I've just emailed you a custom conditional function that will load the Fancybox lightbox scripts and styles on your Calendar page only (in addition to your pages with regular shortcodes).

    Hope this helps!

    Cheers,
    Mark.

  3. bru-u-kno
    Member
    Posted 2 years ago #

    Hi Mark,

    I've problems to integrate a nextgen gallery in combination with the Collapse-O-Matic plugin.

    Some words about the Collapse-O-Matic plugin: "Remove clutter, save space. Display and hide additional content in a SEO friendly way. Wrap any content—including other shortcodes—into a lovely jQuery expanding and collapsing element."

    Here the link to my page: http://www.singin-gold.com/blog/photos/

    As you see the images are not shown in a fancybox.

    This is the code I use on the page:
    [expand title="4 Jahre Neidclub Fulda" id="r2d2wiki"][nggallery id=4]<spanhighlight">scroll-to-trigger" id="bot-r2d2wiki">click here to close</span>[/expand]

    The link to the Collapse-O-matic documentation:
    plugins.twinpictures.de/plugins/collapse-o-matic/documentation/

    Kindly take a view on my page.
    Maybe you know what to do :)

    Thanks in advance.

    Best regards,
    Bruno

  4. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Author's note:

    Issue resolved via email using an extended conditional statement to load the necessary scripts and styles on pages using the dynamic Collapse-O-Matic functionality.

    This was necessary as it's not currently possible in WordPress to detect if a nested shortcode is actually present on a page before the head section is loaded, as it's processed much later than the main/outer shortcode, using a secondary do_shortcode() call. This is very similar to the Calendar page example in the original issue at the top of this thread, and fortunately the same solution works equally well.

    Cheers,
    Mark.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic