<?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>Een onsje meer &#187; php</title>
	<atom:link href="http://blog.jongbelegen.net/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.jongbelegen.net</link>
	<description>Jongbelegen.net bedrijfsweblog. Nieuws, informatie, inzichten</description>
	<lastBuildDate>Thu, 11 Mar 2010 14:41:22 +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>How to add the uberVU reaction counter to posts using WordPress &#8211; Thesis</title>
		<link>http://blog.jongbelegen.net/howto-add-ubervu-counter-wordpress/</link>
		<comments>http://blog.jongbelegen.net/howto-add-ubervu-counter-wordpress/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 20:55:29 +0000</pubDate>
		<dc:creator>jules</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[thesis]]></category>
		<category><![CDATA[ubervu]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.jongbelegen.net/?p=197</guid>
		<description><![CDATA[Adding the uberVU reaction counter to a webpage is simple. Nevertheless, I ran into some issues, which I overcame and would like to share: 
I use WordPress with the Thesis theme and made a routine in custom_functions.php to do the trick. The code (below) does the following:

Strip extra URL parameters
Only display on single posts (not [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Adding the <a href="http://blog.ubervu.com/post/286130407/integrate-the-ubervu-badge-on-your-website">uberVU reaction counter to a webpage</a> is simple. Nevertheless, I ran into some issues, which I overcame and would like to share: </p>
<p>I use WordPress with the Thesis theme and made a routine in <em>custom_functions.php</em> to do the trick. The code (below) does the following:</p>
<ul>
<li>Strip extra URL parameters</li>
<li>Only display on single posts (not on pages)</li>
<li>Insert the badge after the pot headline using the appropriate Thesis hook</li>
</ul>
<p>Here&#8217;s the code I used to insert the counter next to the post:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> jbl_ubervu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_single<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;div class=&quot;ubervu_button&quot; style=&quot;float: right; margin-left: 5px; margin-right:5px;&quot;&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
      var ubervu_url = &quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_permalink<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;;
      var ubervu_style = &quot;compact&quot;;
    &lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;http://badge.ubervu.com/badge.1.0.js&quot;&gt;&lt;/script&gt;
    &lt;/div&gt;
  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> 
<span style="color: #009900;">&#125;</span>
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'thesis_hook_after_headline'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'jbl_ubervu'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>The reason for using the permalink is to strip extra url variables, like Google Analtytics campaign parameters. The uberVU script can never know which parameters to ignore, so you might end up with different counters.</p>
<p class="note">Hack away, cut-and-paste, and leave a comment if it works for you or not.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jongbelegen.net/howto-add-ubervu-counter-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
