displaying info beneath image

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

displaying info beneath image

garaiburu
Hi

I just started playing around with Shadowbox2 which is great, but I can't figure out how to get text to display in the info box. I'm wanting to include some explanatory text beneath each image in the info box and assumed this would work in the same way that adding title works i.e. title = "image title" so info would be info = "info about image" But having tried that it's clearly wrong since no info displays. Anyone know how to do it?
Here's an example of what I tried
...rel="shadowbox" title= "big pic" info ="info about image"   href="large/pic.jpg"><img etc...  
 Can anyone let me know what I'm doing wrong, or what I should actually do?

cheers

John
Reply | Threaded
Open this post in threaded view
|

Re: displaying info beneath image

Wizzud
The first thing to do is search this forum for 'caption' or 'title'.
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: displaying info beneath image

garaiburu
Hi

I did that before posting and while there's a good bit of discussion about shifting the title to beneath the image (for example) no one mentions having any issues with inserting a caption beneath the image, which makes me suspect that I'm missing something very obvious or its trickier than I imagined. do you know how I should do it?

cheers

John
Reply | Threaded
Open this post in threaded view
|

Re: displaying info beneath image

Wizzud
If it was that obvious I doubt that you would have missed it. And, in fact, you didn't miss it ... because it wasn't there to miss! Nowhere in the documentation or examples does it even hint at the possibility of being able to configure a text 'caption' in the info/navigation area.

That's not to say it can't be done, but I'm afraid it's (currently) down to you to do it!

Is it "trickier than you imagined"?
My imagination runs riot at times, so trying to guess what you might imagine could be considered a somewhat fruitless exercise. However, on the whole, I'd probably be biased towards "Yes".

Do I know how you should it?
Hmm ... I know how I would approach it. Is that the same thing? Possibly not.

I would consider:
- modifying the skin (js and css) to include a fixed-height shadowbox_caption DIV somewhere in the navigation (info) area
- modifying shadowbox.js to:
   - accept 'caption' as a per-link option
   - hide/show the shadowbox_caption DIV, depending on whether it had content or not
   - include (or not) the height of the shadowbox_caption DIV in the height of the inner navigation area, so as to get the Shadowbox dimensions/positioning correct
- taking great care with the length of my captions so that they stood a chance of being on full display in the majority of possible browser configurations.

I would also have to accept the consequences of my modifications with regard to future upgrades of Shadowbox.

Trouble is ... I haven't actually done it! And I have no intention of attempting it, because I can foresee all sorts of problems with height/width/position calculations that could arise from indeterminate caption lengths and DIV dimensions.
If you are willing to fix your caption height, and accept the possible consequences of a long caption either not being displayed in full, or distorting the Shadowbox, then it's certainly feasible.
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: displaying info beneath image

garaiburu
Thanks for that, saves me pulling my hair out.

cheers

john