Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Listings Manager Add-ons:
Image tag in rss_template.xml

 

 


annie
User

Oct 6, 2006, 3:11 PM

Post #1 of 8 (5824 views)
Shortcut
Image tag in rss_template.xml Can't Post

Please can someone tell me the tag that I would need to insert into rss_template.xml to show images of my listings in my newsfeed?

Many thanks.


annie
User

Oct 8, 2006, 9:59 AM

Post #2 of 8 (5808 views)
Shortcut
Re: [annie] Image tag in rss_template.xml [In reply to] Can't Post

Anybody...?

I've tried various syntaxes but I'm not familiar with xml and I have a client who wants to deliver an image in their feed. I've worked out that $listing_url$/images/$file$ will be part of the tag but I don't know how to display this in the xml template.

<!-- templatecell : row_image -->
<item>
<title>$lfield1$ - $lfield3$ GBP</title>
<link>$listing_url$/$listing_file$</link>
<description>$lfield5$</description>
<guid isPermaLink="true">$listing_url$/$listing_file$</guid>
</item>
<!-- /templatecell : row_image -->


ross
Staff / Moderator


Oct 9, 2006, 3:30 PM

Post #3 of 8 (5788 views)
Shortcut
Re: [annie] Image tag in rss_template.xml [In reply to] Can't Post

Hi Annie

Thanks for posting!

I believe I just sent you an email a few moments ago and what I was thinking is you should just be able to add the image tags back into your template like this:


Code
<!-- templatecell : row_image --> 
<item>
<title>$lfield1$</title>
<link>$listing_url$/$listing_file$</link>
<guid isPermaLink="true">$listing_url$/$listing_file$</guid>
<description>
<img src="$listing_url$/images/$thumbnail$" width=$thumbnail_width$ border=1 alt="">$lfield5$
</description>
</item>
<!-- /templatecell : row_image -->
<!-- templatecell : row_image_new -->
<item>
<title>$lfield1$</title>
<link>$listing_url$/$listing_file$</link>
<guid isPermaLink="true">$listing_url$/$listing_file$</guid>
<description>
<img src="$listing_url$/images/$thumbnail$" width=$thumbnail_width$ border=1 alt="">$lfield5$
</description>
</item>
<!-- /templatecell : row_image_new -->


That should get the image code being added to your feeds. Give this a shot and let me know how you make out Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com

Hire me!  Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/



annie
User

Oct 10, 2006, 3:03 AM

Post #4 of 8 (5776 views)
Shortcut
Re: [ross] Image tag in rss_template.xml [In reply to] Can't Post

Unfortunately the feed is giving the following error in IE.





A string literal was expected, but no opening quote character was found. Error processing resource 'http://www.mellowneedle...

<img src="http://www.mellowneedlecrafts.co.uk/cgi-bin/products/listings/images/77_1.jpg" width=100 border=1 alt="">Pre...



and this is what it says in FireFox

XML Parsing Error: not well-formed
Location:
http://www.mellowneedlecrafts.co.uk/cgi-bin/products/listings/rss2.xml
Line Number 14, Column 96:

<img src="http://www.mellowneedlecrafts.co.uk/cgi-bin/products/listings/images/77_1.jpg" width=100 border=1 alt="">Preview text...
-----------------------------------------------------------------------------------------------^


ross
Staff / Moderator


Oct 10, 2006, 9:26 AM

Post #5 of 8 (5772 views)
Shortcut
Re: [annie] Image tag in rss_template.xml [In reply to] Can't Post

Hi Annie.

Thanks for the update!

It looks like the problem here is going to be coming from the width attribute. Notice how it doesn’t have any quotes around it?

XML is going to need quotes around each attribute value so try adding in quotes around where the 100 shows up. On your template, find:

width=$thumbnail_width$

and change that to read:

width=“$thumbnail_width$”

Same thing is going to happen with border=1. That will need to look like this:

Border=”1”.

Make sure to update both templatecells. Let me know how you make out with this Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com

Hire me!  Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/



annie
User

Oct 10, 2006, 9:57 AM

Post #6 of 8 (5770 views)
Shortcut
Re: [ross] Image tag in rss_template.xml [In reply to] Can't Post

Now I'm getting this in Firefox:

XML Parsing Error: mismatched tag. Expected: </img>.
Location: http://feeds.feedburner.com/mellowneedlecraftsprom
Line Number 15, Column 3:</description>
--^

and this in IE:

End tag 'description' does not match the start tag 'img'. Error processing resource 'http://www.mellowneedlecrafts.co.uk/cg...

</description>--^



This is my code. Do I need a closing img tag or have I made some glaring error?


<!-- templatecell : row_image -->
<item>
<title>$lfield1$ - $lfield3$ GBP</title>
<link>$listing_url$/$listing_file$</link>
<description>
<img src="$listing_url$/images/$thumbnail$" width="$thumbnail_width$" border="1" alt="">$lfield5$
</description>
<guid isPermaLink="true">$listing_url$/$listing_file$</guid>
</item>
<!-- /templatecell : row_image -->

<!-- templatecell : row_image_new -->
<item>
<title>$lfield1$ - $lfield3$ GBP</title>
<link>$listing_url$/$listing_file$</link>
<description>
<img src="$listing_url$/images/$thumbnail$" width="$thumbnail_width$" border="1" alt="">$lfield5$
</description>
<guid isPermaLink="true">$listing_url$/$listing_file$</guid>
</item>
<!-- /templatecell : row_image_new -->


ross
Staff / Moderator


Oct 10, 2006, 11:45 AM

Post #7 of 8 (5764 views)
Shortcut
Re: [annie] Image tag in rss_template.xml [In reply to] Can't Post

Hi Annie.

Thanks for the update!

We don’t normally use images in the RSS feed so I really appreciate your patience as we work through this Smile.

What you’ll want to do this time is add a “/” at the end of your image tags like this:

<img src="$listing_url$/images/$thumbnail$" width="$thumbnail_width$" border="1" alt="" />

That basically closes the tag off which is what the error message is telling us is missing.

Keep me up to date Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com

Hire me!  Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/



annie
User

Oct 10, 2006, 12:33 PM

Post #8 of 8 (5762 views)
Shortcut
Re: [ross] Image tag in rss_template.xml [In reply to] Can't Post

I do appreciate your efforts Ross.

I'm not getting any errors any more but I burn my feed through FeedBurner and the images don't show. I've used a Blogger atom feed with FeedBurner in the past and the images appeared in that so I'm presuming it's not a problem at the FeedBurner end.

Here's the link to the FeedBurner feed:
http://feeds.feedburner.com/mellowneedlecraftsprom

and this is the direct link to the feed:
http://www.mellowneedlecrafts.co.uk/cgi-bin/products/listings/rss2.xml