WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery Optimizer
[resolved] Nextgen gallery optimizer fancy box wrap problem (9 posts)

  1. wmacdoug
    Member
    Posted 2 years ago #

    I have recently installed NextGEN gallery and NextGEN Gallery optimizer plugins to my site, and I am attempting to get the description text to wrap around the size of the image . As it stands right now, the text runs in one line, from one side of any web page directly to the other. It seems to be part of the fancybox portion of the plugin, because when I troubleshoot the code, it is in the fancybox-title.
    Is there a way to wrap the title over the image?
    Here is the link to see the problem: http://kre8tivekarma.com/?p=63

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

  2. wmacdoug
    Member
    Posted 2 years ago #

    I figured out the conflict. The Fancybox option in the NextGen Gallery Optimizer must be turned off, and the Easy Fancybox plugin must be installed. Then do as Easy Fancybox suggests, and set the code in the options of the Gallery to class="fancybox" rel="%GALLERY_NAME%" and the get then wraps.
    Please note that the original FancyBox for WordPress plugin has to be deactivated for any of this to function, and that is where I had a struggle.

  3. aluizioll
    Member
    Posted 2 years ago #

    If someone else lands here: I faced the same problem and to solve it I also had to uncheck all checkboxes in Gallery>Options>Gallery.
    wmacdoug, your advice also helped me thanks for posting your solution here!

  4. aluizioll
    Member
    Posted 2 years ago #

    Ang here is a link that might help: http://4visions.nl/wordpress-plugins/easy-fancybox/ (go straight to the topic by searching for "Will a NextGen gallery", without the quotes)

  5. Mark Jeldi
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks for sharing your experiences, guys.

    The default black and white "float" title in Fancybox can only expand horizontally, which, if you have long descriptions, won't be able to wrap them to new lines. However, Fancybox's three other title settings (over, inside and outside) all wrap beautifully.

    If you'd like to use these alternate title styles in Optimizer, you can make a minor edit to Fancybox's options at the top of scripts-and-styles.php. Just look for the following line and append the 'titlePosition' setting as shown below...

    <script type='text/javascript'>$(document).ready(function() { $('a.myfancybox').fancybox({ 'zoomSpeedIn': 500, 'zoomSpeedOut': 500, 'overlayShow':true,'overlayOpacity':0.3,'titlePosition':'over' }); });</script>

    "Over" is the one you ended up going with, wmacdoug, but you can also set 'titlePosition':'inside' or 'titlePosition':'outside'.

    I'll have to make this a future option on the plugin settings page, but I hope this helps for now.

    Cheers,
    Mark.

  6. aluizioll
    Member
    Posted 2 years ago #

    Thank you too for giving us some extra tips.
    Cheers

  7. wmacdoug
    Member
    Posted 2 years ago #

    Thank you both too, I appreciate the extra info Mark, it really helps!

  8. julianserrano
    Member
    Posted 1 year ago #

    hi guys, i have the same problem, but nothing works for me, when i used the code that Mark sent in Optimizer, scripts-and-styles.php, nothing happens. Besides if i used the Easy Fancy Box plug in, my slider stop working. I´m new in code stuff so please be gentle... This is the page with problems, thanks for any help.

    http://mmequiposmedicos.com.co/urologia/

  9. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Julian,

    You don't seem to be using a NextGEN Gallery shortcode on that page currently, so by design, Optimizer's Fancybox scripts and styles will not load...speeding up your site. Also, you've got several instances of Fancybox already loading on that page, so there could easily be a conflict.

    If you wanted to give it another shot after correcting the above, here's an updated version of the title mod for Optimizer v1.1 that uses jQuery noConflict for better compatibility with the MooTools library you're also using on the site...

    Simply replace the "fancybox inline js" section in Optimizer's scripts-and-styles.php with the following:

    For the basic version of Optimizer:

    /**********************************************************************
    * fancybox inline js
    **********************************************************************/
    
    function nggo_fancybox_inline_js() { ?>
    <!-- [nextgen gallery optimizer v<?php echo NGGO_VERSION; ?>] This page must contain a nextgen shortcode...else we wouldn't be serving its scripts and styles -->
    <script type='text/javascript'>jQuery.noConflict(); jQuery(document).ready(function() { jQuery('a.myfancybox').fancybox({ 'zoomSpeedIn':500, 'zoomSpeedOut':500, 'overlayShow':true, 'overlayOpacity':0.3, 'titlePosition':'over' }); });</script>
    <?php
    }

    For the Premium version of Optimizer:

    /**********************************************************************
    * fancybox inline js
    **********************************************************************/
    
    function nggop_fancybox_inline_js() { ?>
    <!-- [nextgen gallery optimizer premium v<?php echo NGGOP_VERSION; ?>] This page must contain a nextgen shortcode...else we wouldn't be serving its scripts and styles -->
    <script type='text/javascript'>jQuery.noConflict(); jQuery(document).ready(function() { jQuery('a.myfancybox').fancybox({ 'zoomSpeedIn':500, 'zoomSpeedOut':500, 'overlayShow':true, 'overlayOpacity':0.3, 'titlePosition':'over' }); }); var timer; jQuery(window).resize(function() { clearTimeout(timer); timer = setTimeout(jQuery.fancybox.browser_resize, 500); });</script>
    <?php
    }

    Hope this helps!

    Cheers,
    Mark.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic