WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery Optimizer
Issues with Image Description (22 posts)

  1. samaralife
    Member
    Posted 1 year ago #

    Firstly, with the installation and activation of the plugin long description appeared lined into a long line. In case with very long descriptions they didn't even fit into the full width (1920) of the screen. So, problem compared to NG Gallery itseld the plugin does not break the long descriptions into lines to be fitted under the image. Examples at http://samaralife.com/fasadnaya-plitka-samaryi/, tab Алексея Толстого, most pictures.

    Secondly comes a new problem that I notices only recently. The plugin decided to hide the images descriptions altogether. So now they do not show at all! ((( Examples of no-show http://samaralife.com/repetitsiya-traviaty/ fourth pic and many others with single people.

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

  2. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hi samaralife,

    Thanks for using NextGEN Gallery Optimizer!

    In regards to the long titles in Fancybox, this is because the default "float" title display is unable to accommodate line breaks. 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...

    /**********************************************************************
    * 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
    }

    In the above example, 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.

    In regards to your second question, Fancybox uses NextGEN's "Description" field at Gallery --> Manage Gallery --> gallery_name for your lightbox image titles. Looking at the source code from your second link, you only seem to have the "Alt/Title" field populated for each image. Type or copy/paste a description for each image, and they will display automatically in the lightbox.

    Hope this helps!

    Cheers,
    Mark.

  3. samaralife
    Member
    Posted 1 year ago #

    Hi and thank you for the suggestions.

    As for the long titles, I'll think about it.

    As for the absence of descriptions under the pics in galleries, I do have descriptions (both Alt/Title and Description fields are filled in) yet no description (or title) appears. Mind you, it used to be visible until recently. I guess something was changed in the plugin code or functionality with the latest update.

    NB: By descriptions I mean the title of the picture that I write in the description box, not the title (automatically filled in and equalling the name of the file) in the upper field at each picture in "Manage the Gallery".

  4. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hey samaralife,

    Thanks for the update. I've just had another look through your source code, and I believe I know why your descriptions aren't showing...

    Your theme is actually loading another instance of Fancybox, including its stylesheet, js file and another invocation code tucked away in wp-content/themes/origin/js/footer-scripts.js.

    This footer-scripts.js file is essentially overriding the settings for Optimizer's Fancybox, and is setting titleShow: false...hiding your descriptions.

    Ideally, if you want to continue using Optimizer's Fancybox (and only load the necessary scripts and styles on pages with the [nggallery id=x] shortcode), it would be best to remove these sitewide Fancybox files from your theme. But for a quick fix, you could probably just remove or comment out the /* Fancybox */ block in your footer-scripts.js file.

    Hope this helps!

    Cheers,
    Mark.

    PS. The 'titlePosition':'outside' setting you've gone for will show your descriptions in white text, so you may want to darken the lightbox overlay (for higher contrast) by changing 'overlayOpacity':0.3 to a higher value (max is 1).

  5. samaralife
    Member
    Posted 1 year ago #

    Hi Mark,

    Thanks for the update. I have looked into the theme files and see that Fancybox is not just a footer-related thing. I now realise why thumbnail pics (after I changed the theme to the current one) started showing with the Fancybox effect instead of just in a separate window like I set them.

    I am afraid I won't be able to safely delete the Fancybox from the theme files. I cannot be certain that deleting it won't ruin the theme functionality. Besides, I like how thumbnails are showing.

    I guess I will have to disable the plugin. Though here there's another mystery. When I disabled it a few days ago, the pics in galleries started behaving weirdly - they were shown in both NGG own style (with description) and Fancybox style.

    Anyway, thanks for your help.

  6. samaralife
    Member
    Posted 1 year ago #

    Actually, I deleted Fancybox part from the footer js file you mentioned and changed the opacity to 1 and it worked - I have descriptions! Long descriptions are also fully visible!

    Thank you so much!

    Andy

  7. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Andy,

    No worries. Glad I could help.

    Quick tip: If you want to adjust the overlay color, you can also add 'overlayColor':'#666' (replacing #666 with your desired hex color code).

    Cheers,
    Mark.

  8. fredel
    Member
    Posted 1 year ago #

    Hey Mark,

    sorry for reopening but i got a similar issue. would be great if you may have a look at http://bergtour-online.de/allgemein/gallerytest/

    the titles are not shown even i changed the nextgen-gallery-optimizer/nextgen-optimizer-scripts-and-styles.php - but it seems its inactive but i cannot find anything in the footer.

    thx so much,
    fritz

  9. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Fritz,

    I've just been looking through your source code. The reason you're not seeing titles in Fancybox is because you don't have the title="" attribute present on your image anchor tags.

    It looks as though you've edited NextGEN's gallery template...is this correct? The HTML structure is rather different than the default. If so, you'll need to add the title attribute back in (and maybe lose the closing p tags too so it validates).

    If you need the original file again to start over, just download the NextGEN Gallery zip file to your computer and copy the template file (nextgen-gallery/view/gallery.php) to the same directory on your server.

    Hope this helps!

    Cheers,
    Mark.

    PS. You'll also need to make sure your images have their "Description" field filled in at Gallery --> Manage Gallery --> "your_gallery_name" for titles to display.

  10. fredel
    Member
    Posted 1 year ago #

    Hey Mark, thanks very much for the detailed feedback!
    i will check this up, even i didnt made any changes - maybe my buddy did! thx so much
    fritz

  11. fredel
    Member
    Posted 1 year ago #

    sorry again, just updated nextgen so ist should habe the original source code. problem still exists ;(

  12. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Fritz,

    You may want to check your currently active theme for a folder named "nggallery". Any template files in that folder are designed to override the originals, and won't be touched during a plugin upgrade.

    If that folder isn't present, you may also want to check that NextGEN's HTML output hasn't been hard-coded into your post/page via the editor or a page template.

    Cheers,
    Mark.

  13. fredel
    Member
    Posted 1 year ago #

    hey mark,

    thanks again! checked this, cant find the folder in the the dir and theres also no html in the article php.

    huuummmm....

    best regards
    fritz

  14. fredel
    Member
    Posted 1 year ago #

    i have some plugins within the theme that come by default, eg
    dp-flickr-widget, gallery-to-slideshow & tabber-tabs-widget

    do you think this may cause an issue...

    i know its not your business but maybe you find some minutes checking this :)

    thxxx

  15. fredel
    Member
    Posted 1 year ago #

    PS: nextgen-gallery/view/gallery.php ist shown as (inaktive)

  16. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Fritz,

    How puzzling! :)

    There could be a conflict somewhere, but it's difficult to detect anything further from the front-end. If you'd like to email me a temporary administrator login for your site, I'd be happy to take a look for you.

    It's okay that the gallery.php file shows as inactive. That's just because it's not being loaded in the admin.

    Cheers,
    Mark.

    PS. Thanks for the donation too...that's much appreciated!

  17. fredel
    Member
    Posted 1 year ago #

    just sended! thx in advance!

  18. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Fritz,

    Thanks for the details.

    It's a bit of a tricky one this, but it would appear it's your Gonzo theme that's reformatting NextGEN's output and removing the titles. I've tested it on my development site and get the same results you're seeing.

    I'm not sure exactly what's causing it, but will continue to investigate...

    Cheers,
    Mark.

    PS. You should be able to verify this by briefly switching to another theme (such as Twenty Ten/Eleven/Twelve).

  19. fredel
    Member
    Posted 1 year ago #

    Hey Mark,

    thanks again for feedback! I even looked at Gonzo but also they cannot say what causing ist. Would be great if you may figure out...

    Thanks,
    Fritz

  20. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Fritz,

    I was thinking the Gonzo theme might be filtering the post content in order to strip out the image titles, so I just grepped the theme folder for "add_filter" and voila...we have a fix!!!

    To remove the filter, simply open up wp-content/themes/gonzo/functions.php and comment out the following line (line 104)...

    add_filter('the_content', 'remove_img_titles', 1000);

    Hope this helps!

    Cheers,
    Mark.

  21. fredel
    Member
    Posted 1 year ago #

    Mark, you are the man!! we are blind :) thank you very much!! br

  22. Mark Jeldi
    Member
    Plugin Author

    Posted 1 year ago #

    Hey Fritz,

    No worries. Glad I could help :)

    All the best with your site.

    Cheers,
    Mark.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic