<?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>Philaahzophy &#187; GaMerz</title>
	<atom:link href="http://www.philaahzophy.com/tag/gamerz/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.philaahzophy.com</link>
	<description>The Four Fs of Philaahzophy: Freedom, Fatherhood, Fun and Finance</description>
	<lastBuildDate>Sun, 18 Apr 2010 21:31:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using A Default Rating With WP-PostRatings Plugin</title>
		<link>http://www.philaahzophy.com/2009/01/07/using-a-default-rating-with-wp-postratings-plugin/</link>
		<comments>http://www.philaahzophy.com/2009/01/07/using-a-default-rating-with-wp-postratings-plugin/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 10:16:24 +0000</pubDate>
		<dc:creator>Aahz</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Wonderful WordPress Wednesdays]]></category>
		<category><![CDATA[GaMerz]]></category>
		<category><![CDATA[Lester Chan]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[Series]]></category>
		<category><![CDATA[Wonderful Wordpress Wednesday]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[wordpress blog]]></category>
		<category><![CDATA[WP-PostRatings]]></category>

		<guid isPermaLink="false">http://www.philaahzophy.com/?p=1092</guid>
		<description><![CDATA[<style type="text/css">
<!--
.nmstitle {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 13px;
	text-transform: capitalize;
	color: #003333;
}

.nmsdesc {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;

	color: #003333;
}
-->
</style><div class=’series_links’><h5>Part of the Wonderful WordPress Wednesdays Series - <a href='http://www.philaahzophy.com/2008/12/24/importing-large-mysql-databases-with-bigdump/' title='Importing Large MySQL Databases With BigDump'>Previous in series</a> &#160; &#160; &#160; &#160;&#160;<a href='http://www.philaahzophy.com/2009/01/14/victory-over-the-comment-spammers/' title='Victory Over The Comment Spammers'>Next in series</a></h5></div><p>Welcome to the eleventh installment of my <a href="http://www.philaahzophy.com/category/series/wonderful-wordpress-wednesdays/"><strong>Wonderful WordPress</strong></a>&#8230;</p><p>Post from: <a href="http://www.philaahzophy.com">Philaahzophy</a><br/><br/><a href="http://www.philaahzophy.com/2009/01/07/using-a-default-rating-with-wp-postratings-plugin/">Using A Default Rating With WP-PostRatings Plugin</a></p>
]]></description>
			<content:encoded><![CDATA[<style type="text/css">
<!--
.nmstitle {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 13px;
	text-transform: capitalize;
	color: #003333;
}

.nmsdesc {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;

	color: #003333;
}
-->
</style><div class=’series_links’><h5>Part of the Wonderful WordPress Wednesdays Series - <a href='http://www.philaahzophy.com/2008/12/24/importing-large-mysql-databases-with-bigdump/' title='Importing Large MySQL Databases With BigDump'>Previous in series</a> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<a href='http://www.philaahzophy.com/2009/01/14/victory-over-the-comment-spammers/' title='Victory Over The Comment Spammers'>Next in series</a></h5></div><p>Welcome to the eleventh installment of my <a href="http://www.philaahzophy.com/category/series/wonderful-wordpress-wednesdays/"><strong>Wonderful WordPress Wednesday</strong></a> series. <a href="http://www.shareapic.net/content.php?id=10717571&amp;owner=Aahz" target="_blank"><img class="pic" src="http://preview.shareapic.net/preview3/010717571.jpg" border="0" alt="" width="130" height="130" align="left" /></a> Today&#8217;s lesson is a quick little hack for one of my favorite plugins: <a href="http://lesterchan.net/portfolio/programming/php/#wp-postratings" target="_blank">WP-PostRatings</a> (by the irrepressible<a href="http://lesterchan.net/" target="_blank"> Lester &#8216;GaMerZ&#8217; Chan</a>) which adds an AJAX rating system for your WordPress blog&#8217;s posts.  I don&#8217;t use it here on Philaahzophy, but it&#8217;s a vital part of several other blogs that I manage.</p>
<p>My problem occurred on my <a href="http://www.onridevideo.com" target="_blank">amusement park and roller coaster video blog</a> where I also use a plugin (that I <a href="http://www.philaahzophy.com/2008/09/17/can-your-wordpress-blog-see-the-future-mine-can/" target="_blank">previously wrote about</a>) to schedule posts for future dates.  You see, I&#8217;ve noticed that people are far more likely to actually rate a post if others have already done so.  Therefore I was visiting each post after it was published and rating it myself.  This can become bothersome since I schedule posts on that blog days or even weeks in advance.  What I needed was for the WP-PostRatings plugin to add a default rating score to every post <em>as it was published</em>.  Luckily, with a little poking around and some help from more PHP-knowledgeable friends I was able to come up with a solution.</p>
<p>Simply navigate to Plugins &gt; Editor &gt; WP-PostRatings in your WordPress admin area and scroll down to lines 763-766 which read as follows:</p>
<blockquote><p><code>add_post_meta($post_ID, 'ratings_users', 0, true);<br />
add_post_meta($post_ID, 'ratings_score', 0, true);<br />
add_post_meta($post_ID, 'ratings_average', 0, true);</code></p></blockquote>
<p>Now, change the values in each variable to reflect your default ratings.  For example, to have each post be published with a single rating and a score of 4 you would change the code to appear as follows-</p>
<blockquote><p><code>add_post_meta($post_ID, 'ratings_users', 1, true);<br />
add_post_meta($post_ID, 'ratings_score', 4, true);<br />
add_post_meta($post_ID, 'ratings_average', 4, true);</code></p></blockquote>
<p>You can set whatever default ratings you like, but make sure that your math works out or you&#8217;re likely to get some type of error.</p>
<ul>
<li><code>ratings_users</code> refers to the number of different people that have entered their rating</li>
<li><code>ratings_score</code> is the total value of all the ratings thus far added together</li>
<li><code>ratings_average</code> is the current score of the post</li>
</ul>
<p>So you&#8217;ll want to make sure that <code>ratings_score</code> divided by <code>ratings_users</code> is equal to <code>ratings_average</code>.  If you&#8217;re worried about the math, just use the values in the example above and all of your posts will publish with a rating of 4 granted by a single user (you do think all of your posts are worthy of at least 4 out of 5 stars, don&#8217;t you?).</p>
<p>As always, if you have any difficulty with this tip, questions about using WordPress more effectively, suggestions for future articles in this series, or just want to say &#8216;Hi&#8217; or &#8216;Thanks&#8217;, comments are always very much appreciated!  And if you found this post useful or informative, please consider adding it to your choice  social bookmarking sites (StumbleUpon, Digg, Reddit, etc).</p>
<p>Post from: <a href="http://www.philaahzophy.com">Philaahzophy</a><br/><br/><a href="http://www.philaahzophy.com/2009/01/07/using-a-default-rating-with-wp-postratings-plugin/">Using A Default Rating With WP-PostRatings Plugin</a></p>
 <div class=’series_links’><h5>Part of the Wonderful WordPress Wednesdays Series - <a href='http://www.philaahzophy.com/2008/12/24/importing-large-mysql-databases-with-bigdump/' title='Importing Large MySQL Databases With BigDump'>Previous in series</a> &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;<a href='http://www.philaahzophy.com/2009/01/14/victory-over-the-comment-spammers/' title='Victory Over The Comment Spammers'>Next in series</a></h5></div><div class=’series_toc’><h4>The Complete Wonderful WordPress Wednesdays Series-</h4>
<ilayer name="scroll1" width=500 height=148 clip="0,0,170,150">
<layer name="scroll2" width=500 height=148bgColor="#e1ccac">
<div id="scroll3" style="width:500px;height:148px;background-color:#e1ccac;overflow:scroll">
<ol><li><a href='http://www.philaahzophy.com/2008/08/19/introducing-wonderful-wordpress-wednesdays/' title='Introducing Wonderful WordPress Wednesdays!'>Introducing Wonderful WordPress Wednesdays!</a></li><li><a href='http://www.philaahzophy.com/2008/08/20/lighten-the-load-of-your-wordpress-blog-part-one/' title='Lighten The Load Of Your WordPress Blog &#8211; Part One'>Lighten The Load Of Your WordPress Blog &#8211; Part One</a></li><li><a href='http://www.philaahzophy.com/2008/08/27/lighten-the-load-of-your-wordpress-blog-part-two/' title='Lighten The Load Of Your WordPress Blog &#8211; Part Two'>Lighten The Load Of Your WordPress Blog &#8211; Part Two</a></li><li><a href='http://www.philaahzophy.com/2008/09/03/top-five-wordpress-plugins-to-install-before-you-start-blogging/' title='Starting A Blog? Install These 5 WordPress Plugins First!'>Starting A Blog? Install These 5 WordPress Plugins First!</a></li><li><a href='http://www.philaahzophy.com/2008/09/10/popularity-protection-for-your-wordpress-blog/' title='Popularity Protection For Your WordPress Blog'>Popularity Protection For Your WordPress Blog</a></li><li><a href='http://www.philaahzophy.com/2008/09/17/can-your-wordpress-blog-see-the-future-mine-can/' title='Can Your WordPress Blog See The Future?  Mine Can!'>Can Your WordPress Blog See The Future?  Mine Can!</a></li><li><a href='http://www.philaahzophy.com/2008/09/24/moving-your-wordpress-blog-to-a-new-web-server-in-10-easy-steps/' title='Moving Your WordPress Blog To A New Web Server In 10 Easy Steps'>Moving Your WordPress Blog To A New Web Server In 10 Easy Steps</a></li><li><a href='http://www.philaahzophy.com/2008/11/19/pretty-blog-pictures-thanks-to-css/' title='Pretty Blog Pictures Thanks To CSS!'>Pretty Blog Pictures Thanks To CSS!</a></li><li><a href='http://www.philaahzophy.com/2008/12/10/falling-in-love-all-over-again-wordpress-27/' title='Falling In Love All Over Again &#8211; WordPress 2.7'>Falling In Love All Over Again &#8211; WordPress 2.7</a></li><li><a href='http://www.philaahzophy.com/2008/12/17/sponsors-determine-blog-layout/' title='Stop Letting Sponsors Determine Your Blog Layout!'>Stop Letting Sponsors Determine Your Blog Layout!</a></li><li><a href='http://www.philaahzophy.com/2008/12/24/importing-large-mysql-databases-with-bigdump/' title='Importing Large MySQL Databases With BigDump'>Importing Large MySQL Databases With BigDump</a></li><li>Using A Default Rating With WP-PostRatings Plugin</li><li><a href='http://www.philaahzophy.com/2009/01/14/victory-over-the-comment-spammers/' title='Victory Over The Comment Spammers'>Victory Over The Comment Spammers</a></li></ol>
</div>
</layer>
</ilayer>
<br>
</div>
	<em><strong>Tags: </em></strong><a href="http://www.philaahzophy.com/tag/gamerz/" title="GaMerz" rel="tag">GaMerz</a><strong>, </strong><a href="http://www.philaahzophy.com/tag/lester-chan/" title="Lester Chan" rel="tag">Lester Chan</a><strong>, </strong><a href="http://www.philaahzophy.com/tag/php/" title="PHP" rel="tag">PHP</a><strong>, </strong><a href="http://www.philaahzophy.com/tag/plugins/" title="plugins" rel="tag">plugins</a><strong>, </strong><a href="http://www.philaahzophy.com/tag/series/" title="Series" rel="tag">Series</a><strong>, </strong><a href="http://www.philaahzophy.com/tag/wonderful-wordpress-wednesday/" title="Wonderful Wordpress Wednesday" rel="tag">Wonderful Wordpress Wednesday</a><strong>, </strong><a href="http://www.philaahzophy.com/tag/wordpress/" title="WordPress" rel="tag">WordPress</a><strong>, </strong><a href="http://www.philaahzophy.com/tag/wordpress-blog/" title="wordpress blog" rel="tag">wordpress blog</a><strong>, </strong><a href="http://www.philaahzophy.com/tag/wp-postratings/" title="WP-PostRatings" rel="tag">WP-PostRatings</a><br /><em><strong>Related Posts:</strong></em>

	<ul class="st-related-posts">
	<li><a href="http://www.philaahzophy.com/2008/09/03/top-five-wordpress-plugins-to-install-before-you-start-blogging/" title="Starting A Blog? Install These 5 WordPress Plugins First! (Welcome to the third installment of my Wonderful WordPress Wednesday series!


Over the last two weeks we looked at simple steps you could take to improve the efficiency of your WordPress blog.  This week we're going to back up a little bit and look at how to set up a blog, or, more specifically, the [...])">Starting A Blog? Install These 5 WordPress Plugins First! - September 3, 2008 - 6 common tags</a></li>
	<li><a href="http://www.philaahzophy.com/2008/09/10/popularity-protection-for-your-wordpress-blog/" title="Popularity Protection For Your WordPress Blog (

This fourth installment of my Wonderful WordPress Wednesday series was inspired by an event that occured right here at Philaahzophy earlier this week.  One of my stories, Still Think Google's PageRank Means Something, became so popular on StumbleUpon that not only did my blog go offline, but the web hosting server that holds it [...])">Popularity Protection For Your WordPress Blog - September 10, 2008 - 6 common tags</a></li>
	<li><a href="http://www.philaahzophy.com/2008/08/27/lighten-the-load-of-your-wordpress-blog-part-two/" title="Lighten The Load Of Your WordPress Blog &#8211; Part Two (Welcome to the second installment of my  Wonderful WordPress Wednesday series!


Last week we looked at two simple steps you could take to improve the efficiency of your WordPress blog.  It's already working hard to present your priceless thoughts and opinions to your readers, so we might as well do what we can to make [...])">Lighten The Load Of Your WordPress Blog &#8211; Part Two - August 27, 2008 - 5 common tags</a></li>
	<li><a href="http://www.philaahzophy.com/2008/09/17/can-your-wordpress-blog-see-the-future-mine-can/" title="Can Your WordPress Blog See The Future?  Mine Can! (Welcome to the fifth installment of my Wonderful WordPress Wednesday series. 

This week we're going to take take our WordPress blogs into the future!  Okay, not literally, but figuratively.  Well, maybe not figuratively either, but.  Well, just read on...

I've been kind of obsessed with the idea of "one-a-day" blogs of late.  [...])">Can Your WordPress Blog See The Future?  Mine Can! - September 17, 2008 - 5 common tags</a></li>
	<li><a href="http://www.philaahzophy.com/2009/01/14/victory-over-the-comment-spammers/" title="Victory Over The Comment Spammers (Welcome to the twelfth installment of my Wonderful WordPress Wednesday series. 

With more than 20 blogs to watch over, comment spam has become quite the annoying time killer of late.  With more than 200 Akismet entries to sort through each day it became clear that something else had to be done, so I headed into [...])">Victory Over The Comment Spammers - January 14, 2009 - 4 common tags</a></li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://www.philaahzophy.com/2009/01/07/using-a-default-rating-with-wp-postratings-plugin/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
