<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SamuraiDio &#187; digg</title>
	<atom:link href="http://blog.diovani.com/tag/digg/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.diovani.com</link>
	<description>GNU/Linux &#124; PHP &#124; JavaScript</description>
	<lastBuildDate>Fri, 28 May 2010 00:11:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Twitter e botões para Digg e Tweetmeme</title>
		<link>http://blog.diovani.com/2010/02/24/twitter-e-botoes-para-digg-e-tweetmeme/</link>
		<comments>http://blog.diovani.com/2010/02/24/twitter-e-botoes-para-digg-e-tweetmeme/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 04:20:22 +0000</pubDate>
		<dc:creator>diovani</dc:creator>
				<category><![CDATA[Sem Categoria]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://blog.diovani.com/?p=339</guid>
		<description><![CDATA[Já faz algum tempo que eu queria colocar botões para incentivar os visitantes a divulgar meus posts no Digg e Delicious e Tweetmeme, mas nunca sobrava tempo para pesquisar plugins ou scripts para tal. Então resolvi fazer umas horinhas extras em casa hoje isso.
O resultado pode ser visto no painel lateral do blog, no Widget [...]]]></description>
			<content:encoded><![CDATA[<p>Já faz algum tempo que eu queria colocar botões para incentivar os visitantes a divulgar meus posts no <a href="http://digg.com">Digg</a> e <span style="text-decoration: line-through;"><a href="http://del.icio.us">Delicious</a></span> e <a href="http://tweetmeme.com/">Tweetmeme</a>, mas nunca sobrava tempo para pesquisar plugins ou scripts para tal. Então resolvi fazer umas horinhas extras em casa hoje isso.</p>
<p>O resultado pode ser visto no painel lateral do blog, no Widget <strong>Share</strong>, onde coloquei botões para compartilhar no Digg, Tweememe e ainda um botão de Follow para o novíssimo <a href="http://twitter.com/SamuraiDio">Twitter do blog</a>. <span style="text-decoration: line-through;">Ainda falta o botão para o Delicious, mas este fica para mais tarde.</span></p>
<p>Para quem quiser fazer o mesmo, basta adicionar fragmentos HTML e JavaScript no seu tema do WP, ou dentro de um Text Widget, seguindo os tutoriais a seguir. O máximo que precisa ser configurado é o nome de usuário do twitter.</p>
<p>Botão Digg: <a href="http://about.digg.com/button">http://about.digg.com/button</a><br />
Botão Retweet: <a href="http://help.tweetmeme.com/2009/04/06/tweetmeme-button/">http://help.tweetmeme.com/2009/04/06/tweetmeme-button/</a><br />
Botão Follow: <a href="http://help.tweetmeme.com/2010/02/23/follow-button/">http://help.tweetmeme.com/2010/02/23/follow-button/</a></p>
<p>Como comentei acima, criei também um twitter para o blog, <a href="http://twitter.com/SamuraiDio">@SamuraiDio</a>, e adicionei o plugin <a href="http://wordpress.org/extend/plugins/wp-to-twitter/">WP to Twitter</a>. Agora cada novo post vai também aparecer no twitter, facilitando para quem quiser &#8220;seguir&#8221; o blog mas não costuma usar feeds.</p>
<p>[updated]</p>
<p>Por motivos de performance (criados com JavaScript os botões demoram alguns segundos a mais para serem exibidos) procurei por uma solução em PHP, e encontrei combinando os plugins <a href="http://wordpress.org/extend/plugins/digg-digg/">Digg Digg</a> e <a href="http://wordpress.org/extend/plugins/php-code-widget/">PHP Code Widget</a>.</p>
<p>O primeiro é um plugin que adiciona botões para diversos serviços de compartilhamento, e o segundo é um Widget identico ao Text Widget do WP, mas que aceita também códigos PHP.</p>
<p>Para adicionar os botões no Widget, e não nos posts, eu desabilitei as exibições padrão do Digg Digg, e criei um PHP Code Widget com o seguinte código fonte:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;center&gt;&lt;div id=&quot;dd_before&quot; style=&quot;height:80px; width:190px;&quot;&gt;&lt;ul&gt;
&lt;li class=&quot;li_horizontal&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> digg_digg_generate<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Normal'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/li&gt;
&lt;li class=&quot;li_horizontal&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> digg_digg_reddit_generate<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Normal'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/li&gt;
&lt;li class=&quot;li_horizontal&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> digg_digg_twitter_generate<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Normal'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'SamuraiDio'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/center&gt;</pre></div></div>

<p>Os métodos <em>digg_digg_*_generate()</em> são fornecidos pelo plugin Digg Digg, e podem ser usados também em qualquer lugar do template.</p>
<p>Também desisti de usar o botão para o Delicious, e adicionei um para o <a href="http://reddit.com">Reddit</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.diovani.com/2010/02/24/twitter-e-botoes-para-digg-e-tweetmeme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
