Rss feeds to show images

4 posts by 2 authors in: Forums > CMS Builder
Last Post: November 29, 2010   (RSS)

Hello wonder if anyone can help?

I have searched the forum, found one answer but it didnt woerk with me.

My RSS feed is working fine apart from the images are not working, in setting the rss feed up to work with google products feed:



<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
<channel>
<title>Personalised Notebooks</title>
<description> </description>
<link></link>
<?php foreach ($notebooksRecords as $record): ?>

<item>
<title><?php echo htmlspecialchars($record['name']) ?></title>
<description><?php echo $record['name'] ?>
Soft cover Notebook
Wire Ring-bound
60 sheets lined or plain paper, 90gsm uncoated
Laminated 350gsm front cover.
</description>
<g:id>0001</g:id>
<link><?php echo $record['createlink'] ?></link>
<g:price>6.99</g:price>
<g:condition>new</g:condition>
<g:image_link>

<![CDATA[


<?php foreach ($record['images'] as $upload): ?>
<img src="http://www.mydomain.com<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" />
<?php endforeach ?>
]]>

</g:image_link>

</item>

<?php endforeach ?>

</channel>
</rss>


Any help would be great



Thanks



Dave

Re: [davef81] Rss feeds to show images

By Jason - November 25, 2010

Hi Dave,

I took a look at the [url http://base.google.co.uk/support/bin/answer.py?answer=58085&hl=en_GB] Google RSS Specifications[/url] and it looks like when using <g:image_link> you just provide the url path to the image, not the actual HTML img tag.

Try something like this:

<?php foreach ($record['images'] as $upload): ?>
<g:image_link>http://www.mydomain.com<?php echo $upload['urlPath'] ?></g:image_link>
<?php endforeach ?>


Give that a try and let me know if you run into any issues.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [davef81] Rss feeds to show images

By Jason - November 29, 2010

Hi,

If you could fill out a [url http://www.interactivetools.com/support/]2nd Level Support Request[/url], we can take a closer look at this for you.

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/