Hi René,
Thanks for using NextGEN Gallery Optimizer!
The default “float” title display in Fancybox is unable to accommodate line breaks for long titles, however there are three other styles you can choose from that will. To switch styles, simply open nextgen-gallery-optimizer/nextgen-optimizer-scripts-and-styles.php and replace the “fancybox inline js” section at the top 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
}
And for the Premium version…
/**********************************************************************
* 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
}
In the above examples, I’ve simply appended ‘titlePosition’:’over’ to instruct Fancybox to use an overlay for titles, but you can also set ‘titlePosition’:’inside’ or ‘titlePosition’:’outside’ for multi-line titles.
Hope this helps!
Cheers,
Mark.