Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#136 2006-12-28 12:57:46
Re: [plugin] [ORPHAN] upm_image: More powerful image display
ok, it seems like I am missunderstanding the whole concept. Can somebody please outline how to use upm_image, which form has to reference to which form, how it is called etc.
The code that I have above, called a form photolist that called the form photo, but that doesn’t work. (at least the way I did it.)
Offline
#137 2006-12-28 18:06:43
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
I don’t support asy_wondertags, so I can’t say anything about it. If I were you, I would first check that supplying an id actually works:
page:
<txp:output_form form="header" />
<div id="content">
<div class="left">
<txp:output_form form="menu" />
<ul class="articlemenu">
<txp:article_custom allowoverride="0" form="articlelist" pgonly="0" section="aktuelle-ausstellung" sort="Title asc" />
</ul>
</div>
<txp:article id="5" />
</div>
<div id="photos">
<txp:article form="photolist" />
</div>
<txp:output_form form="footer" />
photolist:
<!-- use the ID of an existing image -->
<txp:upm_image form="photo" id="5" />
photo:
<div>
<div class="caption">
<h3><txp:upm_img_name /></h3>
<txp:upm_img_caption wraptag="p" />
</div>
<img src="<txp:upm_img_full_url />" alt="<txp:upm_img_alt escape="html" />" />
</div><br />
Offline
#138 2006-12-28 21:53:55
Re: [plugin] [ORPHAN] upm_image: More powerful image display
nope, that doesn’t work either. I tried changing the form types, too, but that doesn’t change the result. At the moment I have the form photolist set to ‘article’ and the form photo to ‘misc’. Is this the right way to do it? (Somewhere, I have read that there should be a form type called ‘image’, but I cannot find one like that… eh?)
Bytheway: I changed txp:upm_image to txp:upm_article_image for a test. That works perfect, but of course only with the wrong image. (I need to display multiple images, which are defined in multiple custom fields. Also I already have an article image…)
Last edited by dl33 (2006-12-28 21:57:39)
Offline
#139 2006-12-28 22:13:12
Re: [plugin] [ORPHAN] upm_image: More powerful image display
At the moment I have the form photolist set to ‘article’ and the form photo to ‘misc’. Is this the right way to do it? (Somewhere, I have read that there should be a form type called ‘image’, but I cannot find one like that… eh?)
No, the form type doesn’t affect the form functionality at all. Form types are just for the sake of categorization the different forms.
Bytheway: I changed txp:upm_image to txp:upm_article_image for a test. That works perfect, but of course only with the wrong image. (I need to display multiple images, which are defined in multiple custom fields. Also I already have an article image…)
Considering that you are calling an article form (because you are using <txp:article form="photolist" />, txp:upm_article_image should be the correct one to do the job.
What I don’t understand is why are you using multiple custom fields for each image.
This plug-in supports a list of images ID that will be iterated for each image.
If you take a second look at the plug-in help you will find out how to do it.
Offline
#140 2006-12-29 00:06:15
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Actually I am not using multiple custom fields for each image. I make textpattern go through all custom fields, and use the id (of an image) that they contain to display multiple images. So custom field 1 might contain one id of an image, while the next one contains another one. The reason why I am using upm_image is that it seems to be the only way to display the name and description of an image, saving me some custom fields and allowing me to display more images for one particular article… I am not sure if there is perhaps a better plugin for me to use…
Offline
#141 2006-12-29 03:28:45
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Post a tag trace.
Offline
#142 2006-12-29 13:04:44
Re: [plugin] [ORPHAN] upm_image: More powerful image display
jup here it is…:
<!-- txp tag trace:
[SQL (0.001219): select name from txp_lang where lang='en-gb' limit 1]
[SQL (-0.199157): select name, data from txp_lang where lang='en-gb' AND ( event='public' OR event='common')]
[SQL (0.005246): select name, code, version from txp_plugin where status = 1]
[SQL (-0.206373): select ID, Section from textpattern where ID = 7 and Section = 'aktuelle-ausstellung' and Status >= 4 limit 1]
[SQL (0.000888): select * from txp_section where name = 'aktuelle-ausstellung' limit 1]
[SQL (0.001713): select *, unix_timestamp(Posted) as uPosted from textpattern where ID=7 and Status = 4]
[article 7]
[SQL (0.001257): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted > '2006-12-24 06:33:37' and Section = 'aktuelle-ausstellung' and Status=4 and Posted < now() order by Posted asc limit 1]
[SQL (0.000883): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted < '2006-12-24 06:33:37' and Section = 'aktuelle-ausstellung' and Status=4 and Posted < now() order by Posted desc limit 1]
[SQL (0.001112): select host from txp_log where ip='82.168.231.164' limit 1]
[SQL (0.001002): insert into txp_log set `time`=now(),page='/aktuelle-ausstellung/7/das-
buch',ip='82.168.231.164',host='82-168-231-164.dsl.ip.tiscali.nl',refer='',status='200',method='GET']
[SQL (0.000994): select user_html from txp_page where name='Ausstellungsstücke']
[Page: Ausstellungsstücke]
<txp:output_form form="header" />
[SQL (0.211446): select Form from txp_form where name='header']
[Form: header]
<txp:sitename/>
<txp:site_slogan/>
<txp:css format="link" />
<txp:image id="2"/>
[SQL (0.000769): select * from txp_image where id = 2 limit 1]
<txp:output_form form="menu" />
[SQL (0.000571): select Form from txp_form where name='menu']
[Form: menu]
<txp:section_list include_default="0" class="menu" active_class="activemenu" wraptag="ul" break="li" sections="home, aktuelle-ausstellung, wegbeschreibung, kalender, bestellen, kontakt, links"/>
[SQL (0.000708): select name, title from txp_section where name in ('home','aktuelle-ausstellung','wegbeschreibung','kalender','bestellen','kontakt','links') order by field(name, 'home','aktuelle-ausstellung','wegbeschreibung','kalender','bestellen','kontakt','links')]
<txp:article_custom allowoverride="0" form="articlelist" pgonly="0" section="aktuelle-ausstellung" sort="Title asc" />
[SQL (0.021679): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status = 4 and Posted <= now() and Section = 'aktuelle-
ausstellung' order by Title asc limit 0, 10]
[SQL (0.005165): select Form from txp_form where name='articlelist']
[Form: articlelist]
[article 7]
<txp:glx_hl_current_article class="activemenu"/>
<txp:permlink>
<txp:title/>
</txp:permlink>
[article 17]
<txp:glx_hl_current_article class="activemenu"/>
<txp:permlink>
<txp:title/>
</txp:permlink>
[article 10]
<txp:glx_hl_current_article class="activemenu"/>
<txp:permlink>
<txp:title/>
</txp:permlink>
[article 8]
<txp:glx_hl_current_article class="activemenu"/>
<txp:permlink>
<txp:title/>
</txp:permlink>
[article 11]
<txp:glx_hl_current_article class="activemenu"/>
<txp:permlink>
<txp:title/>
</txp:permlink>
[article 9]
<txp:glx_hl_current_article class="activemenu"/>
<txp:permlink>
<txp:title/>
</txp:permlink>
<txp:article id="5" />
[SQL (0.006099): select *, unix_timestamp(Posted) as uPosted from textpattern where ID = 7 and Status = 4 limit 1]
[article 7]
[SQL (0.000476): select Form from txp_form where name='default']
[Form: default]
<txp:title/>
<txp:article_image class="articleimg"/>
[SQL (0.000634): select * from txp_image where id = 3]
<txp:body/>
<txp:article form="photolist" />
[SQL (0.001594): select *, unix_timestamp(Posted) as uPosted from textpattern where ID = 7 and Status = 4 limit 1]
[article 7]
[SQL (0.002423): select Form from txp_form where name='photolist']
[Form: photolist]
<txp:upm_image form="photo" id="4" />
<txp:output_form form="footer" />
[SQL (0.002955): select Form from txp_form where name='footer']
[Form: footer]
<txp:php>
</txp:php>
[ ~~~ secondpass ~~~ ]
-->
Offline
#143 2006-12-30 02:24:08
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
If you change your Production mode to Testing or Debugging, do you get any errors/warnings?
Offline
#144 2006-12-30 13:01:39
Re: [plugin] [ORPHAN] upm_image: More powerful image display
nope, none at all…
Perhaps you can give me a couple of working examples so that I can copy some code… I think that might also be a good idea if examples like this would be included in the doumentation, since, as you can see, there is always the one or the other dumbo that doesn’t get it.
Last edited by dl33 (2006-12-30 13:04:07)
Offline
#145 2006-12-30 18:48:14
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Hi Mary,
i created in-article-mini-galleries with upm_image.
<txp:upm_article_image type=“popup” break=“li” break_class=“gal” wraptag=“ul” class=“galeria” />
I used v.0.3.2 and it worked perfectly.
i tried to achieve in-article-MULTI-mini-galleries by adding limit and offset.
it was OK until i set limit=“1”.
i read this post almost fully and found this limit-problem which was corrected in v.0.4.x (i do not remember well)
tried to download a newer version and found v.0.5.2.
installed, activated, and got this message:
Fatal error: Call to undefined function: escape_output() in E:\_worx\txp\textpattern\lib\txplib_misc.php(459) : eval()’d code on line 235
the bug making this message was repaired @ v.0.3.x as i read
i have no idea how to make this work
i need your help!
Thanx in advance
teamtom
Offline
#146 2006-12-31 09:17:23
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Csakanyosi: my plugins are made to work in the latest stable version of Textpattern (otherwise maintaining it would be a nightmare), which is currently 4.0.4; the error message tells me you are using 4.0.3 or earlier.
Offline
#147 2006-12-31 09:51:44
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
@dl33: So, where 3 is the ID of an image you have, this returns nothing:
<txp:upm_image id="3" />
but this does?
<txp:image id="3" />
Edit: how stupid of me. See following post for the correct attribute to use.
Last edited by Mary (2006-12-31 10:42:34)
Offline
#148 2006-12-31 10:27:56
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Bah, it just dawned on me what it isn’t working.
The attribute to use, as the plugin doc says, is image_id, not id. In a few minutes I’ll be uploading a new version that checks this properly.
Offline
#149 2006-12-31 10:41:48
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
v.0.5.3 is now available.
Last edited by Mary (2013-01-24 17:37:37)
Offline
#150 2006-12-31 13:21:55
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Mary,
thanks for your answer!
You are right, i use txp4.0.3, because i had not enough courage to upgrade.
I am afraid of that some of the used and working plugins may not continue working
I fully understand that you can support only the freshest stable version, but a little note: you write on your homepage: “All plugins require Textpattern v.4.0.3.”
it is not obvious, that maybe 4.0.3 is not enough to use the plugins
Fortunately, i found a v0.2 of upm_image downloaded, tried it and it works perfectly with limit=“1”
in the near future i will upgrade txp with and the plugins including upm_image
this is one of my new-year-promises for 2007 :)
So thanks for your work again, and Happy New Year to you!
teamtom, alias Tamas Csakanyosi, so Csakanyosi is my family name, meaning something like pickaxe :)
Offline