Forums › Forums › Slimbox2 plugin › Linking the caption to something other than the image URL
- This topic has 4 replies, 3 voices, and was last updated 13 years, 11 months ago by malcalevak.
-
AuthorPosts
-
August 25, 2010 at 5:35 pm #1573DonalMember
Great plugin, I love it and I’ve been very happily using it for a while. One feature I find a bit limiting though is the inability to link the caption to anything other than the original image file itself.
What I’d really like to be able to do is have a thumbnail image on the page that brings up the full size image when you click it. Then the caption under the (full size) image is a link to a different page relevant to the subject of the image. At the minute all the caption will seem to link to is the image file itself, which isn’t a lot of use as the full size image is already being displayed.
Maybe it’s possible to do this already – I certainly hope so. Am I just being dense and missing some obvious option I should be setting? Any advice anyone can give me on making this work would be greatly appreciated.
September 8, 2010 at 3:25 am #8950malcalevakModeratorI’m sorry it’s taken me so long to reply, I’ve been terribly busy lately.
Currently only the URL can be set as the caption, however I can certainly consider adding to the plugin.
One issue I see with your suggestion is, where would you store the relevant link? The link to the image needs to stay, as that’s what slimbox is displaying. If you come up with an adequate solution, and I find the time to implement it, I’ll be more than happy to do so.September 8, 2010 at 6:07 pm #8951DonalMemberThanks for replying, and don’t worry about the delay – when you’re providing plugins of this quality for free I don’t think any of us can complain if it takes you a while to respond to questions.
I can see the problem with where to put the URL for the caption. I don’t speak JavaScript myself so I don’t know if this is practical, but this is the first solution that occurred to me:
Personally I use the alt text as the image caption; I’m guessing that’s pretty common as it seems to be the default. Basically then I’m wondering if it would be possible to incorporate the URL into the alt text using some sort of separator token. As an example the alt text could be:
alt="http://www.linkgoeshere.com|This is the caption text for the link"
Would it be possible for the plugin to parse an alt string like this and if it finds a "|" character take whatever is before it and use it as the URL and then use whatever is after it as the caption itself?
I’ll grant you this isn’t exactly the most elegant solution in the world, but if it was possible it would be simple to use and it would make the feature an optional extra. I’m sure the separator token could be something even odder – a character combination like |*| say – if you wanted to make it more foolproof.
Anyway, this is a fantastic plugin as it is and thanks for taking the time to make it available. If you can figure out a way to make the caption linkable to any URL it would make it even more versatile and powerful, but if not I think it’s still a great piece of work.
December 8, 2010 at 10:58 pm #8952AnonymousMemberI have a related question about this plugin. What I really need is for the caption link to go to the full image no matter what size image the slimbox links to. Is something like this possible?
January 18, 2011 at 11:16 pm #8953malcalevakModeratorSorry for the delay, somehow I missed that this thread never was fully resolved.
Regarding the ability to link to something other than the image (including alternatively sized images like griswoldo is asking), in the next release (should be soon, I hope) I’ll use traditional commenting annotation similar to this:
[code:3b8fw54d]alt="/*www.google.com*/Google[/code:3b8fw54d]Hope that makes sense, and satisfies your desire.
-
AuthorPosts
- You must be logged in to reply to this topic.