Closed (fixed)
Project:
Colorbox
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
25 Sep 2011 at 11:01 UTC
Updated:
14 Oct 2011 at 19:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
frjo commentedI have been meaning to add this but never got around to it. Thanks for reminding me!
Please try the attach patch and report back your results here.
Comment #2
benmalen commentedThank you so much, frjo! I applied the patch and it works great.
I have one problem however, as I want to show an actual URL in the caption but the tokens are stripped of all HTML.
For example, currently it will output something like this:
I want to output with encoded HTML like this:
I had a go at making modifications, but unfortunately I am a bit rusty on the development side so it did not work out. I hope you may be able to help me with this.
Comment #3
kaylsbeth commentedI also applied the patch, frijo, and it worked beautifully! Thank you!
Comment #4
frjo commentedCommitted to 7-dev.
@benmalen, I don't believe HTML is allowed inside the title attribute. That’s why Drupal l() function that colorbox use to build link strips it out.
Comment #5
benmalen commentedHmm, I used to use Lightbox and you could use HTML in the caption so I was hoping this could be done with Colorbox.
http://www.huddletogether.com/projects/lightbox2/
I guess I can make do without. Thanks again.
Comment #6
andyposttoken_replace() is a core's function, so there's no dependency on token module. Field settings could be stored in-code or provided with features module. Token is useful when you editing setting.
Code should be:
Comment #7
andypostI mean this! Only settings are depends on token module
Comment #8
frjo commentedThanks for catching my mistake andypost, committed the fix to 7-dev now.
Comment #9
kaylsbeth commentedSo, here's a question stemming, I think, from the tokens. I want to create a space for lengthier captions to exist using these tokens... in theory I could do this with title, but it's not long enough. How can I tie something up with each separate image that I could then use the tokens to implement? IE a separate caption field for each image. When Image wasn't tied up with the core in 6, this might have been a bit easier... I'm just hoping I won't have to create a new content type to try and get this to work.