Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[request] textile in caption field
Since 4.0.4 the caption field is used as the title attribute for images. I wonder if there is anyone out there interested in making a plugin to enable textile and html for that field…
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#2 2007-07-02 15:29:20
- FireFusion
- Member
- Registered: 2005-05-10
- Posts: 698
Re: [request] textile in caption field
Just wrap the area you want textile on with the tags.
Last edited by FireFusion (2007-07-02 15:30:18)
Offline
Re: [request] textile in caption field
Hi Robin… upm_textile does not do what I’m looking for as there is no tag for the $caption field. I’m currently using a hacked taghandlers and a very hacked bas_lightbox plugin to parse the caption texts (written in html and – sometimes – javascript) under the images.
At the moment the caption is not (as far as I know) accessible without raw php.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [request] textile in caption field
I how would you access write the caption field using raw php? thanks!
Offline
Re: [request] textile in caption field
we need to ask a programmer for that.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [request] textile in caption field
I don’t know if it suits you, but bos_image_display has options for textilizing the caption. I remember other image plugins should have done it too.
Z-
Offline
Re: [request] textile in caption field
Thanks zanza… I’m already using bas_lightbox since its release. to change all articles now would be a major task
>Edit typos
Last edited by colak (2007-07-06 10:34:13)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: [request] textile in caption field
Ok. Don’t know if bas_lightbox has the textilizing option. Maybe some other plugin can be used with bas_lightbox. If you search in the plugin archive you should find some.
Offline
Re: [request] textile in caption field
This thread is really old, but my question sort of fits in here… if anyone disagrees, I apologize.
It’s 2011 and the <txp:image_info type=“caption” /> tag is awesome!
I am curious why there isn’t a non-plugin way to turn Textile on for captions? Maybe there is a way to do it or maybe there is a really good reason why it isn’t a feature. I’m just wondering because I’ve been searching around the forum with the terms “textile” and “caption” and haven’t really found an answer.
Mainly, I just need line breaks in my captions without actually typing the html <br /> tag into the caption field after each new line. My solution thus far is to just use this php:
<txp:php>echo nl2br($GLOBALS['thisimage']['caption']);</txp:php>
The above code works fine instead of the <txp:image_info type=“caption” /> tag. However, I’d love to know if there is a better way to do it (preferably without raw php or a plugin)?
Thanks!
Last edited by photonomad (2011-07-14 14:51:32)
Offline
Re: [request] textile in caption field
I’m interested. I’m thinking of how to develop
Offline
Re: [request] textile in caption field
MarcoK wrote:
I’m interested. I’m thinking of how to develop
If you want to arbitrarily Textile stuff you now have two options. Since 4.3.0 you can directly get at the caption with the <txp:image_info />
tag so there’s no need for PHP any more. If you want to apply Textile to that (or any field) wrap it in upm_textile as mentioned earlier or use the smd_wrap plugin which has a textile transform built in. That plugin is currently beta but as far as I’m concerned it’s as good as released and is just waiting for me to get round to releasing it officially.
So before developing something else, please consider one of those alternatives to save reinventing code.
Last edited by Bloke (2011-11-22 09:14:46)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline