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?

Titel and Caption
(1 viewing) (1) Guest
"ARI Fancy Lightbox" WordPress plugin
Go to bottomPage: 12
TOPIC: Titel and Caption
#68182
Titel and Caption 2 Years, 9 Months ago Karma: 0
Hello Support

I purchased the plugin and i'm very satisfied with it.
I'm using it together with the plugin justified image gallery (JIG) and it works perfect.

One little point i would like to change. Is it possible to show the title and caption in the lightbox.

like this
Titel -> 1. line
Caption -> 2. line

Below you see the html-code which is generated from JIG.


Code:


class="justified-image-grid-html" data-lazy-src="skiplazyload" data-src="skipunveillazyload"><ul><li><a href="......./2021/08/thumbnails/Walenpfad_210819_092938-1365x1024.jpg" title="Engelberg - Ristis - Brunnihütte - Walenalp - Walegg - Chrüxhütte - Fell"><img src="........../justified-image-grid/timthumb.php?src=https%3A%2F%2Fccccccc.com%2Fwp-content%2Fuploads%2F2021%2F08%2Fthumbnails%2FWalenpfad_210819_092938-1365x1024.jpg&amp;h=600&amp;q=90&amp;f=.jpg" alt="Walenpfad [19.08.2021]" width="799" height="600" /></a><p class="jig-HTMLdescription">Walenpfad [19.08.2021]<br/>Engelberg - Ristis - Brunnihütte - Walenalp - Walegg - Chrüxhütte - Fell</p><



from jig-HTMLdescription:
Title -> Walenpfad [19.08.2021]
Caption -> Engelberg - Ristis - Brunnihütte - Walenalp - Walegg - Chrüxhütte - Fell

thx for your help

cheers
Meggs
The administrator has disabled public write access.
 
#68186
Re:Titel and Caption 2 Years, 9 Months ago Karma: 748
Hello,

Could you provide a link to a sample page?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#68195
Re:Titel and Caption 2 Years, 9 Months ago Karma: 0
Hello Support

Unfortunately, this is not possible because this site has access protection from outside.
What do you need? Above you see the html-code for one photo, which is generated from the plugin jig

Cheers,
Meggs
The administrator has disabled public write access.
 
#68200
Re:Titel and Caption 2 Years, 9 Months ago Karma: 748
Try to populate "Custom JS code" parameter on "ARI Fancy Lightbox -> Settings -> Advanced" page with the following code:

Code:


$('.justified-image-grid-html li').each(function() {
    var $item = $(this), $a = $item.find('a'), $descr = $item.find('.jig-HTMLdescription');
    var descr = ($descr.html() || '').split(/<br\s*\/?>/);
    var title = descr[0], story = descr[1];

    if (title) {
        $a.data('title', title);

        if (story) {
            $a.data('description', story);
        }
    }
});



If it doesn't help, could you reproduce a sample gallery on a public test site so we can help you?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#68201
Re:Titel and Caption 2 Years, 9 Months ago Karma: 0
thank you for your answer. But it doesn't work.

if I use not your code and disable all options (smart titel, Convert file name to title, Get title from EXIF data) the content of the WP-image field "description" is displayed.
In our example -> "Engelberg - Ristis - Brunnihütte - Walenalp - Walegg - Chrüxhütte - Fell" but "Walenpfad [19.08.2021]" is not displayed. Walenpfad [19.08.2021] is the content of the WP-image field "title".

If you can only display the content of <p class="jig-HTMLdescription"> or you could cut <p class="jig-HTMLdescription"> from the code fragment below we would have reached our target.
<p class="jig-HTMLdescription">Walenpfad [19.08.2021]<br/>Engelberg - Ristis - Brunnihütte - Walenalp - Walegg - Chrüxhütte - Fell</p><

But i think the better way is we put title and description with variables from the code together.

alt="Walenpfad [19.08.2021] -> WP-image field "title"
title="Engelberg - Ristis - Brunnihütte - Walenalp - Walegg - Chrüxhütte - Fell"> -> WP-image field "desciption"




Cheers
Meggs
Last Edit: 2021/09/15 20:06 By Meggsico.
The administrator has disabled public write access.
 
#68202
Re:Titel and Caption 2 Years, 9 Months ago Karma: 0
something else. with the following code from your forum only "Walenpfad [19.08.2021]" is displayd in the lightbox

setTimeout(function() { $('.ari-fancybox>IMG').each(function() { var $img = $(this), $a = $img.parent(), alt = $img.attr('alt'); if (alt) $a.data('caption', alt); });});

Maybe it helps you
The administrator has disabled public write access.
 
Go to topPage: 12