Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
Offline
Re: show only the source of article_image
thanks but how do I use it please?
o_O
Offline
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.
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
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
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
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