Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#301 2009-04-02 23:59:30
Re: [plugin] [ORPHAN] upm_image: More powerful image display
I can’t get forms to work with upm_article_image, am I doing something wrong?
In some form linked from an article form I have this:
<txp:upm_article_image form="article_image" />
Now, the only tag I can get to work in the form “article_image” is <txp:upm_article_image />
. I can’t get any of the other upm_image tags, including <txp:upm_image />
or <txp:upm_img_thumb_url />
to work. I have tried making the “article_image” form ‘article’ and ‘misc’ types.
Offline
#302 2009-04-03 00:06:56
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
The tags you would be looking to use would be the upm_img_
tags. The form type doesn’t matter.
Have you tried swapping your Production Mode to Testing (any errors?) or Debugging (tag trace?)?
Offline
#303 2009-04-03 00:07:03
Re: [plugin] [ORPHAN] upm_image: More powerful image display
On another note, is not to most obvious use for a thumbnail to link to a larger version of the same picture? Why then is this not built-in to this plugin? The url=“xxxx” attribute for type=“thumbnail” images should be able to link to the larger image. This is such a common thing to want to do, and what I see every other person telling others how to do with unnecessary elaborate forms. Anyway, I still can’t even get forms working so I’m SOL at the moment.
Offline
#304 2009-04-03 00:09:17
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Look at the docs regarding the “popup” type.
Offline
#305 2009-04-03 00:13:35
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Thanks for the lightning fast help Mary! I get this error when I’m in testing mode:
tag_error <txp:upm_img_thumb_url /> -> 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 521
This doesn’t make sense because I am doing what it says, that tag is in its own form called by the upm_article_image tag. Now, does it matter that the upm_article_image tag is in another form itself?
Regarding “popup” I saw it mentioned but there was no explanation for what it did. So, it does what a thumbnail logically does, link to the larger image, great! But, it would be nice if I could do this without defaulting to popping up a new window (feature request!).
Last edited by aswihart (2009-04-03 12:34:42)
Offline
#306 2009-04-03 04:27:37
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
It shouldn’t matter. Could you post a tag trace please?
Offline
#307 2009-04-03 22:46:06
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Mary, here’s the tag trace as requested:
<!-- txp tag trace:
[SQL (0.00161385536194): select name, data from txp_lang where lang='en-us' AND ( event='public' OR event='common')]
[SQL (0.00481200218201): select name, code, version from txp_plugin where status = 1 AND type IN (0,1) order by load_order]
[SQL (0.000174999237061): select name,code,version from txp_plugin where status = 1 AND name='ajw_clean_feed']
[SQL (0.000229120254517): select ID,Section from textpattern where url_title like 'final-rotation' AND Section='movies' and Status >= 4 limit 1]
[SQL (0.000131845474243): select page, css from txp_section where name = 'movies' limit 1]
[SQL (0.000392913818359): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from textpattern where ID=4 and Status in (4,5)]
[article 4]
[SQL (0.000923871994019): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted > '2006-07-20 00:59:00' and Section = 'movies' and Status=4 and Posted < now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') order by Posted asc limit 1]
[SQL (0.000741958618164): select ID, Title, url_title, unix_timestamp(Posted) as uposted
from textpattern where Posted < '2006-07-20 00:59:00' and Section = 'movies' and Status=4 and Posted < now() and (now() <= Expires or Expires = '0000-00-00 00:00:00') order by Posted desc limit 1]
[SQL (0.000156879425049): select user_html from txp_page where name='movies']
[Page: movies]
<txp:output_form form="meta_static" />
[SQL (0.000132083892822): select Form from txp_form where name='meta_static']
[Form: meta_static]
<txp:css format="link" n="reset" />
<txp:css format="link" n="typography" />
<txp:css format="link" n="forms" />
<txp:css format="link" n="plugins" />
<txp:css format="link" n="screen" />
<txp:css format="link" n="ie" />
<txp:css n="print" format="link" media="print" />
<txp:output_form form="meta_dynamic" />
[SQL (0.000133037567139): select Form from txp_form where name='meta_dynamic']
[Form: meta_dynamic]
<txp:if_section name=",blog">
[<txp:if_section name=",blog">: false]
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:section />
<txp:title />
<txp:site_name />
</txp:if_individual_article>
<txp:if_article_list>
[<txp:if_article_list>: false]
</txp:if_article_list>
</txp:if_section>
<txp:if_custom_field name="meta_desc">
[<txp:if_custom_field name="meta_desc">: false]
</txp:if_custom_field>
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:keywords />
</txp:if_individual_article>
<txp:if_section name=",">
[<txp:if_section name=",">: false]
<txp:link_to_home>
<txp:site_name />
</txp:link_to_home>
</txp:if_section>
<txp:if_article_list>
[<txp:if_article_list>: false]
</txp:if_article_list>
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:article limit="1" form="body_with_comments" />
[SQL (0.0001380443573): select Form from txp_form where name='body_with_comments']
[Form: body_with_comments]
<txp:body />
<txp:upm_article_file_list class="files" form="files2" sort="id desc" limit="14" break="li" wraptag="ul" />
[SQL (0.000133037567139): select custom_1 from textpattern where `ID` = '4' limit 1]
[SQL (0.000127792358398): select Form from txp_form where name='files2']
[Form: files2]
[SQL (0.000194072723389): select * from txp_file where id in(24,23,54) order by id desc]
<txp:smd_file_download_link>
<txp:smd_file_download_name />
</txp:smd_file_download_link>
<txp:file_download_size format="auto" decimals="1" />
<txp:file_download_downloads />
<txp:file_download_description />
<txp:smd_file_download_link>
<txp:smd_file_download_name />
</txp:smd_file_download_link>
<txp:file_download_size format="auto" decimals="1" />
<txp:file_download_downloads />
<txp:file_download_description />
<txp:smd_file_download_link>
<txp:smd_file_download_name />
</txp:smd_file_download_link>
<txp:file_download_size format="auto" decimals="1" />
<txp:file_download_downloads />
<txp:file_download_description />
<txp:comments_invite wraptag="p" />
[SQL (0.000430107116699): select Form from txp_form where name='comments_display']
[Form: comments_display]
<txp:text item="comment" />
<txp:comments_invite textonly="1" showalways="1" showcount="0" />
<txp:comments />
[SQL (0.000201940536499): select *, unix_timestamp(posted) as time from txp_discuss where parentid=4 and visible=1 order by posted ASC ]
[SQL (0.000128984451294): select Form from txp_form where name='comments']
[Form: comments]
<txp:comment_message />
<txp:comment_name />
<txp:comment_time />
<txp:comment_permlink>
</txp:comment_permlink>
<txp:if_comments_preview>
[<txp:if_comments_preview>: false]
</txp:if_comments_preview>
<txp:if_comments_allowed>
[<txp:if_comments_allowed>: true]
<txp:comments_form isize="25" msgcols="62" msgrows="8" />
[SQL (0.000144958496094): select ip from txp_discuss_ipban where `ip` = '98.219.225.222' limit 1]
[SQL (0.000149011611938): select Form from txp_form where `name` = 'comment_form' limit 1]
<txp:comments_error />
<txp:text item="name" />
<txp:comment_remember label="" />
tag_error <txp:comment_remember label="" /> -> Textpattern Warning: unknown_tag
<txp:text item="email" />
<txp:text item="message" />
</txp:if_comments_allowed>
</txp:if_individual_article>
<txp:if_individual_article>
[<txp:if_individual_article>: true]
<txp:output_form form="sidebar_movies" />
[SQL (0.000161170959473): select Form from txp_form where name='sidebar_movies']
[Form: sidebar_movies]
<txp:title />
<txp:posted format="%Y" />
<txp:permlink />
<txp:comments_count />
<txp:upm_article_image form="article_image" />
[SQL (0.000227928161621): select * from txp_image where id in(6,7,8,9,10) order by field(id, 6,7,8,9,10)]
[SQL (0.000126123428345): select Form from txp_form where name='article_image']
[Form: article_image]
<txp:upm_img_thumb_url />
tag_error <txp:upm_img_thumb_url /> -> 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 521
[Form: article_image]
<txp:upm_img_thumb_url />
tag_error <txp:upm_img_thumb_url /> -> 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 521
[Form: article_image]
<txp:upm_img_thumb_url />
tag_error <txp:upm_img_thumb_url /> -> 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 521
[Form: article_image]
<txp:upm_img_thumb_url />
tag_error <txp:upm_img_thumb_url /> -> 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 521
[Form: article_image]
<txp:upm_img_thumb_url />
tag_error <txp:upm_img_thumb_url /> -> 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 521
<txp:aam_widont>
<txp:related_articles wraptag="ul" break="li" />
[SQL (0.00280809402466): select *, unix_timestamp(Posted) as posted, unix_timestamp(LastMod) as uLastMod, unix_timestamp(Expires) as uExpires from textpattern where ID != 4 and Status = 4 and (now() <= Expires or Expires = '0000-00-00 00:00:00') and Posted <= now() and (Category1 in('short-films') or Category2 in('short-films')) order by Posted desc limit 0,10]
</txp:aam_widont>
</txp:if_individual_article>
<txp:output_form form="scripts" />
[SQL (0.000165939331055): select Form from txp_form where name='scripts']
[Form: scripts]
[ ~~~ secondpass ~~~ ]
-->
On another note, the type="popup" thing is growing on me, very tidy and works well enough. The flexibility of a form is very nice to have though.
Last edited by aswihart (2009-04-03 22:48:56)
Offline
#308 2009-04-04 01:54:05
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Hmm, looks like a bug. I’ll look into it as soon as possible.
Offline
#309 2009-04-05 00:54:18
Re: [plugin] [ORPHAN] upm_image: More powerful image display
I also can’t get a second instance of <txp:upm_article_image class="class" />
to pass the class attribute. It only works for the first tag I have in my document. The reason I have two tags is I’m making the first image full-size, then subsequent images (offset) are thumbnails. Can you confirm this behavior Mary?
Offline
#310 2009-04-06 20:30:10
Re: [plugin] [ORPHAN] upm_image: More powerful image display
how do i use upm image so that we can put a link inside the caption and have that be the ahref of the image?
something like:
<a href="<txp:upm_img_caption />"><txp:upm_image image_id="66"></a></txp:upm_image>
Offline
#311 2009-04-06 21:39:05
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Something like this:
<txp:upm_image type="image" image_id="66">
<a href="<txp:upm_img_caption />"><img src="<txp:upm_img_full_url />" width="<txp:upm_img_full_width />" height="<txp:upm_img_full_height />" alt="<txp:upm_img_alt />" /></a>
</txp:upm_image>
But using upm_image would mean that you have to enter all this code for every image you want to display… don’t you want upm_article_image?
Offline
#312 2009-04-06 21:44:27
Re: [plugin] [ORPHAN] upm_image: More powerful image display
Els wrote:
But using upm_image would mean that you have to enter all this code for every image you want to display… don’t you want upm_article_image?
well we are going to cap at about 5 images so i dont mind the code
Offline