Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @barkingbird – In most cases your easiest solution would be to create a custom template for the specific display(s) your client is using so those standard HTML properties are not rendered.

    Please see this page for more details about custom templates: https://nextgen-gallery.com/templates/

    Thanks!

    – Cais.

    Thread Starter barkingbird

    (@barkingbird)

    OK, thanks. It looks like I would then edit a line or two in my renamed gallery.php file, specifically the ones with the term alttext in it, correct?:

    <!– Thumbnails –>
    <?php foreach ( $images as $image ) : ?>

    <div id=”ngg-image-<?php echo $image->pid ?>” class=”ngg-gallery-thumbnail-box” <?php echo $image->style ?> >
    <div class=”ngg-gallery-thumbnail” >
    imageURL ?>” title=”<?php echo $image->description ?>” <?php echo $image->thumbcode ?> >
    <?php if ( !$image->hidden ) { ?>
    <img title=”<?php echo $image->alttext ?>” alt=”<?php echo $image->alttext ?>” src=”<?php echo $image->thumbnailURL ?>” <?php echo $image->size ?> />
    <?php } ?>

    </div>
    </div>

    Plugin Contributor photocrati

    (@photocrati)

    @barkingbird – Personally I prefer the captions template as my base but you can use the gallery.php template as a guide as well. I suggest making a copy and keeping a back-up of your custom template as well.

    What you need to focus on are the <img> tag’s attributes. Although the alt is generally considered a required attribute look at removing it to see if that suits your needs.

    Thanks!

    – Cais.

    Thread Starter barkingbird

    (@barkingbird)

    In plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/gallery.php I tried a few things until I eventually removed lines 35 and 38, (click link to see screenshot of the lines I removed: ( https://www.awesomescreenshot.com/image/765571/3827e616acd53c8d314ccd28f99030a2 ).

    However, the image title still appears when hovering the cursor over a gallery thumbnail image. How can I prevent that from happening?

    This is the code I have on the WordPress editor screen to generate the gallery on the front-end.:

    <img class=”ngg_displayed_gallery mceItem” src=”https://rug.barkingbirdmedia.com/nextgen-attach_to_post/preview/id–1077&#8243; alt=”” data-mce-placeholder=”1″ />

    Plugin Contributor photocrati

    (@photocrati)

    @barkingbird – From that screen shot lines 35 and 38 are what you will most likely need to be working with for that specific piece of code in your custom template.

    Just make sure to change the specific display to use your custom template and also clear the image cache under Gallery > Other Options > Miscellaneous after you make the changes to the post/page.

    Thanks!

    – Cais.

    Thread Starter barkingbird

    (@barkingbird)

    Thanks! Works!

    Greg

    Thread Starter barkingbird

    (@barkingbird)

    I just came across this solution which perfectly suited my parameters.

    Adding the following snippet to just before </body> tag

    <script type=”text/javascript”>
    jQuery(document).ready(function() {
    jQuery(‘.ngg-gallery-thumbnail img’).prop(‘title’, ”);
    });
    </script>

    Plugin Contributor photocrati

    (@photocrati)

    @barkingbird – Thanks for sharing!

    – Cais.

    @barkingbird: In which file exactly do you place your snipped before </body> tag?
    Thanks!

    Plugin Contributor photocrati

    (@photocrati)

    @kay331 – Given the reference to </body> I would suspect it would be in the relevant footer.php template file in the current theme.

    – Cais.

    Thread Starter barkingbird

    (@barkingbird)

    Yeah, the theme I used for that particular website is the Avada theme and there is a section specifically for adding code to the space before </body> in the Theme Options. There is another section for adding code to the space before </head> which is where Google fonts and analytics code is added. The better themes seem to have these sections.

    Thank you! Found the section and added the code in the template I use. But I think the class .ngg-gallery-thumbnail img doesn’t work for me. Still digging! ??

    Wow, just found it! Instead of .ngg-gallery-thumbnail I had to add
    .nextgen_lightbox_pro img

    Works for me!

    Plugin Contributor photocrati

    (@photocrati)

    @kay331 – Thanks for the update!

    Also, for future reference, please contact our support team directly with any questions or concerns for NextGEN Pro displays via your member’s area at https://imagely.com/account/

    Thanks!

    – Cais.

    @photocrati – I did contact the support team directly. The answer was that I’d have to modify code within the plugin files and re-do the code notification with each update.

    So I thought that my solution might help others because it’s a popular question.

    Hope that was ok.

    Kay

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Disable alt/title tooltip display on hover’ is closed to new replies.