Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Lightbox and links to attachment page
(1 viewing) (1) Guest
"ARI Fancy Lightbox" WordPress plugin
Go to bottomPage: 1
TOPIC: Lightbox and links to attachment page
#72120
Lightbox and links to attachment page 1 Month ago Karma: 0
Mostly resolved. See second post. Just need to figure out how to make attachment pages be in the anchor link without being injected into the lightbox.

When using Tiled Gallery Carousel Without JetPack and using WordPress's wp_attachment_pages_enabled set to 1, the lightbox states:

The requested content cannot be loaded. Please try again later.


When 'Tiled Gallery Carousel Without JetPack' is disabled, the lightbox shows the attachment page instead of the image in a lightbox. Odd but rather interesting as this allows you to use ARI Fancy Lightbox with native WP comments. But images cannot be zoomed in due to using WP's attachment page view.

This happens on a fresh WordPress install having disabled all plugins except Tiled Gallery Carousel Without JetPack + ARI Fancy Lightbox, use the default WordPress theme, and having wp_attachment_pages_enabled set to 1. The lightbox for Tiled Gallery Carousel Without JetPack is disabled. It took a few hours to pin down this scenario. When wp_attachment_pages_enabled set to 0 the lightbox works. But I like having the WP attachment page as it gives a way for users to be able to create native WP comments on those images. Tiled Gallery Carousel Without JetPack bypass's the forced image option, but I was able to override Carousel by modifying various files to link to the image. Sadly though the image link to the attachment page for comments is not possible in this scenario. Either I can have a functioning lightbox with no image link to attachment page (comments/metadata) or have the gallery be able to link to those attachment pages (that show comments, author, upload date, description) but breaks the lightbox.

Perhaps there is a scenario I'm not seeing? Regarding comments not only do many people avoid Facebook, I'll be able to have on-site notifications for native WP comments which makes for a far better user experience. Most WordPress sites have wp_attachment_pages_enabled set to 1 as this has been the default until recently.
Last Edit: 2024/07/31 21:53 By Josh.
The administrator has disabled public write access.
 
#72121
Re:Lightbox Breaks with Tiled Gallery & Attachment 1 Month ago Karma: 0
The good news is that I mostly resolved the above issue by comparing DOM elements and realizing the class 'ari-fancybox-iframe' was missing from the anchor wrapper. I modified the output of tiled-gallery.php to include the class which removes the request failure.

The final issue now is that ARI Fancy Lightbox opens the WP attachment page inside the lightbox instead of the traditional image view that allows image panning. This happens for Jetpack as well for WP installations that have wp_attachment_pages_enabled set to 1. Perhaps this could be resolved with a Custom grouping selectors? Played around with a few. Based on older threads found the usage of $$A to produce:
Code:

.tiled-gallery$$A


This successfully groups the proper images. But the attachment page still shows instead of the images with panning:



Edit: It turns out the class 'ari-fancybox-iframe' while it makes the attachment page anchors work for Ari FancyLightbox, even when anchors point to .jpg, the class 'ari-fancybox-iframe' causes the lightbox to open the media attachment page instead of the image.
Last Edit: 2024/07/27 18:05 By Josh.
The administrator has disabled public write access.
 
#72122
Re:Lightbox Breaks with Tiled Gallery & Attachment 1 Month ago Karma: 754
When it is configured to link images to attachment pages then anchors will contain links to attachments page (with image and comments) instead of direct link to images. The lightbox opens such pages into an iframe without specific image features (like zoom).

Regards,
ARI Soft
The administrator has disabled public write access.
 
#72125
Re:Lightbox Breaks with Tiled Gallery & Attachment 1 Month ago Karma: 0
Makes sense. Trying to think of a work around. Above attempted to provide a way to link to the attachment page to show more image data such as author, taken date, description. So I'll concede and have the image anchors point to .jpg's. Below is functional PHP code that shows various image data:

Code:


// Post ID
$post_id = $the_post->ID;
// Post object
$the_post = get_post( $post_id );
// Post Title
$post_title = get_the_title($post_id);
// Get user object
$recent_author = get_user_by( 'ID', $the_post->post_author );
// Get user display name
$author_display_name = $recent_author->display_name;
echo '<p>'. $post_title. '</p>'; // Post Title
echo "<p>By " . $author_display_name . "</p>"; // Author Username
echo "<p>Uploaded on " . $the_post->post_date . "</p></p>"; // Post date




Are there any PHP hooks or things to call that can append these items to the lightbox view? I'm good with CSS so placing it in a good position, assuring it's responsive with the gallery is quite do-able. Even willing to edit a PHP file to place it in, albeit I could not figure out which file is controlling the DOM. Seems to be dynamically generated through JavaScript?
The administrator has disabled public write access.
 
Go to topPage: 1