Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#196 2007-08-07 14:21:39
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
I was thinking of when an article is illustrated with 20+ different images spread all over.
Hmm, yeah, that is a little tougher. The simplest way I can think of is creating a special tag for that purpose (say “upm_image_query”?), which you use in your article/page/form before your multiple calls to upm_image, combined with the caching we talked about above.
And perhaps a fetch_images function would make a useful addition to the core.
Yes, I think it would, definitely.
Offline
#197 2007-09-03 15:27:01
- gerhard01
- Plugin Author
- Registered: 2006-12-07
- Posts: 108
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Hi Mary,
I have problems installing your plugin: I get an “malformed plugin code” error. Compressing plugins helped for other plugins. Would it be possible for you to provide a compressed version of your plugin?
Thanks a lot!
Offline
#198 2007-09-05 13:53:31
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Yes, I had already intended to do so, once I get a free moment.
Offline
#199 2007-09-05 14:32:52
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Mary, regarding those posts above about the number of queries, I gave it another thought. Adding a callback to textile_main_fields in txp_article.php would allow to automatically add an upm_image_query tag on top of the article’s html version.
edit : oh, maybe the textile class already has a callback function?
Last edited by guiguibonbon (2007-09-05 14:35:29)
Offline
#200 2007-09-13 14:02:54
Re: [plugin] [ORPHAN] upm_image: More powerful image display
hey mary? I’m trying to get my head around how multiple article images work ( I had no clue this was possible except when I saw it mentioned on your plugin’s help), and I’m wondering how / if there’s a way I can achieve this.
I need to assign IDs to either the images, or to the containers for the images. Obviously, different ID’s to different images.
<p id="img1"><img src="myimage.jpg"></p><p id="img2"><img src="myimage2.jpg"></p>
or
<p><img src="myimage.jpg" id="img1"></p><p><img src="myimage2.jpg" id="img2"></p>
It's easy enough to add an ID to individual images, but when working with multiples I'm not sure how to go about this.
Any hints?
Thanks!
Last edited by kemie (2007-09-13 14:05:43)
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
#201 2007-09-20 12:56:46
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Well, you know how all images have ID #s that they are identified by? You could use that. The plugin has a upm_img_id tag. If you’re wanting proper sequential numbering that disregards what the image’s actuual ID number is, then I would make use of zem_nth.
Last edited by Mary (2007-09-20 12:57:07)
Offline
#202 2007-09-20 14:57:38
Re: [plugin] [ORPHAN] upm_image: More powerful image display
thanks, mary, i’ll try that!
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
#203 2007-10-08 02:18:43
Re: [plugin] [ORPHAN] upm_image: More powerful image display
I think I’ve missed something, but…
I’m trying to output the raw url of the article image.
Context: article’s form displaying the current article.
I’ve tried:
<txp:upm_article_image form="upm image src" />
With <txp:upm_img_href /> in the form
And I’ve tried:
<txp:upm_article_image type="image"><txp:upm_img_href /></txp:upm_article_image>
Same for both, they output nothing.
Any idea?
Offline
#204 2007-10-08 03:33:13
- Logoleptic
- Plugin Author

- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Jeremie wrote:
I’m trying to output the raw url of the article image.
Context: article’s form displaying the current article.
Give this a shot:
<txp:upm_article_image>
<txp:upm_img_full_url />
</txp:upm_article_image>
Offline
#205 2007-10-26 15:59:31
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Can anyone give an example of how to use <txp:upm_img_href /> as a wrapping tag in a form, as mentioned in the help (quoted below)?
<txp:upm_img_href />
Description: website url to make the image link to, as passed by the url parameter.
If used as a wrapping tag, it will turn whatever it surrounds into a link.
Maybe I’m making things to complicated…Thanks for any help.
Last edited by nabrown78 (2007-10-27 15:06:52)
Offline
#206 2007-10-27 15:06:38
Re: [plugin] [ORPHAN] upm_image: More powerful image display
To Jeremy:
Logoleptic is correct, upm_img_full_url is what you want to output the full url of the image. upm_img_href will out put whatever is specified in the “url” attribute of the <txp:upm_image /> tag. It is intended to make it possible to make the image a link, but I can’t figure out quite how to use it.
Last edited by nabrown78 (2007-10-27 15:07:17)
Offline
#207 2007-10-29 19:12:12
- Logoleptic
- Plugin Author

- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: [plugin] [ORPHAN] upm_image: More powerful image display
nabrown78 wrote:
Logoleptic is correct,
upm_img_full_urlis what you want to output the full url of the image.upm_img_hrefwill out put whatever is specified in the “url” attribute of the<txp:upm_image />tag. It is intended to make it possible to make the image a link, but I can’t figure out quite how to use it.
I’ve never had occasion to use <txp:upm_img_href />, so I’m not entirely certain how it works. Based on the documentation, however, it would seem to be most useful when you want more than just your image to be a link. If you just want the image to link to something, you’d only use the url attribute; if you want the image and the caption below it to link to something, you’d use upm_img_href as a wrapping tag around both. Apparently it gets the URL for the link from the url attribute of the contained image tag.
This seems like an awkward approach, at least at face value, but it’s what I can surmise from the instructions. I’ve sometimes had to experiment with this plugin to see what all the tags do. So far the results have seemed pretty logical, and the documentation ended up making more sense retroactively. If you try something similar yourself, please let us know what you find out about the upm_img_href tag; it’d save us some trouble. :-)
I know that Mary is really busy, but if there’s one “feature” I’d request for this plugin it would be code examples in the docs. Good docs can make a world of difference for users, especially with a relatively complex and feature-rich plugin like this one. I think zem_contact_reborn does a great job on this front. Its documentation gives you just enough starter material to get going, and closes with some hints at the incredible flexibility that’s possible for more advanced users.
Offline
#208 2007-12-16 00:05:13
- Logoleptic
- Plugin Author

- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: [plugin] [ORPHAN] upm_image: More powerful image display
I’m doing a test upgrade from 4.0.4 to 4.0.5 on localhost, and I hit the following error right after login:
A problem occured while loading the plugin: upm_image -> User_Warning: Duplicate entry '1-upm_image_load_script' for key 1
insert into txp_prefs set
name = 'upm_image_load_script',
val = '1',
html = 'yesnoradio',
prefs_id = 1,
type = 2,
event = 'admin',
position = 0
on line 84
The txp_prefs has only one entry for upm_image_load_script, I assume because Txp stopped trying to add another when it encountered the error. The message has not appeared again. Should I be concerned, or just go about my business?
Offline
#209 2007-12-16 08:30:08
Re: [plugin] [ORPHAN] upm_image: More powerful image display
I can’t remember where it was posted, but this kind of error message occurred a lot when upgrading, and can be safely ignored.
Offline
#210 2007-12-16 18:05:20
- Logoleptic
- Plugin Author

- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Thanks, Jonathan. :-)
Offline