Support » Plugin: NextGEN Gallery Optimizer » text in 2 or more lines in lightbox

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mark Jeldi

    (@mark-jeldi)

    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.

    hey mark,

    i cannot find this code after update in nextgen-gallery-optimizer/nextgen-optimizer-scripts-and-styles.php

    i also want to include the titel back into the picture, after the udate it seems you changed it to “outside”?

    thanks again very much
    fritz

    Thread Starter Buchholdt

    (@buchholdt)

    Hi Mark

    That did it 🙂 Thanks you so much for your great help and quick support 🙂

    Have a great day..

    Best Regards
    René

    hey all,

    sorry again and thx mark – added the code and it aso works very well.
    one question: is it possible to get the title in the same transparent box like before the update?

    thx so much
    fritz

    Plugin Author Mark Jeldi

    (@mark-jeldi)

    @ René…
    That’s great to hear! And no worries, I’m glad I could help 🙂

    @ Fritz…
    The latest update of Optimizer (v.1.1.2) would have overwritten any changes to the “fancybox inline js” section, reverting the title back to the default “float” style used in all previous versions. The file itself (nextgen-optimizer-scripts-and-styles.php) was not updated in this release.

    The code above uses 'titlePosition':'over' which should be the transparent box title style you’re after, but if it’s not displaying, perhaps you could share a link to a gallery page with titles (your earlier test page is no more…404).

    Remember, you’ll need to make sure your images have their “Description” field filled in at Gallery –> Manage Gallery –> “your_gallery_name” for titles to display.

    All the best,
    Mark.

    Hey Mark,

    thanks so much.

    Changing from “Inside” to “Over” and it works fine!
    http://bergtour-online.de/bergtouren/bergwanderungen/schwer/wanderung-fleischbank-hoelzelstalljoch-grasbergjoch-im-karwendel/

    Thanks again
    Fritz

    Plugin Author Mark Jeldi

    (@mark-jeldi)

    Hey Fritz,

    No worries. That’s great to hear. Looking good 🙂

    All the best,
    Mark.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘text in 2 or more lines in lightbox’ is closed to new replies.