• Revista PROGRAMAR: Já está disponível a edição #53 da revista programar. Faz já o download aqui!

NameException

Imagens em RSS

3 mensagens neste tópico

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

0

Partilhar esta mensagem


Link para a mensagem
Partilhar noutros 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>

0

Partilhar esta mensagem


Link para a mensagem
Partilhar noutros sites

Crie uma conta ou ligue-se para comentar

Só membros podem comentar

Criar nova conta

Registe para ter uma conta na nossa comunidade. É fácil!


Registar nova conta

Entra

Já tem conta? Inicie sessão aqui.


Entrar Agora