Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] upm_image: More powerful image display
:)
thank you, hakjoon…
I didnt understand that there is a new version (1.0) of upm_img_popper… sorry!
Everything makes sense now.
Offline
#17 2006-04-18 04:24:29
- Ace of Dubs
- Member

- Registered: 2006-04-17
- Posts: 446
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Thanks hakjoon!
Here is the snippet ofmy “excerpt” form.. The little brat refuses to show my upm_images..
<code><h2><a href=”<txp:permlink />”><txp:title /></a></h2>
<p class=“info”><txp:posted /> | <a href=”<txp:permlink />#discuss”><txp:comments_count /> comments</a><txp:kgr_safe_excerpt words=“65” styleclass=“plink” linktext=”→ Read More” /></p></code>
Offline
#18 2006-04-18 04:26:41
- Ace of Dubs
- Member

- Registered: 2006-04-17
- Posts: 446
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Another quick question.. is there an easy way for me to link upm_images to an article and then have the article show a larger version of the image? Am I asking for too much?
Last edited by Ace of Dubs (2006-04-18 04:26:55)
Offline
Re: [plugin] [ORPHAN] upm_image: More powerful image display
kgr_safe_excerpt strips the images.
:)
- I am Squared Eye and I
am launchinghave launched Pattern Tap
Offline
#20 2006-04-18 11:20:58
- Ace of Dubs
- Member

- Registered: 2006-04-17
- Posts: 446
Re: [plugin] [ORPHAN] upm_image: More powerful image display
D’OH!
slaps hand on forehead
I knew it had to be something dumb simple. Now all I need are clickable images and I will be in TXP heaven!
Offline
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Ace of Dubs wrote:
Another quick question.. is there an easy way for me to link upm_images to an article and then have the article show a larger version of the image? Am I asking for too much?
You could probably do something like this in your excerpt form
<txp:permlink><txp:upm_article_image type="thumb"></txp:permlink> blah blah blah your text here
then in your article form
bc..
<txp:upm_article_image> blah blah blah your text here
replace upm_article_image with upm_image as desired.
Shoving is the answer – pusher robot
Offline
Re: [plugin] [ORPHAN] upm_image: More powerful image display
I think I found a bug:
if using multiple images (= multiple images IDs in the article image input field), the “class” attribute given to “upm_article_image” isn’t being applied to any of the images in the parsed output.
thanks.
Offline
#23 2006-04-22 03:55:21
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
In lists the class is applied to the list wraptag, not individual images within the list.
Offline
Re: [plugin] [ORPHAN] upm_image: More powerful image display
OK, if that wasnt a bug, maybe this one is:
I have this article form:
<code><li><txp:permlink><txp:title /><br />
<txp:upm_article_image class=“flog” limit=“1” type=“thumbnail” /></txp:permlink></li></code></code>
I call it from a page template with <txp:article_custom section="fotolog" form="floglist" />
It outputs a list of articles, with the thumbnail.
The problem is: the first thumbnail doesnt get the “flog” class.
All the other thumbnails in the list get the “flog” class.
Second: I have noticed that when using that code (type="thumbnail"), if an image doesnt have a thumbnail asociated (= no thumbnail for that image), i get this errors:
<code>tag_error <txp:upm_article_image class=“flog” limit=“1” type=“thumbnail” /> -> Warning: getimagesize(): Unable to access /home/exaudi/public_html/images/9t.gif on line 721
tag_error <txp:upm_article_image class=“flog” limit=“1” type=“thumbnail” /> -> Warning: getimagesize(/home/exaudi/public_html/images/9t.gif): failed to open stream: Conseguido on line 721</code>
thanks for the magic, Mary.
pd: if you want, you can see the first “bug” here (look the list on the right side and check the class for each thumbnail: the first one doesnt have the class aplied).
Offline
#25 2006-04-23 06:43:22
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
What should it do/show if there isn’t a thumbnail?
Offline
#26 2006-05-01 06:49:53
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
bump:
What should it do/show if there isn’t a thumbnail?
Should it display an error message or warning? Should it display nothing at all? Or perhaps dependant upon your production setting?
That error is strange, as getimagesize() should only get run if the database says a thumbnail should be there. Did you change/remove any thumbnails outside of Textpattern? That might explain it.
The class thing is also weird.
If it’s a list the class should be applied to the wraptag, not to any of the individual list items.
Now, you’re applying limit="1", is that because you’ve got more than one article image defined for each article, but you just want the first one?
If so, that’d mean that each thumbnail would be handled by upm_article_image_list rather than upm_article_image (because of how the check is done at this moment), but then I can’t see where any of the items are getting the class from at all.
Is it possible that some of those articles have more commas then there should be? i.e: 1,,2,3,?
Offline
Re: [plugin] [ORPHAN] upm_image: More powerful image display
hi Mary. please, excuse me for not answering before.
What should it do/show if there isn’t a thumbnail?
good question! i dont know… maybe an img tag with empty src attribute?
That error is strange, as getimagesize() should only get run if the database says a thumbnail should be there. Did you change/remove any thumbnails outside of Textpattern? That might explain it.
No. I didnt create a thumbnail for those images, so I didnt change/remove any of it. The solution to the error was to… create thumbnails for those images.
If it’s a list the class should be applied to the wraptag, not to any of the individual list items.
In the following snippet (the “trouble” one) there isnt a wraptag attribute defined:
<code><li><txp:permlink><txp:title /><br />
<txp:upm_article_image class=“flog” limit=“1” type=“thumbnail” /></txp:permlink></li></code>
and the first thumb of the recent list doesnt get the class applied.
But… reading your suggestion, I have tried defining a wraptag attribute:
<code><li><txp:permlink><txp:title /><br />
<txp:upm_article_image class=“flog” limit=“1” type=“thumbnail” wraptag=“span” /></txp:permlink></li></code>
And you know what? It worked as expected! -> all the images get a <span class="flog"><img /></span>
So, a new hypothesis for the “bug”: when there is no wraptag defined, the first <img /> tag doesnt get the class applied.
Now, you’re applying limit=“1”, is that because you’ve got more than one article image defined for each article, but you just want the first one?
Yes, because of the hybrid photolog I have created. There is a main photo and also a thumbnails gallery for each fotolog entry (= article). So, I use the “article image” field to define all them: the main photo and the asociated photos.
Is it possible that some of those articles have more commas then there should be? i.e: 1,,2,3,?
I have checked and no. There are three entries right now: one with multiple images (= multiple ids in the “article image” field) and two with just one image id in that field.
thanks Mary.
Offline
#28 2006-05-01 21:23:40
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Thanks Julián, I’ll try and get this sorted.
Offline
#29 2006-05-07 00:04:16
- Rexel
- Member
- Registered: 2005-11-18
- Posts: 26
Re: [plugin] [ORPHAN] upm_image: More powerful image display
I’ve tried
<txp:upm_image type="image" image_id="119">3</txp:upm_image>
as a wrapping tag in the write article tab but it don’t work.
Any Ideas why?
Also I’m trying to swap some images on one page with getElementById but I couldn’t link to the images without writing a complete XHTML code and the onclick eventhandler in the article write tab, not ideal if my client will be updating some images himself.
Also the image alt attributes will be swaped by the title attribute by use of javascript, again found myself hard coding.
Last edited by Rexel (2006-05-07 00:11:30)
Offline
#30 2006-05-07 01:10:20
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
…but it don’t work.
Care to elaborate?
Read the plugin help. It shows you how to use the plugin to output custom markup.
Offline