<?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>Flour Power &#187; Blogging</title>
	<atom:link href="http://antoniofarinha.com/blog/category/blogging/feed/" rel="self" type="application/rss+xml" />
	<link>http://antoniofarinha.com/blog</link>
	<description>a blog by António Farinha</description>
	<lastBuildDate>Wed, 29 Jun 2011 09:26:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>One Year of Flour Power</title>
		<link>http://antoniofarinha.com/blog/2010/01/20/one-year-of-flour-power/</link>
		<comments>http://antoniofarinha.com/blog/2010/01/20/one-year-of-flour-power/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 22:08:09 +0000</pubDate>
		<dc:creator>Farinha</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[birthday]]></category>
		<category><![CDATA[Flour Power]]></category>
		<category><![CDATA[stats]]></category>

		<guid isPermaLink="false">http://antoniofarinha.com/blog/?p=1639</guid>
		<description><![CDATA[That&#8217;s right! This little corner of the web is already one year old. And so I feel obliged to do some kind of summary. It&#8217;s was on the 17th of January 2009 that I inaugurated Flour Power. One year later and it&#8217;s still here, after 239 posts with 292 comments. The site has seen a [...]]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s right! This little corner of the web is already one year old. And so I feel obliged to do some kind of summary.</p>
<p><a href="http://www.someecards.com/card/my-mother-said-im-obligated-to-wish" target="_blank"><img class="aligncenter size-full wp-image-1649" title="My mother said I'm obligated to wish you a happy birthday" src="http://antoniofarinha.com/blog/wp-content/uploads/2010/01/birthday-card-obliged.jpg" alt="My mother said I'm obligated to wish you a happy birthday" width="413" height="225" /></a></p>
<p>It&#8217;s was on the 17th of January 2009 that <a href="http://antoniofarinha.com/blog/2009/01/17/hello-world/" target="_self">I inaugurated <em>Flour Power</em></a>. One year later and it&#8217;s still here, after <strong>239 posts</strong> with <strong>292 comments</strong>. The site has seen a total of <strong>83,512 unique visitors</strong> that produced <strong>105,092 pageviews</strong>. Most of them got here from search engines (76.87%), of which Google was the biggest contributor. Geographically speaking, the 4 biggest sources of traffic were the USA, the UK, Canada and Ireland. But there was also 1 person from Rwanda that considered the blog interesting enough to spend more than 5 minutes here.</p>
<p>And what made all those people come here? The 10 most popular posts of 2009 (excluding the <a href="http://antoniofarinha.com/blog/2009/05/29/the-googlefacebook-effect-or-how-i-got-to-1-in-google-and-had-6500-visits-in-1-hour/" target="_self">Facebook &#8220;incident&#8221;</a>, which alone caused about 50% of the total traffic) were:</p>
<ol>
<li><a href="http://antoniofarinha.com/blog/2009/08/05/barney-stinsons-get-psyched-mixes/" target="_self">Barney Stinson’s “Get Psyched” Mixes</a> (3,969)</li>
<li><a href="http://antoniofarinha.com/blog/2009/04/19/katy-perry-totally-looks-like-zooey-deschanel/" target="_self">Katy Perry Totally Looks Like Zooey Deschanel</a> (2,454)</li>
<li><a href="http://antoniofarinha.com/blog/2009/03/16/fixing-windows-live-messenger-8100030f-error/" target="_self">Fixing Windows Live Messenger 8100030F Error</a> (2,343)</li>
<li><a href="http://antoniofarinha.com/blog/2009/03/03/make-your-own-pop-art-with-warholizer/" target="_self">Make Your Own Pop Art With Warholizer</a> (1,851)</li>
<li><a href="http://antoniofarinha.com/blog/2009/03/24/ryanair-flight-attendant-edita-schindlerova-is-pornstar-edita-bente/" target="_self">Ryanair Flight Attendant Edita Schindlerova is Pornstar Edita Bente</a> (1,708)</li>
<li><a href="http://antoniofarinha.com/blog/2009/02/21/turn-your-picture-into-a-obama-hope-poster/" target="_self">Turn Your Picture Into a “Obama Hope Poster”</a> (1,490)</li>
<li><a href="http://antoniofarinha.com/blog/2009/05/25/listen-to-dave-matthews-band-new-album-for-free/" target="_self">Listen to Dave Matthews Band New Album For Free</a> (1,475)</li>
<li><a href="http://antoniofarinha.com/blog/2009/04/02/google-chrome-is-the-safest-browser-around/" target="_self">Google Chrome is The Safest Browser Around</a> (1,302)</li>
<li><a href="http://antoniofarinha.com/blog/2009/05/24/test-your-movie-skills-with-empire-magazines-the-cryptic-canvas-50-movies-hidden-in-a-painting/" target="_self">Test Your Movie Skills With Empire magazine’s The Cryptic Canvas – 50 Movies Hidden in a Painting</a> (1,300)</li>
<li><a href="http://antoniofarinha.com/blog/2009/06/20/the-cryptic-canvas-answers/" target="_self">The Cryptic Canvas Answers</a> (1,011)</li>
</ol>
<p>As far as content is concerned, <em>Flour Power</em> started off as a <span style="text-decoration: line-through;">daily</span> frequently updated diary of my &#8220;adventure&#8221; of leaving my home country for 6 months to live in <a href="http://antoniofarinha.com/blog/tag/galway/" target="_self">Galway</a>, Ireland. As those 6 monhts turned into a year (and now probably two), the frequency of said reports was reduced, and the type of posts changed with it. This is now a place where I post the most fun/interesting/useful stuff I find around the web, along with the occasional rant about whatever is bothering me at the moment. And that&#8217;s how I plan to keep it going forward.</p>
<p>So if you enjoyed it so far, stick around for a while longer. I&#8217;ll try not to disappoint <img src='http://antoniofarinha.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://antoniofarinha.com/blog/2010/01/20/one-year-of-flour-power/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress 2.8, Codename &#8220;Baker&#8221;, Now Available</title>
		<link>http://antoniofarinha.com/blog/2009/06/11/wordpress-2-8-codename-baker-is-out/</link>
		<comments>http://antoniofarinha.com/blog/2009/06/11/wordpress-2-8-codename-baker-is-out/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 12:33:09 +0000</pubDate>
		<dc:creator>Farinha</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress 2.8]]></category>

		<guid isPermaLink="false">http://antoniofarinha.com/blog/?p=1191</guid>
		<description><![CDATA[WordPress, the blog engine that powers this blog, has released it&#8217;s version 2.8, codenamed &#8220;Baker&#8221; (in dedication to the famed jazz musician Chet Baker). I&#8217;m not going into a lot of detail because you can see an explanation of the changes here and here, but the highlights are: New (easier to use) theme install capabilities; Syntax [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-1192" title="Wordpress logo" src="http://antoniofarinha.com/blog/wp-content/uploads/2009/06/wordpress-logo-200x200.jpg" alt="Wordpress logo" width="200" height="200" /><a href="http://wordpress.org/" target="_blank">WordPress</a>, the blog engine that powers this blog, has released it&#8217;s version 2.8, codenamed &#8220;Baker&#8221; (in dedication to the famed jazz musician <a href="http://en.wikipedia.org/wiki/Chet_Baker" target="_blank">Chet Baker</a>).</p>
<p>I&#8217;m not going into a lot of detail because you can see an explanation of the changes <a href="http://wordpress.org/development/2009/06/wordpress-28/" target="_blank">here</a> and <a href="http://codex.wordpress.org/Version_2.8" target="_blank">here</a>, but the highlights are:</p>
<ul>
<li>New (easier to use) theme install capabilities;</li>
<li>Syntax highlighting in the code editor (apparently not working in Google Chrome);</li>
<li>Improved Widget user interface and support for using more than one widget of the same type;</li>
<li>New screen options in every page to better organize the items on the screen.</li>
</ul>
<p>Also, WordPress claims they made a lot of speed improvements and corrected hundreds of bugs.</p>
<p>I&#8217;ve successfully upgraded to the new version via the automatic update (not without making a <a href="http://codex.wordpress.org/WordPress_Backups" target="_blank">backup</a> first) and everything seems to be working fine. Let me know if you detect any issues.</p>
<p><a href="http://wordpress.org/download/" target="_blank">Download page</a></p>
]]></content:encoded>
			<wfw:commentRss>http://antoniofarinha.com/blog/2009/06/11/wordpress-2-8-codename-baker-is-out/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Hack &#8211; Displaying Popular Posts</title>
		<link>http://antoniofarinha.com/blog/2009/02/12/wordpress-hack-displaying-popular-posts/</link>
		<comments>http://antoniofarinha.com/blog/2009/02/12/wordpress-hack-displaying-popular-posts/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 19:46:53 +0000</pubDate>
		<dc:creator>Farinha</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[popular]]></category>
		<category><![CDATA[post]]></category>

		<guid isPermaLink="false">http://antoniofarinha.com/blog/?p=276</guid>
		<description><![CDATA[On my quest to improve this blog, I just added a way of keeping track of how many views each post has, as well as a list of the most viewed (see the footer). I followed a tip from Pedro (blog in Portuguese) and went for the WP-PostViews plugin. It basically adds a couple of fields [...]]]></description>
			<content:encoded><![CDATA[<p>On my quest to improve this blog, I just added a way of keeping track of how many views each post has, as well as a list of the most viewed (see <a href="http://antoniofarinha.com/blog/#footer" target="_self">the footer</a>).</p>
<p>I followed a tip from <a href="http://blog.aloneinkyoto.net/" target="_blank">Pedro</a> (blog in Portuguese) and went for the <a href="http://wordpress.org/extend/plugins/wp-postviews/" target="_blank">WP-PostViews</a> plugin. It basically adds a couple of fields in the database and some functions to update each post&#8217;s view count and display it.</p>
<p>The installation is very easy. It&#8217;s all explained <a href="http://lesterchan.net/wordpress/readme/wp-postviews.html" target="_blank">here</a>, including how to use it. Basically: install (you can use the WordPress auto installer), activate, and then add a snippet of code wherever you want the info displayed.</p>
<pre class="prettyprint">&lt;?php if (function_exists('get_most_viewed')): ?&gt;
   &lt;ul&gt;
      &lt;?php get_most_viewed(); ?&gt;
   &lt;/ul&gt;
&lt;?php endif; ?&gt;</pre>
<p>That&#8217;s the code to display the most viewed posts. You can also display the least viewed and the count for each individual post.</p>
<p>More plugins can be found from the same guy who did this one, <a href="http://lesterchan.net/portfolio/programming/php/" target="_blank">Lester Chen</a>. I might take a look at them in the future, there seems to be some neat stuff there.</p>
]]></content:encoded>
			<wfw:commentRss>http://antoniofarinha.com/blog/2009/02/12/wordpress-hack-displaying-popular-posts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Hack &#8211; Float a Specific Set of Posts to the Top of the Main Page</title>
		<link>http://antoniofarinha.com/blog/2009/02/09/wordpress-hack-float-a-specific-set-of-posts-to-the-top-of-the-main-page/</link>
		<comments>http://antoniofarinha.com/blog/2009/02/09/wordpress-hack-float-a-specific-set-of-posts-to-the-top-of-the-main-page/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 15:36:20 +0000</pubDate>
		<dc:creator>Farinha</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[Sticky]]></category>

		<guid isPermaLink="false">http://antoniofarinha.com/blog/?p=181</guid>
		<description><![CDATA[This is the first post of what I expect to become a series about WordPress hacks, i.e., small tweaks that I&#8217;ll be doing to customize this blog&#8217;s WordPress functionality. The most observant of readers might have noticed something that can look a bit weird. The order of the posts in the blog&#8217;s main page is not [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first post of what I expect to become a series about WordPress hacks, i.e., small tweaks that I&#8217;ll be doing to customize this blog&#8217;s WordPress functionality.</p>
<p>The most observant of readers might have noticed something that can look a bit weird. The order of the posts in the blog&#8217;s main page is not the same as the order in &#8220;Recent Posts&#8221; or in the <a href="http://antoniofarinha.com/blog/feed/" target="_self">RSS Feed</a>. What&#8217;s happening is I&#8217;m making some posts &#8220;sticky&#8221;, that is, they&#8217;ll cling to the top of the homepage even if I post something else afterwards, instead of just having all the post showing up in reverse chronological order.</p>
<p>Let me explain the reason for this. The main objective of this blog is to share my personal adventures now that I left my hometown to work abroad. But sometimes I like to post some other random stuff, like the review of a TV show, some cool web application,  a rant about something that&#8217;s annoying me, or just something funny I found on the Internet. To help keeping the blog on track, I&#8217;ve chosen to always float the latest post from the <a href="http://antoniofarinha.com/blog/category/personal/" target="_self">Personal category</a> (the one where I file all the posts related to my day-to-day happenings) to the top. This way, blog visitors will always see one post from that category at the top of the homepage.</p>
<p>OK, now for the hack itself. The WordPress main page is basically a loop that goes through all the published posts and displays them:</p>
<pre class="prettyprint">&lt;?php
if (have_posts()) : ?&gt;
  &lt;?php while (have_posts()) : the_post(); ?&gt;
  // display post and related metadata
&lt;?php endwhile; ?&gt;</pre>
<p>So, to achieve the intended functionality, I added some code to display the post I want floated to the top. It&#8217;s basically the same as the main loop, but I use <a href="http://www.google.co.uk/url?sa=U&amp;start=1&amp;q=http://codex.wordpress.org/Function_Reference/WP_Query&amp;ei=aESQSeuHN8e_tgeLhPCHCw&amp;sig2=TybRL2i3U_DYu_tlO6940w&amp;usg=AFQjCNG034gER4Z3VYU42DKY2QGvvhlYCw" target="_blank">WP_Query()</a> to retrive the post I want to display. Note that you need to store the id of the post in some variable so that you can skip it in the main loop (or else it would show up twice). Also note that <a href="http://return-true.com/using-wp_query-to-make-custom-queries-within-wordpress-templates/282/" target="_blank">some tweeking</a> has to be done to account for a WordPress &#8220;feature&#8221; that makes the tags on the first post to disappear. The resulting code (cropped for simplicity) is:</p>
<pre class="prettyprint">// sticky post(s)
&lt;?php
$wp_query = null;
$wp_query = new WP_Query();
$wp_query-&gt;query('category_name=Personal&amp;showposts=1');
while ($wp_query-&gt;have_posts()) : $wp_query-&gt;the_post();
  $do_not_duplicate = $post-&gt;ID;?&gt;
  // display post and related metadata
&lt;?php endwhile; ?&gt;

// all the rest
&lt;?php
//query_posts('');
$wp_query = null;
$wp_query = $temp;
if (have_posts()) : ?&gt;
&lt;?php while (have_posts()) : the_post(); if( $post-&gt;ID == $do_not_duplicate) continue; ?&gt;
  // display post and related metadata
&lt;?php endwhile; ?&gt;</pre>
<p>You can easily control what you want displayed on top by parametrizing WP_Query() as you like. And the only change will be in the homepage, everything else will be in it&#8217;s &#8220;normal&#8221; state.</p>
<p><strong>UPDATE:</strong> It seems that this &#8220;hack&#8221; caused the pagination to stop working. To solve I just had to assign the <em>$temp</em> value we stored in the beginning to the <em>$wp_query</em> variable. The code above has been corrected. Full explanation <a href="http://weblogtoolscollection.com/archives/2008/04/19/paging-and-custom-wordpress-loops/" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://antoniofarinha.com/blog/2009/02/09/wordpress-hack-float-a-specific-set-of-posts-to-the-top-of-the-main-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

