Displaying text, links and descriptions in Lightbox

videosc

Joined: 2008-01-24
Posts: 9
Posted: Tue, 2008-02-05 23:36

I hesitate to post this since I suspect there is a really simple solution, but after searching these forums I can't find it so here it goes:

I am trying to get text (preferably a URL link) to show up under an image when displayed in the Lightbox. The idea is that someone would click on a thumb and that brings up a larger image via Lightbox. Then there should be some descriptive text and a link at the bottom of the Lightbox image that someone could click on to be taken elsewhere. I've seen this done on some sites but am not sure if they use G2.

I included text in the "Description" field within G2 but don't see how to get this to show up in the Lightbox via WPG2.

Again, please be kind if this is a really easy fix.

I also had a related question... how would one go about modifying the default navigation text that is displayed in Lightbox?

Thanks!

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Wed, 2008-02-06 21:59

videosc,

Yes lightbox can do this although no logic exists in WPG2 3.0 to actually add in text (or descriptions). I can raise a feature request to add this to WPG2 3.1 if you want..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
videosc

Joined: 2008-01-24
Posts: 9
Posted: Fri, 2008-02-08 19:40

ozgreg, do you know how to get the text to show up in Lightbox?

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sat, 2008-02-09 01:08

Yes, the lightbox website has a clear example on how to do this..
___________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
videosc

Joined: 2008-01-24
Posts: 9
Posted: Thu, 2008-02-14 01:48

Thanks ozgreg for that link. For anyone else curious about this here is what was said on that site:

Quote:
Can I insert links in the caption?
Yes, but you need to convert quotes and greater and less than symbols into their html entity equivalents. For example:

<a href="images/image-4.jpg" rel="lightbox" title="&lt;a href=&quot;link.html&quot;&gt;my link&lt;/a&gt;">Image</a>

So from playing around with this I figured out that you need to look in the code of your WP post (after you inserted some G2 images) and find the "title" section, then replace it with the above code, substituting your URL and info. For the URL you must include the complete address with http://, etc.

This seemed to work but oddly enough when I went back to edit the WP post a second time the new code was missing. It seems like there is something within WP that is causing this. I'll have to experiment further to figure out what. But at least I'm closer to my objective! :)

 
videosc

Joined: 2008-01-24
Posts: 9
Posted: Fri, 2008-02-15 15:18

I have one final follow up question: do you think I described the proper way to get URL links to show up in the Lightbox window, by editing the code within WP? Or should I be able to add the code in the description field within G2?

I tried adding this in the G2 description field:

&lt;a href=&quot;http://link.com&quot;&gt;My Link&lt;/a&gt;

But it didn't work. No caption showed up in Lightbox.

It would sure be easier if I could add URL's within G2 instead of the WP post editor.

Thanks again!

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sun, 2008-02-17 11:00

Hiya Videosc,

Basically the WPG2 would have to generate this code for you as part of the IMG tag. Code to do this is on the development radar but not until WPG2 3.1

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo