Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#331 2009-06-12 16:38:25
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] [ORPHAN] upm_image: More powerful image display
You can wrap the image + caption in a div and give it the width of your image, and add text-align: center; to .caption.
Offline
#332 2009-06-12 16:47:46
- Rexel
- Member
- Registered: 2005-11-18
- Posts: 26
Re: [plugin] [ORPHAN] upm_image: More powerful image display
put the image and the caption in a div and center the caption within it.
an extra markup in the source but the caption will wrap inside the div if it’s longer than the image that way the caption can’t pass the image, stay under it and centred.
Els beat me to it, lol
Last edited by Rexel (2009-06-12 16:52:50)
Offline
#333 2009-06-12 17:11:00
- Gulfcoast
- Member
- Registered: 2009-04-12
- Posts: 76
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Got it! Thanx guys.
Offline
#334 2009-06-27 13:02:23
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Hello everyone!
I want to perform one non-standard action in database: replace <upm:image…> staff to its actual visiual presentation. I mean static HTML.
So steps are:
1) search Body entries for <upm:> expression
2) find image (and thumb) dimensions in associated image_id parameter
3) replace Body containment with static HTML which is written in special form for <upm:image>
For my bad luck I am not a MySQL professional. Can anybody give some advices how to do this?
Offline
#335 2009-07-11 22:38:58
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Hi,
upm_image is my favourite image tag, but I need some guidance!
I must be being particularly dense this morning because I’m trying to implement the following scenario & I’m struggling:
1) Article has mulitple images associated with it (in this case 4)
2) All images to be output together on a page but each image requires a <div> wrapped around it
In the page I’ve got:
<txp:article >
<txp:upm_article_image show_width="0" show_height="0" form="image_wrap" />
<txp:body/>
</txp:article>
In form “image_wrap” I’ve tried:
<div>
<txp:upm_article_image />
<txp:upm_img_caption />
</div>
- this produces the caption once for each image but all 4 images each time
and this:
<div>
<txp:upm_image />
<txp:upm_img_caption />
</div>
complains about a lack of image being requested.
Should I be using <txp: upm_img_list>, I so how?
And on a side note an option to duplicate the image’s alt text as it’s title would be handy. That way I only have to fill in the Alternate Text and have the plugin output it as the title, as well as the alt.
Offline
#336 2009-07-12 00:04:28
- masa
- Member
- From: North Wales, UK
- Registered: 2005-11-25
- Posts: 1,095
Re: [plugin] [ORPHAN] upm_image: More powerful image display
gomedia wrote:
1) Article has mulitple images associated with it (in this case 4)
2) All images to be output together on a page but each image requires a <div> wrapped around it
Adi,
I’m not sure if that helps, but upm_image has a plethora of attributes. Have you looked into break="value" for <txp:upm_article_image /> ?
And on a side note an option to duplicate the image’s alt text as it’s title would be handy. That way I only have to fill in the Alternate Text and have the plugin output it as the title, as well as the alt.
I think you could use title="<txp:upm_img_alt />". I’m posting one of my forms below as an example; just needs adding the title attribute.
<p><img class="caption" src="<txp:upm_img_full_url />" width="<txp:upm_img_full_width />" height="<txp:upm_img_full_height />" alt="<txp:upm_img_alt />" /></p>
<p class="caption"><txp:upm_img_caption /></p>
Offline
#337 2009-07-12 00:29:16
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Martin, thanks for the reply.
masa wrote:
I’m not sure if that helps, but upm_image has a plethora of attributes. Have you looked into
break="value"for<txp:upm_article_image />?
Not yet. The fact that I get 4 individual <div>s, each with unique captions (but with all 4 images every time) makes me think that I’m doing is almost right. But it’s a good point nonetheless.
I think you could use
title="<txp:upm_img_alt />". I’m posting one of my forms below as an example; just needs adding the title attribute.
You’re right. It was just a suggestion so that the plugin could do the legwork!
Offline
#338 2009-07-13 08:28:17
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
- Don’t forget about the
wraptagattribute. - You only need to specify a form for upm_article_image if you’re going to customize the output in a way that the built-in doesn’t allow you to do (in which case do something like what Martin posted; use the tags in the “Customising Output” section of the plugin help).
Offline
#339 2009-08-14 22:58:38
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Although I’m able to achieve something using smd_gallery, I would like to know if it’s possible to do it with upm_image plugin. I’ve tried this in the past, but with no luck.
Nothing really fancy, just this: an article has some images assigned (comma-separated ids on article image field).
I want the first one to be output as a full image, and the remaining images as thumbnails.
Reading the documentation, it seems that the way (the only way?) to achieve this using upm_image plugin is by using the wrapform attribute in tandem with upm_img_list. The problem is that it’s not very clear (for me, at least) how to use them together.
Others have asked similar questions in the past (on this same thread), but there weren’t any answer for them.
So far, I’ve tried the simplest thing:
<txp:upm_article_image wrapform="article_img_list" />
And on form article_img_list:
<txp:upm_img_list />
Using just that, I get the following error message:
Tag error: <txp:upm_img_list /> -> Textpattern Notice: upm_image: invalid context, tag must be used within the tag as a wrapper or from its own form called by the tag. on line 561
I’ve tried a few variations that didn’t output any error message, but didn’t output anything at all either.
What’s the solution for this riddle?
Offline
#340 2009-08-16 09:09:09
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
I don’t know exactly what markup you’re looking for, but this should get you started:
<txp:upm_article_image limit="1" type="image" />
<txp:upm_article_image offset="1" type="thumbnail" />
Offline
#341 2009-08-16 16:25:42
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Hi Mary.
Thanks for the reply.
That code will certainly do it.
But now… I really want to know the mysterious behind wrapform and <txp:upm_img_list />. :)
Offline
#342 2009-08-18 03:26:32
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
If memory serves, what you tried should work, albeit it wouldn’t be the output desired. Could be there’s a bug there, I’ll have to take a look.
Offline
#343 2009-12-03 22:39:04
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Hey Mary, wonder if you can help me out with this: when I use the upm_article_image tag like this…
<txp:upm_article_image wraptag="ul" class="galleria" break="li" show_alt="yes" show_title="yes" />
…it works great unless I only have one article image, when for some reason it’s output leaves out the <li></li> tags around the single <img> tag. This causes a problem with the Galleria plugin I’m using on my site, because the CSS I’m using requires the li tag around the img tag. Any help on this is much appreciated.
Last edited by aswihart (2009-12-03 23:20:22)
Offline
#344 2009-12-03 23:27:23
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] [ORPHAN] upm_image: More powerful image display
aswihart wrote:
…it works great unless I only have one article image, when for some reason it’s output leaves out the <li></li> tags around the single <img> tag.
Looks like expected behaviour, the plugin help says this:
break="value"If using multiple images and the wraptag parameter, the (X)HTML tag to separate images with.
I assume that using the form attribute or the container tag (and putting the <li> tags inside the form or container) will solve it.
Offline
#345 2009-12-03 23:58:12
Re: [plugin] [ORPHAN] upm_image: More powerful image display
doh! sorry that was an easy solution. Actually I was having problems using the form earlier with that Galleria plugin for some reason and switched to using the self-closing tag because it worked. Now the form is working fine and my single image articles get there li just like everybody else. Thanks Els!
Offline