• Resolved rafaelmagic

    (@rafaelmagic)


    Hi,

    I disabled Lightbox

    Other Options, Lightbox Effects set to None.

    It works on Gallery. But when I go to
    Add Media, NextGen Gallery and Insert a Picture.

    It posts a picture to a page but with a Fancybox class code:
    “a class=”ngg-fancybox”

    Since I am using a 3rd party Lightbox, its interfering.

    Is there a fix or workaround? Deque Fancybox?

    Thanks,

    Rafael

    https://www.ads-software.com/plugins/nextgen-gallery/

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

    (@photocrati)

    @rafaelmagic – If you insert the SinglePic after the Lightbox Effect has been set to none it should be fine (just checked, again); I would suggest re-inserting the SinglePic(s) that you are seeing this on to try to sort this out.

    Thanks!

    – Cais.

    Thread Starter rafaelmagic

    (@rafaelmagic)

    @cais.

    I already did that and it doesn’t work.

    Light Effect is set to “None”.

    Add Media, NextGen Gallery and “Insert Into Post”, will post the following code.

    a class=”ngg-fancybox” rel=”” data-image-id=”1″ data-src=”https://www.example.com/wp-content/gallery/test/IMG_1152.JPG” data-thumbnail=”https://www.example.com/wp-content/gallery/test/thumbs/thumbs_IMG_1152.JPG” data-title=”IMG_1152″ data-description=” ” href=’https://www.example.com/wp-content/gallery/test/IMG_1152.JPG’ title=’ ‘

    img src=’https://www.example.com/wp-content/gallery/test/thumbs/thumbs_IMG_1152.JPG’ alt=’IMG_1152′ class=’ngg-singlepic ngg-none

    I looked at my SourceCode and NextGen JavaScripts are not loading but the pictures are posting with class=”ngg-fancybox” which I believe is the FancyBox css.

    Where you guys able to replicate the issue?

    My goal is too use “photoswipe” lightbox.

    I created a gallery-swipe.php files using this code.
    https://bitbucket.org/snippets/nextcellentteam/gMy8b

    Transfered it to wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view

    and enabled it:
    Gallery Settings
    NextGen Basic Thumbnails Section
    Template: (dropdown) select gallery-swipe.php

    PhotoSwipe works in NextGen Galleries, Pictures posted by WP Media but it does not work with NextGen Single Pics.

    Thank you for your time.

    Plugin Contributor photocrati

    (@photocrati)

    @rafaelmagic – Although I could not recreate it when you first reported this I have since seen it happen on a test site(?!) … I have asked one of our developers to review this issue but we do not have a timeline on when it may be sorted out.

    Thanks!

    – Cais.

    Thread Starter rafaelmagic

    (@rafaelmagic)

    @cais

    I narrowed it down a bit.

    I copied code from Nextcellents singlepic.php into file called singlepic_swipe.php in the folder
    /nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view

    and enabled it:
    Gallery Settings
    NextGen SinglePic Section
    Template: (dropdown) select: singlepic-swipe.php

    Now Add Media, NextGen Gallery and “Insert Into Post”
    Has 3 Selections
    Thumbnail= Not working it adds class=”ngg-fancybox”
    Full Size= OKAY, skips thumbnail
    SinglePic= Works using my template except for the height & weight in shortcode

    Below is the singlepic-swipe.php code that I did a subpar/hack code on.

    <?php
    /**
    Template Page for the single pic
    
    Follow variables are useable :
    
    	$image : Contain all about the image
    	$meta  : Contain the raw Meta data from the image
    	$exif  : Contain the clean up Exif data from file
    	$iptc  : Contain the clean up IPTC data from file
    	$xmp   : Contain the clean up XMP data  from file
    	$db    : Contain the clean up META data from the database (should be imported during upload)
    
    Please note : A Image resize or watermarking operation will remove all meta information, exif will in this case loaded from database 
    
     You can check the content when you insert the tag <?php var_dump($variable) ?>
     If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
    **/
    ?>
    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($image)) : ?>
    
    			<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?>
    
                   data-size="<?php echo $image->meta_data['width'] . "x" . $image->meta_data['height'] ?>">
    
    				<?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 } ?>
    
    </a>
    <?php if (!empty ($image->caption)) : ?><span><?php echo $image->caption ?></span><?php endif; ?>
    <?php endif; ?>

    Any advice to Make the Height & Width work?

    Thread Starter rafaelmagic

    (@rafaelmagic)

    I got Height & Width Working in the shortcode. Took me a while to figure it out.

    <?php
    /**
    Template Page for the single pic
    
    Follow variables are useable :
    
    	$image : Contain all about the image
    	$meta  : Contain the raw Meta data from the image
    	$exif  : Contain the clean up Exif data from file
    	$iptc  : Contain the clean up IPTC data from file
    	$xmp   : Contain the clean up XMP data  from file
    	$db    : Contain the clean up META data from the database (should be imported during upload)
    
    Please note : A Image resize or watermarking operation will remove all meta information, exif will in this case loaded from database 
    
     You can check the content when you insert the tag <?php var_dump($variable) ?>
     If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
    **/
    ?>
    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($image)) : ?>
    
    <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>"
    <?php echo $image->thumbcode ?>
     data-size="<?php echo $image->meta_data['width'] . "x" . $image->meta_data['height'] ?>">
    <?php if ( !$image->hidden ) { ?>
    <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" />
    <?php } ?>
    
    </a>
    <?php if (!empty ($image->caption)) : ?><span><?php echo $image->caption ?></span><?php endif; ?>
    <?php endif; ?>

    “Add Media” button NextGen Gallery Widget.

    Thumbnail= Not working it adds class=”ngg-fancybox”
    Full Size= OKAY, skips thumbnail & lightbox effect
    SinglePic= Works, the code in this posts allows for Height & Width in short code.

    Developer is aware of the “Thumbnail” insert bug and they will update eventually.

    Plugin Contributor photocrati

    (@photocrati)

    @rafaelmagic – Thanks for sharing your findings. We generally do not provide support for custom templates as a rule because there can simply be too many variables involved but if it was something in the core plugin functionality not working we do our best to get that sorted out.

    – Cais.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Disable LightBox in Single Pic’ is closed to new replies.