Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-07-02 15:24:12

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

[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

upm_textile

Just wrap the area you want textile on with the tags.

Last edited by FireFusion (2007-07-02 15:30:18)

Offline

#3 2007-07-02 16:21:44

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

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

#4 2007-07-05 22:27:15

mwillse
Member
From: brooklyn, ny
Registered: 2006-06-26
Posts: 83
Website

Re: [request] textile in caption field

I how would you access write the caption field using raw php? thanks!

Offline

#5 2007-07-06 06:28:57

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

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

#6 2007-07-06 08:47:16

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

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

#7 2007-07-06 09:23:41

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

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

#8 2007-07-06 10:29:20

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

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

#9 2011-07-14 06:00:00

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

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

#10 2011-11-22 07:22:22

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 248
Website

Re: [request] textile in caption field

I’m interested. I’m thinking of how to develop

Offline

#11 2011-11-22 09:13:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

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

Board footer

Powered by FluxBB