Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#27 2006-05-01 16:31:05

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

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

#31 2006-05-07 17:04:45

Rexel
Member
Registered: 2005-11-18
Posts: 26

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

Sorry about my late reply.

I’ve read the plugin help but still getting a bit confused.

The situation I’m facing is this:

I have an article where a set of pictures will be displayed, 5 or six max.
I’m using an ajax function to swap the pictures which will be linked by numbers 1-6 all in the same page.
The trouble is I can’t output the image url in a fashion that will be easy for my client to add and type.
Maybe an example will help:
Trying to rewirte this code
<a onclick="return swapImage(this)" href="images/120.jpg" title="pic1">1</a>

into somthing more user freindly to type, thats where your great plugin comes in. I’ve tried:
txp:upm_image type="image" image_id="120" id="imageHolder">1</txp:upm_image>

First of all the code above just output tilte">
The other thing is that I need to add the javascript onclick call to the link but don’t know how to go about that.
I hope this will help you help me.

Offline

#32 2006-05-07 17:19:41

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

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

What you want to do is make use of the custom form ability. In the plugin help, go to the “Customizing Output” section. That should explain everything you need to know.

First of all the code above just output tilte">.

Okay, thanks, I’ll look into that.

Offline

#33 2006-05-07 21:08:59

rajo
Member
Registered: 2004-03-13
Posts: 43

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

Is there a way to get this plugin to work with lightbox 2.0? I made a custom form for it that includes a relation attribute so I could add rel=“lightbox” to a thumbnail form’s ‘a’ tag. Lightbox is working if I just output a hard-coded link but it breaks if the upm_image tag outputs it.

Code On Page – <code><a href=“http://path/to/fullsize/image.jpg” rel=“lightbox” title=“Caption”><img src=“http://path/to/thumbnail/image.jpg” width=“100” height=“100” alt=“ALT” /></a></code>

my upm_image custom form – <code><a href=”<txp:upm_img_full_url />” rel=“lightbox” title=“Caption”><img src=”<txp:upm_img_thumb_url />” width=”<txp:upm_img_thumb_width />” height=”<txp:upm_img_thumb_height />” alt=”<txp:upm_img_alt />” /></a></code>

Thanks in advance

Offline

#34 2006-05-08 23:43:46

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

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

Do you get any kind of JavaScript error?

Offline

#35 2006-05-08 23:46:35

rajo
Member
Registered: 2004-03-13
Posts: 43

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

no, the lightbox script just doesn’t run, the fullsize image opens up in a new blank window. However, I have gotten moo.fx scripts to run but their based on ID’s that are hardcoded into the page, not from article or output forms.

Offline

#36 2006-05-09 00:01:53

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

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

Weird. Is this live anywhere? I don’t know if I’ll be able to figure it out, but maybe someone else can if I can’t.

Offline

Board footer

Powered by FluxBB