Linking the caption to something other than the image URL

Forums Forums Slimbox2 plugin Linking the caption to something other than the image URL

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1573
    Donal
    Member

    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.

    #8950
    malcalevak
    Moderator

    I’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.

    #8951
    Donal
    Member

    Thanks 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.

    #8952
    Anonymous
    Member

    I 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?

    #8953
    malcalevak
    Moderator

    Sorry 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.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.