WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery Optimizer
[resolved] text in 2 or more lines in lightbox (8 posts)

  1. Buchholdt
    Member
    Posted 1 year ago #

    Hi there..

    I have a gallery where 1 image has a lot of text to it. Therefor the text line is quite long.
    Is there a way to set the line lenght?

    You can see what i meen here: http://db.tt/OmxYJoND

    Best regards René

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

  2. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. fredel
    Member
    Posted 1 year ago #

    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

  4. Buchholdt
    Member
    Posted 1 year ago #

    Hi Mark

    That did it :-) Thanks you so much for your great help and quick support :-)

    Have a great day..

    Best Regards
    René

  5. fredel
    Member
    Posted 1 year ago #

    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

  6. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    @ 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.

  7. fredel
    Member
    Posted 1 year ago #

    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

  8. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Fritz,

    No worries. That's great to hear. Looking good :)

    All the best,
    Mark.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.