Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-13 00:40:46

midmood
Member
From: Rome, Italy
Registered: 2007-07-20
Posts: 68
Website

retrieve article image ID content (or similar)

Hi all,

How do I retrieve (by txp tags) the ID of an image included in an article, or the content of the article_image field in the write tab?

thank you for your help :-)

Simone (Italy)

Offline

#2 2009-05-13 00:43:35

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

Re: retrieve article image ID content (or similar)

Not possible (afaik) by using just TXP built-in tags. Try upm_image, smd_gallery or soo_image.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2009-05-13 00:48:20

midmood
Member
From: Rome, Italy
Registered: 2007-07-20
Posts: 68
Website

Re: retrieve article image ID content (or similar)

thank you… i try the plugins you suggested me, even if i need just to the id number to append to a customized url.
This is going into a javascript variable to perform an effect (oh… my english :-(

Offline

#4 2009-05-13 01:00:10

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

Re: retrieve article image ID content (or similar)

You will probably find them useful for other crazy ideas that could come up ;)

Of course, you can probably retrieve the value on the article_image field by just using a few PHP lines, but I leave that for the experts.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2009-05-13 01:14:59

midmood
Member
From: Rome, Italy
Registered: 2007-07-20
Posts: 68
Website

Re: retrieve article image ID content (or similar)

grrr.

soo_image fits nearly perfect my purpose, but I need onMouseOver option, and as far I can see, there’s only the option to use onClick

Offline

#6 2009-05-13 01:20:58

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,781
Website

Re: retrieve article image ID content (or similar)

midmood wrote:

soo_image fits nearly perfect my purpose, but I need onMouseOver option, and as far I can see, there’s only the option to use onClick

Where do you need onmouseover to appear — in the img tag itself, or in the a tag of a linked thumbnail?


Code is topiary

Offline

#7 2009-05-13 01:29:03

midmood
Member
From: Rome, Italy
Registered: 2007-07-20
Posts: 68
Website

Re: retrieve article image ID content (or similar)

ok, i explain the problem simply:

I’m trying to adapt a javascript which allow me to show a list of linked thumbnail. When i move the mouse over the thumbnail, the full size image shows in another part of the page.

Apart from the javascript, the tag’s combination i use is this one:

<a href="<txp:permlink />" title="<txp:title />" onMouseOver="showImage('<txp:article_image />')"><txp:article_image thumbnail="1" /></a>

The only part not working is the txp:article_image tag inside the showImage….
You can see it in action here: http://www.fabioborselli.com/violetab/negozio/ (sorry, really messy, layout testing there :-)

if I put a real image url instead of the tag, the script works….

I need to find a way to feed the generated image link to the showImage part… don’t know how… please help me .-)

Offline

#8 2009-05-13 01:47:35

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,781
Website

Re: retrieve article image ID content (or similar)

Someone else asked for something similar today. See my reply in the soo_image support thread. I could add an onmouseover attribute to soo_image, but since what you want is a link to the article I think it will work better using your code but with a tag that produces the article-image URL, as in the link above. I’m pretty sure you could also do this with smd_gallery.


Code is topiary

Offline

#9 2009-05-13 02:03:18

midmood
Member
From: Rome, Italy
Registered: 2007-07-20
Posts: 68
Website

Re: retrieve article image ID content (or similar)

I used the soo_image_url tag.
Now the behaviour is the following.

If I pass the mouse over the thumbnail i see the div holder for the bigger image showing (top right corner)
But what i see is just a “broken link image”, such as when you have a wrong extension for the image.

If I retrieve the url by right clicking the place where the image is supposed to show, i can see the url is almost correct

the right url is infact http://www.fabioborselli.com/violetab/images/84.png
the url generated by the soo_image_url is http://www.fabioborselli.com/images/84.png

that’s strange… if I modify the images path in the preferences… i can’t see anymore either the thumbnail and the full size image…

Offline

#10 2009-05-13 02:22:00

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,781
Website

Re: retrieve article image ID content (or similar)

Please see my reply here.


Code is topiary

Offline

Board footer

Powered by FluxBB