Jump to content

Imagens em RSS


NameException

Recommended Posts

Boas...

À uns tempos implementei de forma muito "artesanal" o sistema de RSS no meu website. No entanto, as noticias que tenho enviado via RSS têm um aspecto muito pouco profissional e tecnológico, pelo que gostaria de perguntar, se existe algum editor de Feeds ou algo do género, que me possibilite dar um melhor aspecto, de forma fácil...

E já agora, como é que se pode "colocar" fotografias no XML do RSS???

Cumprimentos

Link to comment
Share on other sites

No campo <description> podes usar a tag ![CDATA[ ao início e ]]> no fim para indicares que o conteúdo pode ter símbolos que não devem ser interpretados pelo parser XML.

Depois, podes pôr qualquer código HTML (incluindo imagens).

Aqui fica um exemplo de um item do feed do Hack-a-day:

<item>
	<title>Tear your iMac&#8217;s insides out</title>
	<link>http://hackaday.com/2009/09/25/tear-your-imacs-insides-out/</link>

	<comments>http://hackaday.com/2009/09/25/tear-your-imacs-insides-out/#comments</comments>
	<pubDate>Fri, 25 Sep 2009 14:02:53 +0000</pubDate>
	<dc:creator>Mike Szczys</dc:creator>
			<category><![CDATA[macs hacks]]></category>
	<category><![CDATA[apple]]></category>
	<category><![CDATA[arctic silver]]></category>
	<category><![CDATA[g5]]></category>

	<category><![CDATA[hdd]]></category>
	<category><![CDATA[heat]]></category>
	<category><![CDATA[imac]]></category>
	<category><![CDATA[sata]]></category>

	<guid isPermaLink="false">http://hackaday.com/?p=16120</guid>
	<description><![CDATA[
Saying that [ian] had some overheating issues with his iMac G5 would be an understatement. After losing three hard drives due to heat he decided to do something about it. The first step was replacing the thermal paste with Arctic Sliver. The solution for the hard drive was a little more unorthodox.
[ian] picked up a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&blog=4779443&post=16120&subd=hackadaycom&ref=&feed=1" />]]></description>
		<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignnone size-full wp-image-16121" title="imac1_external_hdd_ mod" src="http://hackadaycom.files.wordpress.com/2009/09/imac1_external_hdd_-mod.jpg?w=470&#038;h=353" alt="imac1_external_hdd_ mod" width="470" height="353" /></p>
<p>Saying that [ian] had some overheating issues with his iMac G5 would be an understatement. After losing three hard drives due to heat he decided to do something about it. The first step was replacing the thermal paste with <a href="http://www.arcticsilver.com">Arctic Sliver</a>. The solution for the hard drive was a little more unorthodox.</p>
<p>[ian] picked up a <a href="http://www.wdc.com/en/products/products.asp?driveid=299">320GB Western Digital Caviar Blue</a> drive because of its very low noise rating. He used rubber grommets to mount it outside the case and ran SATA data and power extension cables through a quarter inch hole to the motherboard. He mentioned to us that the cutout seen above the drive is from a previous mod.</p>
<p>This certainly will fix an overheating problem but it doesn&#8217;t do much for the sexy style we&#8217;re accustomed to with Apple hardware.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hackadaycom.wordpress.com/16120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hackadaycom.wordpress.com/16120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hackadaycom.wordpress.com/16120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hackadaycom.wordpress.com/16120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hackadaycom.wordpress.com/16120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hackadaycom.wordpress.com/16120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hackadaycom.wordpress.com/16120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hackadaycom.wordpress.com/16120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hackadaycom.wordpress.com/16120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hackadaycom.wordpress.com/16120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hackaday.com&blog=4779443&post=16120&subd=hackadaycom&ref=&feed=1" /></div>]]></content:encoded>
		<wfw:commentRss>http://hackaday.com/2009/09/25/tear-your-imacs-insides-out/feed/</wfw:commentRss>

	<slash:comments>8</slash:comments>

	<media:content url="" medium="image">
		<media:title type="html">Mike Szczys</media:title>
	</media:content>

	<media:content url="http://hackadaycom.files.wordpress.com/2009/09/imac1_external_hdd_-mod.jpg" medium="image">
		<media:title type="html">imac1_external_hdd_ mod</media:title>
	</media:content>

</item>

❝The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.❞- John Carmack on software patents

A list  of command line apps

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.