Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-10-23 08:04:45

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

show only the source of article_image

Hey good morning!
I will love to get help please
I got an XML page for my music player playlist
and I want to use the value of ‘Article Image’ in my xml like this:
<image>http://www.bla.com/images/100.jpg</image>

if I do this:
<image><txp:article_image /></image>
I will get:
<image><img src="http://www.bla.com/images/100.jpg" alt=""></image>
and that is not good
all I need is only the source of the image or just the number
to do so, I was thinking of use the ‘ied_replacer’ plugin in this way:

// text to replace with html
$smilies = array(
'<image><img src="' => '<image>',
'" alt="" /></image>' => '</image>'
);

that will work great,
but I don’t know how to use ‘ied_replacer’ to replace the ‘Article Image’ tag:
<txp:article_image />

‘ied_replacer’ replace the tags: body, excerpt, title, message
in this way:
<txp:ied_replacer what=“body” />
instead of
<txp:body />

but how do I use it to the ‘article image’ and custom fields please
Is it posible?

or is there any other way to just use the image source and not the all html image tag?

Thanks =)

Last edited by THE BLUE DRAGON (2008-10-23 20:30:05)

Offline

#2 2008-10-23 18:20:04

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: show only the source of article_image

Use upm_image

Offline

#3 2008-10-23 18:34:25

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

Re: show only the source of article_image

thanks but how do I use it please?
o_O

Offline

#4 2008-10-23 18:53:04

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: show only the source of article_image

Install in and take a look at the help. There is a tag that will give you just the url of the image.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#5 2008-10-23 20:42:11

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

Re: show only the source of article_image

OK I found a way using smd_gallery
(that I already got this plugin install for my galleries)

this is how:
<txp:smd_gallery id="?article_image" form="music_player_image" limit="1" />
and in the form:
{thumburl}

works great now I got only the thumb url of the ‘Article_Image’ field =)

Offline

#6 2008-10-24 17:00:59

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: show only the source of article_image

THE BLUE DRAGON wrote:

OK I found a way using smd_gallery
(that I already got this plugin install for my galleries)

this is how:
<txp:smd_gallery id="?article_image" form="music_player_image" limit="1" />
and in the form:
{thumburl}

works great now I got only the thumb url of the ‘Article_Image’ field =)

To minify the amount of forms smd_gallery could be used in container mode:

<txp:smd_gallery id="?article_image" limit="1">
{thumburl}
</txp:smd_gallery>

This is useful when the snippet’s form isn’t anywhere else, and the snippet is used only on one place.

P.S. Updated code – :)

Last edited by the_ghost (2008-10-24 21:39:38)


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#7 2008-10-24 19:56:28

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

Re: show only the source of article_image

cool thanks less forms it better =)

<txp:smd_gallery id="?article_image" limit="1">
{thumburl}
</txp:smd_gallery>

Offline

Board footer

Powered by FluxBB