Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-02-23 10:47:26

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 251
Website

Plugin for image - caption

Hello,
I need to use a tag for displaying in the article body an image, and beside it the caption.
I can do that with image and image_info, but I’d like to make this process more simplified, using just one tag.

Is there something like this on the market?
Thanks…!

Last edited by Manaus (2011-02-23 10:47:56)

Offline

#2 2011-02-23 11:01:44

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

Re: Plugin for image - caption

Manaus wrote:

using just one tag.

Your favourite stalker here :-)

One way I’ve approached this in the past is to set up a form containing the layout you want, and then pass in the name of the image(s) you want to see in that space. For example, in your body:

<txp:output_form form="gallery">my_pic.jpg</txp:output_form>

And in form gallery:

<txp:images name='<txp:yield />'>
<txp:image />
<txp:image_info wraptag="span" class="caption" />
</txp:images>

This has the advantage that your users can list the images they want to see:

<txp:output_form form="gallery">my_pic.jpg, other_pic.jpg, another_shot.jpg</txp:output_form>

It’s “one tag” to learn and might still be a little too geeky for your users. Perhaps to ease the load further, you might be able to configure this into, for example, upm_quicktags or another similar plugin like rah_textile_bar? I’ve never explored it, but it might work as I think they both allow customisation of the button bar. Then you could perhaps pop up a dialog box to prompt someone to enter the name(s) of the images they wanted to see and drop them into the <txp:output_form> tag on their behalf.

btw, I’m working on a plugin that might help in this regard, but it won’t be ready for a while yet.

Last edited by Bloke (2011-02-23 11:03:35)


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

#3 2011-02-23 11:09:31

Manaus
Member
From: Turin, Italy
Registered: 2010-10-22
Posts: 251
Website

Re: Plugin for image - caption

Thanks Stef, very kind and very helpful

Offline

#4 2011-02-24 12:29:09

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: Plugin for image - caption

bloke this looks like something that should be on txptips


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

Board footer

Powered by FluxBB