<?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>Web Cash &#187; api</title>
	<atom:link href="http://www.earn-web-cash.com/tag/api/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.earn-web-cash.com</link>
	<description>Writing, Designing, and Making Money Online</description>
	<lastBuildDate>Sun, 04 Dec 2011 22:52:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>How to Only Show the Digg Badge for Popular Posts</title>
		<link>http://www.earn-web-cash.com/2008/02/18/digg-badge-popular-posts/</link>
		<comments>http://www.earn-web-cash.com/2008/02/18/digg-badge-popular-posts/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 19:45:09 +0000</pubDate>
		<dc:creator>Walkere</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Online Tools]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.earn-web-cash.com/2008/02/18/digg-badge-popular-posts/</guid>
		<description><![CDATA[Digg can be a great source of traffic and recognition for tech related blogs. Some people take it to the extreme though, and show the &#8220;Digg This&#8221; badge on every article they write. As others have pointed out, this can be counter-productive. People don&#8217;t like to read articles that have just one Digg &#8211; they [...]]]></description>
			<content:encoded><![CDATA[<p>Digg can be a great source of traffic and recognition for tech related blogs.  Some people take it to the extreme though, and show the &#8220;Digg This&#8221; badge on every article they write.</p>
<p>As <a href="http://www.pronetadvertising.com/articles/why-the-digg-button-gets-you-buried-not-dugg11995.html">others have pointed out</a>, this can be counter-productive.  People don&#8217;t like to read articles that have just one Digg &#8211; they seem unpopular.</p>
<p>So here&#8217;s a solution: use the <a href="http://www.earn-web-cash.com/scripts-plugins-and-modules/wp-plugin-digg-badge/">Conditional &#8220;Digg This&#8221; WordPress Plugin</a> to only show the Digg Badge for articles that have a certain number of Diggs.<br />
<span id="more-129"></span></p>
<h5>Why Shouldn&#8217;t You Show the Digg Badge on Every Article?</h5>
<p>It&#8217;s easy enough to plaster the Digg Badge in your template or use a plug-in to add it to every post.  Most of your posts aren&#8217;t going to be popular though.  You&#8217;ll get at most one or two Diggs&#8230; nothing to write home about.</p>
<p>When a user opens your article, he or she might be impressed by &#8220;100 Diggs.&#8221;  He or she definitely won&#8217;t be impressed by &#8220;1 Digg.&#8221;  That&#8217;s a hint that your article wasn&#8217;t anything special &#8211; so why should the reader keep going?</p>
<h5>Using the Plugin to Only Show the Badge on Popular Articles</h5>
<p>The <a href="http://www.earn-web-cash.com/scripts-plugins-and-modules/wp-plugin-digg-badge/">Conditional Digg This</a> plug-in was designed to address this issue.</p>
<p>All you need to do is download the source code, upload it to your plugins directory, unpack the tar.gz, and click &#8220;Activate.&#8221;  You don&#8217;t need to modify any settings or insert anything into your template.  It&#8217;s all automated.</p>
<h5>How Does It Work?</h5>
<p>The basic concept behind the plugin is this:</p>
<ul>
<li>Load a story in your WordPress Blog</li>
<li>Check the Digg API to see how many diggs the article has</li>
<li>If the article has 10 or more diggs, show the badge&#8230;</li>
<li>Otherwise, leave it alone.</li>
</ul>
<p>Originally, I coded the plug-in to use a php function to access the API and check the number of Diggs each article had as it loaded.  This worked perfectly &#8211; but it took a while.  Sometimes, the API is slow to respond.  If the API took 8 seconds to spit back a response, that meant your page would take 8 extra seconds to load up.</p>
<p>Even if the API was responding quickly, this was a problem for the front page and category pages.  At best, the API takes about .25 to .5 seconds to respond &#8211; and with 10-15 checks on a page&#8230; you&#8217;re still waiting a good long time for the page to load.</p>
<h5>Load First, Check the API Later</h5>
<p>The solution I came up with was to use some nifty AJAX to perform the API checking behind the scenes.</p>
<p>The plug-in creates an AJAX request for each article.  It sends information to a php script which accesses the Digg API behind the scenes.  The page loads up instantly and AJAX will quietly do its thing.  When the response is ready, it&#8217;ll change the page to include the Digg This badge if necessary.</p>
<p>So, the next time you want to display a &#8220;Digg This&#8221; badge on your article, think about how many diggs your article has already.  Or, use the <a href="http://www.earn-web-cash.com/scripts-plugins-and-modules/wp-plugin-digg-badge/">Conditional &#8220;Digg This&#8221; WordPress Plugin</a> to automatically add a badge to your popular articles.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.earn-web-cash.com/2008/02/18/digg-badge-popular-posts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

