<?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>Themocracy WordPress Themes &#187; Plugins</title>
	<atom:link href="http://themocracy.com/category/wordpress-plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://themocracy.com</link>
	<description>WordPress Theme Design</description>
	<lastBuildDate>Mon, 26 Jul 2010 06:18:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WP-Cron &#8211; automating and scheduling</title>
		<link>http://themocracy.com/2010/02/wp-cron-automating-scheduling/</link>
		<comments>http://themocracy.com/2010/02/wp-cron-automating-scheduling/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 06:51:03 +0000</pubDate>
		<dc:creator>Barrie</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://themocracy.com/?p=260</guid>
		<description><![CDATA[You need a cron job in your WordPress blog - something run to a schedule, hourly, daily...  Instead of fixing up a crontab and using wget or lynx, you can use WordPress's internal version of the cron job.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthemocracy.com%2F2010%2F02%2Fwp-cron-automating-scheduling%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthemocracy.com%2F2010%2F02%2Fwp-cron-automating-scheduling%2F" height="61" width="51" /></a></div><p><strong>You need a cron job in your WordPress blog</strong> &#8211; something run to a schedule, hourly, daily&#8230;  Instead of fixing up a crontab and using wget or lynx, you can use WordPress&#8217;s internal version of the cron job.</p>
<p>This isn&#8217;t a true cron job, with a crontab text file sitting on the server &#8211; it&#8217;s known as a pseudo-cron. Since a script can&#8217;t launch itself, it makes use of a visitor, human or maybe robot, launching it by requesting a page. So the job actually runs at the first launch <em>after</em> the scheduled time, not necessarily at the scheduled time to the exact second.</p>
<h3>wp_schedule_event()</h3>
<p>The most convenient way of using WP-Cron is to wrap it all up in a plugin &#8211; so that the scheduling can be done just the once by including it in the plugin activation function.</p>
<pre class="brush: php">
register_activation_hook(__FILE__, &#039;my_activation&#039;);
add_action(&#039;my_hourly_event&#039;, &#039;do_this_hourly&#039;);
register_deactivation_hook(__FILE__, &#039;my_deactivation&#039;); 

function my_activation() {
wp_schedule_event(time(), &#039;hourly&#039;, &#039;my_hourly_event&#039;);
}

function my_deactivation() {
	wp_clear_scheduled_hook(&#039;my_hourly_event&#039;);
}

function do_this_hourly() {
	// do something here every hour
}
</pre>
<p>The PHP time() used as an argument indicates &#8220;as of now&#8221; &#8211; so if the plugin is activated at 11:23, an hourly event is going to run at xx:23 from now onwards.</p>
<p>If your code is in for example <strong>functions.php</strong> and is executed every time the script is executed, you don&#8217;t want to keep scheduling the same event. Something like this prevents the problem:-</p>
<pre class="brush: php">
if (empty(wp_next_scheduled(&#039;my_event&#039;)))
		wp_schedule_event(time(), &#039;daily&#039;, &#039;my_event&#039;);
</pre>
<h3> WP-Cron Hourly, Recurrence Intervals</h3>
<p>Only <strong>hourly</strong>, <strong>daily</strong> and <strong>twicedaily</strong> are available immediately &#8211;  but there&#8217;s a trick to getting more and that&#8217;s to tap into the cron_schedules filter and add a key to the schedules array.</p>
<pre class="brush: php">
add_filter(&#039;cron_schedules&#039;, &#039;my_add_weekly&#039;);

function my_add_weekly( $schedules ) {
	$schedules[&#039;weekly&#039;] = array(
		&#039;interval&#039; =&gt; 604800, //that&#039;s how many seconds in a week, for the unix timestamp
		&#039;display&#039; =&gt; __(&#039;Once Weekly&#039;)
	);
	return $schedules;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://themocracy.com/2010/02/wp-cron-automating-scheduling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Comments Plugins</title>
		<link>http://themocracy.com/2010/02/wordpress-comments-plugins/</link>
		<comments>http://themocracy.com/2010/02/wordpress-comments-plugins/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 06:27:41 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[comments]]></category>

		<guid isPermaLink="false">http://themocracy.com/?p=239</guid>
		<description><![CDATA[We spend enough time on the blog content and then tend to forget about the comments part. Comments are the way to get people involved - build up a blog's readership etc etc. A few, sensible, comments trickling in will freshen up a page's content and make it not seem completely dead in the water to passing search engine crawlers...

And the good news, there's plenty of comment-related plugins available to get the job done.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthemocracy.com%2F2010%2F02%2Fwordpress-comments-plugins%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthemocracy.com%2F2010%2F02%2Fwordpress-comments-plugins%2F" height="61" width="51" /></a></div><p><img class="alignright size-full wp-image-240" title="comments" src="http://themocracy.com/wp-content/uploads/2010/02/comments.gif" alt="" width="128" height="128" /><strong>We spend enough time on the blog content and then tend to forget about the comments part</strong>. Comments are the way to get people involved &#8211; build up a blog&#8217;s readership etc etc. A few, sensible, comments trickling in will freshen up a page&#8217;s content and make it not seem completely dead in the water to passing search engine crawlers&#8230;</p>
<p>And the good news, there&#8217;s plenty of comment-related plugins available to get the job done.<br />
<span id="more-239"></span><br />
First up, though, before anything else &#8211; make sure your WP theme and wordpress version are capable of handling threaded- (definitely) and paged- (probably) comments.</p>
<h3>The Plugins</h3>
<p><strong>Added Value for Comments</strong></p>
<p><a href="http://www.semiologic.com/software/dofollow/">DoFollow</a><br />
By default, WordPress slaps a nofollow attribute on any comment author&#8217;s web site link displayed &#8211; if you&#8217;re not sure what nofollow is, more info <a href="http://www.semiologic.com/resources/seo/nofollow/">here</a>. DoFollow removes this attribute from web site links in comments so search engines can follow them &#8211; offering an incentive for people to leave a sensible, or otherwise, comment as they pass by. Which is clearly going to attract spammers as well &#8211; always use together with comment moderation.<br />
<img class="alignright size-full wp-image-241" title="mw402" src="http://themocracy.com/wp-content/uploads/2010/02/mw402.png" alt="" width="190" height="87" /><br />
<a href="http://comluv.com/">CommentLuv</a><br />
An elaboration of the first &#8211; more incentives to leave a comment by displaying info about the commentator&#8217;s site, with links, such as a selection of their latest blog posts, tweets or diggs.<br />
<a href="http://wordpress.org/extend/plugins/subscribe-to-comments/"><br />
Subscribe to Comments</a><br />
Enables commentators to sign up for email notification of subsequent comments &#8211; so they can keep in the flow of the discussion.<br />
One operating annoyance with this setup &#8211; not the fault of the plugin &#8211; involves the dicks who comment using an email address they&#8217;ve slapped a spam authentication filter on &#8211; so that the poor old WP webmaster gets an email demand for authentication for every subsequent comment until they get round to deleting the offender  &#8211; a little knowledge being a dangerous thing etc.</p>
<h3>Displaying Comments</h3>
<p><a href="http://media.smashingmagazine.com/cdn_smash/images/twitter-avatars-wordpress-comments-plugin/twittar.zip">Twittar </a><br />
Displays, as an alternative to Automattic&#8217;s gravatar, the comentator&#8217;s Twitter avatar &#8211; if existent&#8230;</p>
<p><img class="alignright size-full wp-image-242" src="http://themocracy.com/wp-content/uploads/2010/02/mw401.png" alt="" width="252" height="57" /><a href="http://www.gdstarrating.com/downloads/plugin/">GD Star Rating</a><br />
Does depend on the context of your blog, as to whether a comments rating system has value &#8211; might be overkill for the average blog&#8230;</p>
<p><a href="http://wordpress.org/extend/plugins/gravatar-signup/">Gravatar Signup</a><br />
Adds a checkbox to the comment form for users who don&#8217;t have a Gravatar, giving the option to then go on and sign up for one. Prevents the march of grey men down blog comments&#8230;</p>
<p><a href="http://wordpress.org/extend/plugins/easy-comment-uploads/">Easy Comment Uploads</a><br />
Allows a commentator to upload images or other files, togehter with adding their comment &#8211; with lightbox display for all added images. It&#8217;s obviously wise to be conservative about which file-types you let visitors upload &#8211; especially for non-image types.</p>
<p><a href="http://wordpress.org/extend/plugins/ajax-comment-preview/">Ajax Comment Preview</a><br />
Runs the comment text through the WordPress filters to show a preview &#8211; can be useful if commentators are likely to be adding code snippets etc.</p>
<p>Not  &#8220;comments&#8221; plugins as such, but&#8230; There are lots of ways of displaying and defining &#8220;Popular Posts&#8221; &#8211; simplest is to go for the posts with the most comments, for example:-</p>
<p><a href="http://wordpress.org/extend/plugins/most-commented/">Most Commented Widget</a><br />
Adds a sidebar widget displaying an ordered list of the posts/pages with the most comments &#8211; shows where the action is.</p>
<p><a href="http://wordpress.org/extend/plugins/top-commentators-widget/">Top Commentators Widget</a><br />
Appeal to their vanity&#8230; and gain spammers.</p>
<h3>Anti-Spam Comment Plugins</h3>
<p>There&#8217;s always Akismet, but there&#8217;s also:</p>
<p><a href="http://wordpress.org/extend/plugins/bad-behavior/">Bad Behavior </a><br />
Attempts to filter out bots by analyzing HTTP requests. Does seem to make a significant difference in server load, monthly bandwidth, for well-established blogs.</p>
<p><a href="http://wordpress.org/extend/plugins/openid/">OpenID</a><br />
Asks commentators to sign in before commenting, using their OpenID.<br />
(Update: doesn&#8217;t seem 100% functional at the time of writing&#8230;)</p>
<p>One small warning &#8211; quite a lot of the plugins offered in the WordPress plugin repository are broken or obsolete, due to the arrival of threaded and paged comments. They (probably) won&#8217;t break the whole install if you run them, but don&#8217;t be too surprised if they don&#8217;t do what they&#8217;re supposed to&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://themocracy.com/2010/02/wordpress-comments-plugins/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>JQuery, Cufon and WordPress</title>
		<link>http://themocracy.com/2010/01/jquery-cufon-and-wordpress/</link>
		<comments>http://themocracy.com/2010/01/jquery-cufon-and-wordpress/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 13:48:58 +0000</pubDate>
		<dc:creator>Lisa</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[cufon]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://themocracy.com/?p=209</guid>
		<description><![CDATA[Just at the moment the best font replacement technique around is cufón – so how to get this technique into your WordPress theme design?]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: left; margin-right: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthemocracy.com%2F2010%2F01%2Fjquery-cufon-and-wordpress%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthemocracy.com%2F2010%2F01%2Fjquery-cufon-and-wordpress%2F" height="61" width="51" /></a></div><p><img class="alignright size-thumbnail wp-image-207" title="wordpress-250x250" src="http://themocracy.com/wp-content/uploads/2010/01/wordpress-250x250-150x150.png" alt="" width="150" height="150" />Just at the moment the best font replacement technique around is <a href="http://wiki.github.com/sorccu/cufon/">cufón</a> &#8211; so how to get this technique into your WordPress theme design?</p>
<p>You&#8217;ll need 3 javascript files &#8211; best to put them in the theme directory under /scripts</p>
<p>1. The Cufon javascript<br />
2. The individual font javascript &#8211; downloaded from cufon &#8211; or use their excellent generator http://cufon.shoqolate.com/generate/  (not all fonts as .ttf will do the trick, there&#8217;s issues of licensing in terms of web embedding)<br />
3. A custom script, very simple, just to activate.<br />
<span id="more-209"></span><br />
The plan is to get the scripts loading in the WP header, and the best action hook for this is <strong>template_redirect</strong> &#8211; so, in <strong>functions.php</strong></p>
<pre class="brush: php">
add_action(&#039;template_redirect&#039;, &#039;them_js_head_load&#039;);

function them_js_head_load(){

define(TH_TEMPLATE_URL, get_bloginfo(&#039;template_url&#039;));

wp_register_script(&#039;cufon&#039;, TH_TEMPLATE_URL . &#039;/scripts/cufon-yui.js&#039;, array(&#039;jquery&#039;), &#039;1.0&#039;);
wp_register_script(&#039;my_font&#039;, TH_TEMPLATE_URL . &#039;/scripts/myfont.font.js&#039;, array(&#039;jquery&#039;), &#039;1.0&#039;);
wp_enqueue_script(&#039;fontsactivate&#039;, TH_TEMPLATE_URL . &#039;/scripts/fontsactivate.js&#039;, array(&#039;jquery&#039;, &#039;cufon&#039;, &#039;them_font&#039;), &#039;1.0&#039;);
}
</pre>
<p><strong>fontsactivate.js</strong> is as simple as you want to make it &#8211; just this, for example, will replace all post h2 headings on the page</p>
<pre class="brush: js">
Cufon.replace(&#039;.post h2&#039;);
</pre>
<p>Don&#8217;t imagine it&#8217;s a great idea to replace all the text on a page with a custom font, that&#8217;ll make the server chug a bit &#8211; stick with headings&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://themocracy.com/2010/01/jquery-cufon-and-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

