Support » Plugin: NextGEN Gallery Optimizer » [Plugin: NextGEN Gallery Optimizer] Change Fancybox titlePosition

Viewing 9 replies - 1 through 9 (of 9 total)
  • Oh it’s always good to answer your own question, so rewarding!

    That attribute is in “jquery.fancybox-1.3.4.pack.js” and is set as “float” change it to one of the other valid ones and you’ll find that your uncle is called Bob.

    Oh it’s always good to answer your own question, so rewarding!

    That attribute is in “jquery.fancybox-1.3.4.pack.js” and is set as “float” change it to one of the other valid ones and you’ll find that your uncle is called Bob.

    #Blue Squirrel, just wanted to say thanks. I still don’t understand why they hide such a basic requirement, inside a JavaScript file. This functionality should be available to choose through the dashboard.

    Thank you very much Pradeep, that’s very kind of you!

    I never dreamt that when I was talking to myself it would actually be useful to someone else.

    I’m glad it helped you (and I agree, if it’s not in the dashboard it should at least be in the documentation).

    Plugin Author Mark Jeldi

    (@mark-jeldi)

    @ Blue Squirrel,

    Thanks for sharing your experiences!

    If you don’t want to go digging around in Fancybox’s compressed js file, you can easily modify the title style, and any of Fancybox’s options by editing the “fancybox inline js” section at the top of Optimizer’s scripts-and-styles.php.

    In the examples below, I’ve simply appended 'titlePosition':'inside' to Fancybox’s invocation code (as required above), but you can also set ‘titlePosition’:’outside’, ‘titlePosition’:’over’ or ‘titlePosition’:’none’ according to your preferences…

    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':'inside' }); });</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':'inside' }); }); var timer; jQuery(window).resize(function() { clearTimeout(timer); timer = setTimeout(jQuery.fancybox.browser_resize, 500); });</script>
    <?php
    }

    Hope this helps!

    Cheers,
    Mark.

    Used the Premium fix and it works great. However, when your plugin refers to “title” it connects to the “Description” section of the NextGen plugin. Is there a way to add the “Alt & Title Text” to the coding as well?

    Plugin Author Mark Jeldi

    (@mark-jeldi)

    Hi hmt3,

    Thanks for downloading NextGEN Gallery Optimizer Premium!

    I’ve been looking into your question regarding the display of the Alt/Title text rather than the Description text in Fancybox, and I’ve come up with a solution for you. I believe the best method would be to use Fancybox’s “titleFromAlt” feature, which will look for and use the text in NextGEN’s Alt/Title field whenever the Description field is empty.

    I’ve just sent you through an email with an updated version of the plugin, which includes a modification to the Fancybox script itself (to enable compatibility with NextGEN). You’ll just need to upload this to replace your existing copy, and add ‘titleFromAlt’:true to Fancybox’s initialization code as above.

    I hope this helps!

    Cheers,
    Mark.

    That worked. Thank you very much.

    Plugin Author Mark Jeldi

    (@mark-jeldi)

    Hi hmt3,

    That’s great to hear! I’m glad I could help 🙂

    All the best with your site.

    Cheers,
    Mark.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: NextGEN Gallery Optimizer] Change Fancybox titlePosition’ is closed to new replies.