Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#373 2011-01-18 23:06:02

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Yes, that should be doable, you will just need to build the exact output you needs using the form attribute (and within that form use the tags detailed in the plugin help under “Customising Output”), rather than letting the plugin do it’s own automatic thing.

Offline

#374 2011-01-19 01:07:53

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

After trying every which way, I just can’t figure it out. And I’ve done some fairly complex txp coding and don’t give up easily. Please, more help and clarification? Thanks!

hicks.

Last edited by hicks (2011-01-19 01:11:47)

Offline

#375 2011-01-19 02:11:50

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Off the top of my head:

<div class="slideshow">
<txp:upm_article_image limit="1" wraptag="div">
	<img src="<txp:upm_img_full_url />" width="<txp:upm_img_full_width />" height="<txp:upm_img_full_height />" alt="<txp:upm_img_alt />" />
	<txp:upm_img_caption wraptag="p" />
</txp:upm_article_image>


<txp:upm_article_image offset="1" wraptag="div">
	<img src="<txp:upm_img_full_url />" width="<txp:upm_img_full_width />" height="<txp:upm_img_full_height />" alt="<txp:upm_img_alt />" class="hidden" />
	<txp:upm_img_caption wraptag="p" class="hidden" />
</txp:upm_article_image>
</div>

Offline

#376 2011-01-19 03:17:16

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Thanks! Didn’t think of using that txp:upm_img_full_url bit. Your code almost worked right off the bat; only the wraptags didn’t work between each image+caption, for some reason. Here’s what’s working, though:

<div>
<txp:upm_article_image limit="1">
	<img src="<txp:upm_img_full_url />" width="<txp:upm_img_full_width />" height="<txp:upm_img_full_height />" alt="<txp:upm_img_alt />" />
	<txp:upm_img_caption wraptag="p" />
</txp:upm_article_image>
</div>

<txp:upm_article_image offset="1"><div>
	<img src="<txp:upm_img_full_url />" width="<txp:upm_img_full_width />" height="<txp:upm_img_full_height />" alt="<txp:upm_img_alt />" class="hidden" />
	<txp:upm_img_caption wraptag="p" class="hidden" />
</div></txp:upm_article_image>

Thanks again! I'll post a link when I've got the article in question online.

h.

Offline

#377 2011-01-25 01:59:41

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Here’s how it came out —just how I’d hoped. Thanks again, Mary.

hicks.

Offline

#378 2011-03-05 19:53:36

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

hey mary, having a little problem with an apparent bug.
I’m using upm_image with this form

<txp:upm_article_image form="fonttabs" wraptag="ul" class="idTabs"/>

and within the fonttabs form:

<li><a href="#i<txp:upm_img_id />"><txp:upm_img_alt /></a></li>

now this works perfectly when I have several article images, but when I have only one, the wraptag does not get output. i just get the <li> without a <ul>

any clue as to what could be the problem?


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#379 2011-03-07 15:55:40

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Hmm. Does tag trace provide any enlightenment?

Offline

#380 2011-03-09 09:17:40

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Hi Mary,
Sorry I hadn’t had time to follow up.
here’s the relevant part of the tag trace:

<txp:if_individual_article>
	[<txp:if_individual_article>: true]
	<txp:article limit="10" form="font" listform="article_listing"/>
		[SQL (0.00090217590332031): select Form from txp_form where name='font']
		[Form: font]
		<txp:title />
		<txp:upm_article_image form="fonttabs" wraptag="ul" class="idTabs"/>
			[SQL (0.00090503692626953): select * from txp_image where id = '80' limit 0, 1]
			[SQL (0.00071597099304199): select Form from txp_form where name='fonttabs']
			[Form: fonttabs]
			<txp:upm_img_id />
			<txp:upm_img_alt />
		<txp:upm_article_image form="fontimg"/>
			[SQL (0.00063490867614746): select * from txp_image where id = '80' limit 0, 1]
			[SQL (0.0007469654083252): select Form from txp_form where name='fontimg']
			[Form: fontimg]
			<txp:upm_img_id />
			<txp:upm_img_full_url />
			<txp:upm_img_alt />
		<txp:body />
		<txp:if_article_category name="handwriting-fonts" number="1">
			[<txp:if_article_category name="handwriting-fonts" number="1">: false]
		</txp:if_article_category>
		<txp:tru_tags_if_has_tags>
			[SQL (0.0010678768157959): select Keywords from textpattern where ID='58' AND Keywords <> '']
			[<txp:tru_tags_if_has_tags>: true]
			<txp:tru_tags_from_article />
				[SQL (0.00057792663574219): select name from txp_section where searchable != '1']
				[SQL (0.0038959980010986): select Keywords from textpattern where Keywords <> ''and Section != ''and Section != 'tag' and Section != 'newsletter' and Status >= '4' and Posted <= now() and (now() <= Expires or Expires = '0000-00-00 00:00:00')]
		</txp:tru_tags_if_has_tags>
		<txp:if_custom_field name="Format">
			[<txp:if_custom_field name="Format">: true]
			<txp:custom_field name="Format" />
		</txp:if_custom_field>
		<txp:if_custom_field name="Price">
			[<txp:if_custom_field name="Price">: true]
			<txp:custom_field name="Price" />
		</txp:if_custom_field>
		<txp:if_custom_field name="carturl">
			[<txp:if_custom_field name="carturl">: true]
			<txp:custom_field name="carturl" />
		</txp:if_custom_field>
		<txp:upm_article_file_list />
			[SQL (0.004396915435791): select custom_3 from textpattern where `ID` = '58' limit 1]
</txp:if_individual_article>

the full (gigantanormous) tag trace is on pastebin

I can’t see anything VERY obviously wrong, but I’m a bit code-illiterate…

thanks for taking a look!


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#381 2011-03-10 15:27:54

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Found the problem. I’ll try and update the plugin with a fix soon.

In the meantime, you should be able to work around this by making use of upm_if_article_image_list inside your form (if list, do nothing, else insert a ul tag with your class manually).

Offline

#382 2011-03-10 19:19:55

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

thanks mary! :)


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#383 2011-04-06 10:59:52

oliverker
Plugin Author
From: Huddersfield
Registered: 2008-07-14
Posts: 90
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Im trying to use a php image resizer by joe designs from as it adds the white space to make the image square – it is particular needed for showing client logos where they are different sizes, as you can see here I could maybe use some CSS to make it work, but perforable would be to have it as an image.

I was using timthumb.php with the following code

<img src="<txp:site_url/>thumb.php?src=<txp:upm_img_full_url />&w=200" alt="<txp:upm_img_alt />"/>

And have tried

<img src="<?php echo resize("<txp:upm_img_full_url />",array("w"=>200,"h"=>200)); ?>" alt="<txp:upm_img_alt />" />

as per the demo suggests, but think it is because it’s essentially a php script inside a php script

Any help as to how to get this work is much appreciated

Offline

#384 2011-04-06 13:50:39

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

Re: [plugin] [ORPHAN] upm_image: More powerful image display

Oliver, use <txp:php></txp:php> instead of <?php ?>

More info about using php code in textpattern here: http://textpattern.com/faq/34/how-do-i-use-php-code

not sure if that will solve your problems with the image resizing script, but it might be a start in the right direction

Offline

Board footer

Powered by FluxBB