<?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>WordPress Web Hosting &#187; wordpress plugin</title>
	<atom:link href="http://www.shrewdies.net/blog/wordpress-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shrewdies.net</link>
	<description>Business Web Hosting For Shrewdies Not Dummies</description>
	<lastBuildDate>Thu, 01 Jul 2010 06:41:39 +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>WordPress Plugin: Promotion Tool</title>
		<link>http://www.shrewdies.net/1558/promotion-tools-plugins-wordpress/</link>
		<comments>http://www.shrewdies.net/1558/promotion-tools-plugins-wordpress/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 13:34:21 +0000</pubDate>
		<dc:creator>Keith from shrewdies</dc:creator>
				<category><![CDATA[Form]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[Happiness Today]]></category>
		<category><![CDATA[WordPress blogging]]></category>
		<category><![CDATA[wordpress plugin]]></category>
		<category><![CDATA[WordPress Pods CMS]]></category>

		<guid isPermaLink="false">http://www.shrewdies.net/?p=1558</guid>
		<description><![CDATA[Many of you looking for a WordPress plugin promotion tool have stumbled across my Happiness Today plugin. You seem disappointed that the next version is where the real promotion potential lies, but the good news is that you do not need to wait. If you have downloaded and activated Happiness Today, then you already have [...]]]></description>
			<content:encoded><![CDATA[<div class="kctIntro">Many of you looking for a WordPress plugin promotion tool have stumbled across my <a href="http://www.shrewdies.net/happiness_today" title="WordPress Plugin: Promotion Tool">Happiness Today</a> plugin.</p>
<p>You seem disappointed that the next version is where the real promotion potential lies, but the good news is that you do not need to wait.</p>
<p>If you have downloaded and activated Happiness Today, then you already have a tool for displaying random (or selected) promotion messages in your WordPress posts, pages or sidebar.</p></div>
<p>The main appeal of Pods is the way it makes extending the WordPress database so easy. But stored data is of little use if you cannot present it to your visitors. My first release of Happiness Today was just to prove that, like Hello Dolly does for standard WordPress, it is very easy to build a basic plugin. That basic plugin instantly demonstrates how Pods stores and displays data. In keeping with the Hello Dolly tradition, I displayed random lyrics in the Admin area &#8211; but the real life potential was always to be able to produce something simple yet useful, that can display random promotion messages to visitors.</p>
<p>Those promotional features are included in the current release, just not obvious. Here&#8217;s how to use Pods inbuilt features to get more from the Happiness Today plugin. Start your marketing campaign now.<span id="more-1558"></span></p>
<h2>WordPress Pods Presentation Features</h2>
<p>In the plugin, I present the messages via a Pods template that is called whenever an admin page loads. That template adds formatting to match the admin color scheme, and configurable link buttons. I also present the full set of lyrics on the happiness_today information page using a very simple template that adds nothing but a line break.</p>
<p>Pods output is not restricted to templates that can be as simple or as complex as you need them. Neither is it restricted to Pods pages such as the example mentioned, where you can build a page similar to a WordPress page, but with easy access to your data. You can also include Pods output in regular WordPress posts and pages with a simple shortcode call. Like this:<br />
<!-- This site is running development Happiness Today<br />
       Released version uses different name &#038; template --></p>
<blockquote>Think of happiness today
<br>
All is one in their own way<br /></blockquote>
<p>That is a simple Pods shortcode wrapped in blockquote tags, but you are only limited by your imagination, and css talents. How about:</p>
<style type="text/css">
.podsdemo
{
	margin:1em 5em 1em 5em;
	padding: 1em;
	border: 1em outset red;
}
p.podsdemo:first-letter
{
	color:#ff0000;
	font-size:200%;
	float:left;
}
p.podsdemo:first-line {
	font-size:110%;
	text-transform: uppercase;
	font-weight:bold;
}</p>
</style>
<p><!-- This site is running development Happiness Today<br />
       Released version uses different name &#038; template --></p>
<div>
<p class="podsdemo">And men don't think you need to destroy
<br>
Love one another, war is a ploy<br />Women don't think you need to race
<br>
If you want life then have a taste<br /></p>
</div>
<p>In this second example, I&#8217;ve set the limit to two records. Note that records are called randomly, but I have included the chorus several times, so that will appear more frequently &#8211; just refresh your browser to see the random effect.</p>
<p>All you need to do is add the following shortcode to your post, page or text widget:</p>
<pre>&#91;pods name="happiness_today_text" order="RAND()" limit="1" template="happiness_today_list"]</pre>
<h2>WordPress Plugin Promotion Tool: Next Steps</h2>
<p>All the data in the <a href="http://www.shrewdies.net/happiness_today" title="WordPress Plugin: Promotion Tool">Happiness Today</a> plugin is easily edited using the Pods data table editing features. In my example, I use couplets from the Think Of Happiness Today lyrics. Though I limit the example text to two lines so that it displays in the admin area properly, you can use any HTML text you like. The Pods WYSIWYG editor allows the usual formatting including hyperlinks, or direct entry of HTML code.</p>
<p>Using Happiness Today for longer visitor messages might make your admin area a little cluttered. No problem &#8211; simply deactivate Happiness Today &#8211; the data management and presentation features that I have discussed here are all part of standard Pods, and will work fine.</p>
<p>In future versions, I&#8217;ll add the ability to import and export different campaign text sets, with other options to make life even easier than it is with the basic release. But you do not need to wait &#8211; the current release can be used for any promotion campaign you can think of, including random advertising. In fact, it does not even need to be random, for instance specific records can be called on specific posts. The only limit is your imagination.</p>
<p><!--more--><div style="margin-left:-1em;"><table><tr><td><script type="text/javascript"><!--
google_ad_client = "pub-7512621270035949";
/* shrewdies 300x250, created 22/12/09 */
google_ad_slot = "4026195862";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td><td>
<script type="text/javascript"><!--
ch_client = "GoutPal";
ch_type = "mpu";
ch_width = 300;
ch_height = 250;
ch_color_bg = "ffffff";
ch_color_border = "ffffff";
ch_color_title = "00009e";
ch_color_site_link = "00009e";
ch_non_contextual = 4;
ch_vertical ="premium";
ch_sid = "ShrewdiesReward";
ch_alternate_ad_url = "http://www.shrewdies.net/ad.html";
var ch_queries = new Array( );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
if ( ch_selected < ch_queries.length ) {
ch_query = ch_queries[ch_selected];
}
//--></script>
<script  src="http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript">
</script></td></tr></table></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shrewdies.net/1558/promotion-tools-plugins-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pods WordPress Plugins Double Overnight</title>
		<link>http://www.shrewdies.net/1413/pods-wordpress-plugins-double-overnight/</link>
		<comments>http://www.shrewdies.net/1413/pods-wordpress-plugins-double-overnight/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 00:50:32 +0000</pubDate>
		<dc:creator>Keith from shrewdies</dc:creator>
				<category><![CDATA[Function]]></category>
		<category><![CDATA[Happiness Today]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://www.shrewdies.net/?p=1413</guid>
		<description><![CDATA[Today, the number of WordPress Pods plugins in the plugin database doubled. My Happiness Today plugin release joins the Pods UI plugin to double the number of examples of Pods CMS use. Though this is released as a teaching tool, you should not assume it is perfect. Though it works perfectly, there are a few [...]]]></description>
			<content:encoded><![CDATA[<div class="kctIntro">Today, the number of WordPress Pods plugins in the plugin database doubled.</p>
<p>My <a href="http://wordpress.org/extend/plugins/happiness-today/">Happiness Today plugin</a> release joins the Pods UI plugin to double the number of examples of Pods CMS use.</div>
<p>Though this is released as a teaching tool, you should not assume it is perfect. Though it works perfectly, there are a few rough edges in the implementation. But that is the point of Open Source tools &#8211; we can improve all aspects of Happiness Today, collectively.</p>
<p>I like the idea of the Hello Dolly plugin as a teaching tool. Though it is criticized for it&#8217;s limited usefulness, the WordPress developers have defended it, by rightly explaining:</p>
<blockquote><p>I think Hello Dolly is a good little example plugin. Users can turn it on, see that it does something, turn it off, see that it doesn&#8217;t do it anymore. Plugin functionality exemplified.</p></blockquote>
<p>This is perfectly true, and useful for novice WordPress users who want to understand what a plugin is, without being intimidated by reams of PHP code. But Pods developers are a different breed. We have varying PHP &#038; HTML skills, but we are bound by a common desire to learn and extend WordPress functionality.</p>
<p>So Happiness Today goes beyond the remit of Hello Dolly, and achieves useful outcomes. Using the simple Pods data edit screens, you can transform Hello Dolly into a client support tool, or promotion tool for any campaign where short messages to WordPress website builders are going to win you a click or three.<br />
<div id="attachment_1415" class="wp-caption aligncenter" style="width: 510px"><img src="http://www.shrewdies.net/wp-content/uploads/simple-pods-wordpress-plugin-output.png" alt="Simple Pods WordPress Plugin Output" title="Simple Pods WordPress Plugin Output" width="500" height="50" class="size-full wp-image-1415" /><p class="wp-caption-text">Simple Pods WordPress Plugin Output</p></div></p>
<p>Though I have used plain text in the distributed plugin, the data is stored as rich text, so you can easily include images and hyperlinks in the message display. This is in addition to the included customizable link buttons. After editing the data files with whatever text you need, you can easily import it as a Pods Package for your client sites.</p>
<p>I prepared the plugin in minutes using the Pods Plugin Builder that is the real goal of this project. In fact, most of the time is spent writing the readme.txt file that is generated as part of the plugin distribution package. That tool is still under development, but when available, it will make distribution of your own version of Happiness Today, or any other Pods Package, a very simple process.</p>
<h3>Happiness Today Next Steps</h3>
<p>Please contribute ideas to the wishlist. Also, if you are a superb PHP programmer, I would love to here your thoughts on code improvement.</p>
<p>I would also like to you to rate the <a href="http://wordpress.org/extend/plugins/happiness-today/">Happiness Today Pods WordPress plugin</a>, but if you cannot give it a 5 star, at least give me the opportunity to fix any problems you have before you vote.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shrewdies.net/1413/pods-wordpress-plugins-double-overnight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Pods Plugin Builder Taking Shape</title>
		<link>http://www.shrewdies.net/1363/wordpress-pods-plugin-builder-taking-shape/</link>
		<comments>http://www.shrewdies.net/1363/wordpress-pods-plugin-builder-taking-shape/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 18:04:18 +0000</pubDate>
		<dc:creator>Keith from shrewdies</dc:creator>
				<category><![CDATA[Function]]></category>
		<category><![CDATA[rapid application development]]></category>
		<category><![CDATA[wordpress plugin]]></category>
		<category><![CDATA[WordPress Pods CMS]]></category>
		<category><![CDATA[WordPress Pods Plugin Builder]]></category>

		<guid isPermaLink="false">http://www.shrewdies.net/?p=1363</guid>
		<description><![CDATA[WordPress Pods CMS plugin is fantastic for adding new content to websites that do not easily fit the standard Page or Post styles. With it&#8217;s easy to use interface, it is good for novice writers, but it also stands on a very powerful data management platform. This makes it a real candidate for Rapid Application [...]]]></description>
			<content:encoded><![CDATA[<div class="kctIntro">WordPress Pods CMS plugin is fantastic for adding new content to websites that do not easily fit the standard Page or Post styles.</p>
<p>With it&#8217;s easy to use interface, it is good for novice writers, but it also stands on a very powerful data management platform.</p>
<p>This makes it a real candidate for Rapid Application Development, but how to package and distribute those applications?</p></div>
<p>Before I present my latest project for building structured WordPress plugins, packaged with properly formatted readme file, straight from the Pods interface let me explain what Pods is.<br />
<span id="more-1363"></span><br />
<h2>WordPress Pods Background</h2>
<p>Pods builds applications by creating data tables and presenting that data on pages, using display templates to keep presentation simple. Going beyond basic table administration, Pages and Templates can include any HTML or PHP code you like to manipulate data. And going beyond that, there are Helpers that can manipulate data before during or after it has been entered.</p>
<p>This means that any extension to WordPress can be coded in Pods. Tasks that do not require data manipulation probably do not need Pods. On the other hand, most plugins do need to use the WordPress database, even if only to store some options. Using Pods makes that data easy to maintain and it&#8217;s structure means that it is very easy to build reusable code libraries.</p>
<p>I will explain Pods Data, Template, Page and Helper features in more detail when I explain how my Pods projects work. First let&#8217;s look at my current to build WordPress plugins using Pods.</p>
<h2>WordPress Pods Plugin Builder</h2>
<p>Pods already does a good job of easing distribution of projects. It is extremely easy to bundle your project components together and export them as a Pods Package. The <a href="http://podscms.org/packages/">Pods CMS site has several examples of these packages</a> which as well as being useful in their own right, can be used to learn various techniques.</p>
<p>These packages can be pasted directly into Pods, or loaded programatically, as demonstrated in the Pods UI demo. This makes distribution very easy, but there is one vital thing missing for most projects, and another missing for many.</p>
<p>The vital missing part is data. Though pods can export and import data, this is not part of the Pods package process. If you are handling a project for a client, it is very easy to move data to your clients site by exporting and importing, but it is not possible to supply a single package including code and data.</p>
<p>For most Pods projects, that data problem is the only one, and the import and export routines simply mean you have to distribute code and data separately. For many of my projects, I want to provide WordPress plugin functionality. This means that I need at least one plugin file to hook the functions into WordPress.</p>
<p>My Pods Plugin Builder produces standard format WordPress plugin files from Pods. The plugin it produces will load a Pods package, load the data, and add the hooks that WordPress needs. It also produces a correctly formatted readme.txt file which is so important if you want people to be able to find your plugin in the WordPress repository.</p>
<p>I passed a milestone today when I used the package to produce my first plugin.</p>
<h2>WordPress Pods Plugin Builder: Next Steps</h2>
<p>In the next few articles I will:</p>
<ul>
<li>Describe the package in detail, including work still to do, and potential additional features.</li>
<li>Introduce the plugin that this package has produced, and describe how key features of Pods work.</li>
<li>Apply the package to my shrewdBar &#038; shrewdChat projects.</li>
<li>Release the package for wider testing and distribution.</li>
</ul>
<p><!--more--><div style="margin-left:-1em;"><table><tr><td><script type="text/javascript"><!--
google_ad_client = "pub-7512621270035949";
/* shrewdies 300x250, created 22/12/09 */
google_ad_slot = "4026195862";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td><td>
<script type="text/javascript"><!--
ch_client = "GoutPal";
ch_type = "mpu";
ch_width = 300;
ch_height = 250;
ch_color_bg = "ffffff";
ch_color_border = "ffffff";
ch_color_title = "00009e";
ch_color_site_link = "00009e";
ch_non_contextual = 4;
ch_vertical ="premium";
ch_sid = "ShrewdiesReward";
ch_alternate_ad_url = "http://www.shrewdies.net/ad.html";
var ch_queries = new Array( );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
if ( ch_selected < ch_queries.length ) {
ch_query = ch_queries[ch_selected];
}
//--></script>
<script  src="http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript">
</script></td></tr></table></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shrewdies.net/1363/wordpress-pods-plugin-builder-taking-shape/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Microformats Work For You &#8211; Ignore Them</title>
		<link>http://www.shrewdies.net/916/make-microformats-work-for-you-by-ignoring-them/</link>
		<comments>http://www.shrewdies.net/916/make-microformats-work-for-you-by-ignoring-them/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 16:44:24 +0000</pubDate>
		<dc:creator>Keith from shrewdies</dc:creator>
				<category><![CDATA[Function]]></category>
		<category><![CDATA[microformats]]></category>
		<category><![CDATA[rdfa]]></category>
		<category><![CDATA[rich snippets]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://www.shrewdies.net/?p=916</guid>
		<description><![CDATA[Microformats are the latest topic to confuse budding webmasters. But are they relevant to WordPress website owners, and will they help or hinder your marketing efforts. More to the point &#8211; what are they? The buzz for webmasters is that microformats help you on Google. But there are one or two fairly large points missing [...]]]></description>
			<content:encoded><![CDATA[<div class="kctIntro">Microformats are the latest topic to confuse budding webmasters.</p>
<p>But are they relevant to WordPress website owners, and will they help or hinder your marketing efforts.</p>
<p>More to the point &#8211; what are they?</p></div>
<p>The buzz for webmasters is that <a href="http://yoast.com/google-microformats-conversion-rate-optimization-serps/">microformats help you on Google</a>. But there are one or two fairly large points missing from that.</p>
<p>Before we look into those, let me explain what microformats are. They are tags in your web page, similar in operation to HTML tags. Whereas HTML tags change the appearance of text, microformats tell search engines and other robots what your text means. More specifically they describe the context of your text as structured data.</p>
<p>Whoopi-f-ing-doo you cry, or at least &#8220;so what.&#8221;</p>
<p>But wait, this is important.</p>
<p>If a search engine can interpret the type of information you are presenting, it can list you better. It puts your information into the right context. You can explicitly distinguish the author <strong>of</strong> a work from a work <strong>about</strong> an author.</p>
<p>Your words, with these descriptive tags, are known as rich snippets. If you currently earn money by providing content that includes reviews, people, businesses, organizations, events or video, then you need these snippets to help you get richer.</p>
<h3>Why Microformats?</h3>
<p>A search engine that might have sent you a little traffic from time to time has more information on <a href="http://www.google.com/support/webmasters/bin/topic.py?hl=en&#038;topic=21997">rich snippets</a> (including a validation tool), but before you investigate that, consider what is missing from the &#8220;Google &#038; Microformats: Drive More Traffic&#8221; article.<span id="more-916"></span></p>
<p>There are two ways of providing rich snippets: microformats and RDFa. Microformats are more common, but RDFa is to be implemented in HTML 5, so is more likely to become the standard in future. In fact search volumes for RDFa have just started to outstrip microformats. I believe webmasters should focus on RDFa.</p>
<h3>WordPress Rich Snippets</h3>
<p>The second missing point, close to the heart of WordPress webmasters, is how can I add some rich snippets without hand-coding all my articles?</p>
<p>There is some good news there. If you are yet to be convinced on the microformats vs RDFa debate, search the plugin database for microformats. You will get 27 results at the time of writing &#8211; let me know if any of them help you.</p>
<p>For RDFa, there are only two results in the search, but a third one is hidden in the secret lair of WordPress plugin developers who like to hide their work behind poor tagging and descriptions. I&#8217;ll review these in detail sometime soon, but if you&#8217;d like to check them for me (and maybe write a guest review?), they are:</p>
<dl>
<dt><a href="http://wordpress.org/extend/plugins/dublin-core-for-wp/">Dublin Core for WP</a></dt>
<dd>A plugin to add Dublin Core metadata to all posts and pages. I will let you know later if this is currently <a href="http://www.brainonfire.net/blog/first-collaboration/">supported by the author or someone else</a>.</dd>
<dt><a href="http://wordpress.org/extend/plugins/image-licenser/">Image Licenser</a></dt>
<dd>Provides an easy way to tag embedded images with a CreativCommons license. This uses RDFa, to enable search engines finding your images even if the user filters for CC licenses. A very new plugin from <a href="http://www.raphael-mack.de/wp-image-licenser/">Raphael Mack</a>.</dd>
<dt><a href="http://wordpress.org/extend/plugins/wp-rdfa/">wp-RDFa</a></dt>
<dd>wp-RDFa is a WordPress plugin to bring the Semantic Web to your WordPress blog. Currently this plugin supports FOAF and the Dublin Core. <a href="http://dev.squarecows.com/2009/04/05/wordpress-now-has-a-rdfa-plugin/">WP-RDFa seems very much alive and supported from SquareCows</a>.</dd>
</dl>
<p><!--more--><div style="margin-left:-1em;"><table><tr><td><script type="text/javascript"><!--
google_ad_client = "pub-7512621270035949";
/* shrewdies 300x250, created 22/12/09 */
google_ad_slot = "4026195862";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td><td>
<script type="text/javascript"><!--
ch_client = "GoutPal";
ch_type = "mpu";
ch_width = 300;
ch_height = 250;
ch_color_bg = "ffffff";
ch_color_border = "ffffff";
ch_color_title = "00009e";
ch_color_site_link = "00009e";
ch_non_contextual = 4;
ch_vertical ="premium";
ch_sid = "ShrewdiesReward";
ch_alternate_ad_url = "http://www.shrewdies.net/ad.html";
var ch_queries = new Array( );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
if ( ch_selected < ch_queries.length ) {
ch_query = ch_queries[ch_selected];
}
//--></script>
<script  src="http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript">
</script></td></tr></table></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shrewdies.net/916/make-microformats-work-for-you-by-ignoring-them/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin That Isn&#8217;t</title>
		<link>http://www.shrewdies.net/509/wordpress-plugin-that-isnt/</link>
		<comments>http://www.shrewdies.net/509/wordpress-plugin-that-isnt/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 15:34:33 +0000</pubDate>
		<dc:creator>Keith from shrewdies</dc:creator>
				<category><![CDATA[Function]]></category>
		<category><![CDATA[menu bar]]></category>
		<category><![CDATA[shrewdBar]]></category>
		<category><![CDATA[wordpress plugin]]></category>
		<category><![CDATA[WordPress Pods CMS]]></category>

		<guid isPermaLink="false">http://www.shrewdies.net/?p=509</guid>
		<description><![CDATA[This is about the WordPress plugin that isn&#8217;t a plugin! It might become one. It started life as one. But, for now, it is a Pods package, and this is the first part in a series that explains what a Pods package is, how it improves WordPress functionality, and how you can apply it to [...]]]></description>
			<content:encoded><![CDATA[<div class="kctIntro">This is about the WordPress plugin that isn&#8217;t a plugin!</p>
<p>It might become one. It started life as one.</p>
<p>But, for now, it is a Pods package, and this is the first part in a series that explains what a Pods package is, how it improves WordPress functionality, and how you can apply it to your own site.</p></div>
<p>Before we start, I was reminded earlier about the crucial importance of purpose as your first step. When you set out to add functionality to WordPress, you must be clear about why you are doing it. If you employ assistants, or ask for help on the forums here, or elsewhere, you must communicate that purpose clearly.</p>
<p>Xarzu told me earlier that she wanted to write WordPress plugins and asked if I could recommend a comprehensive list of hooks, actions and filters. I subsequently found she&#8217;d asked this in just about every forum on the Internet, irrespective of it&#8217;s subject matter. That kind of spam is best ignored, but it does serve as a prime example of what goes wrong when you do not have a clear purpose. </p>
<p>Firstly, I noticed that Xarzu had received lots of positive help, despite the poor question. People want to help, but if the goals are not clear, if the question is too vague, if there is lack of purpose, then that help is often wasted. So before you even think of adding any functionality to WordPress, think long and hard about the purpose of your plugin, and who the typical user is.</p>
<p>My latest project started when I tried the Splix theme, and found the built-in menu bar. It certainly helped me use WordPress as an application, and is a welcome feature of WordPress.com sites. It struck me that as you add functionality to your website, e.g. with forums, polls, news etc, your website becomes an application for your visitors. So I started my <a href="http://www.shrewdies.net/151/wordpress-plugin-for-forum-access-more/">WordPress menu bar plugin project</a>.</p>
<p>The purpose of the plugin is to improve navigation efficiency for 3 groups of users:<br />
<span id="more-509"></span>
<ul>
<li>Visitors. The vast majority who read your website and leave. You want them to return, so let them find your best content easily. You want them to become contributors, so let them register easily. You want them to feel welcome, so give them help to learn how your site works. The menu bar lets you display all this where it can be found easily.</li>
<li>Contributors are visitors who add comments or start new discussions. You might run a reference site that doesn&#8217;t allow visitor contributions. In that case, ignore this group, but for most websites they are crucial to the growth of your site. The plugin helps by allowing contributors to easily find and edit their own contributions.</li>
<li>Administrators. As the chief contributor, admins get all the benefits of the other groups, plus easy access to commonly used admin pages. Which pages are commonly used? That&#8217;s entirely up to you, as the menubar items are stored in an easy-to-edit Pods database.</li>
</ul>
<p>All of this raises the efficiency of your site, which is a very shrewd thing to do &#8211; that&#8217;s why the plugin is called <a href="http://www.shrewdies.net/shrewdbar/">shrewdBar</a>. I will explain the development stages in a series posts over the next few days.</p>
<p><!--more--><div style="margin-left:-1em;"><table><tr><td><script type="text/javascript"><!--
google_ad_client = "pub-7512621270035949";
/* shrewdies 300x250, created 22/12/09 */
google_ad_slot = "4026195862";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td><td>
<script type="text/javascript"><!--
ch_client = "GoutPal";
ch_type = "mpu";
ch_width = 300;
ch_height = 250;
ch_color_bg = "ffffff";
ch_color_border = "ffffff";
ch_color_title = "00009e";
ch_color_site_link = "00009e";
ch_non_contextual = 4;
ch_vertical ="premium";
ch_sid = "ShrewdiesReward";
ch_alternate_ad_url = "http://www.shrewdies.net/ad.html";
var ch_queries = new Array( );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
if ( ch_selected < ch_queries.length ) {
ch_query = ch_queries[ch_selected];
}
//--></script>
<script  src="http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript">
</script></td></tr></table></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shrewdies.net/509/wordpress-plugin-that-isnt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Plugins &#8211; Developer&#8217;s Dream</title>
		<link>http://www.shrewdies.net/498/wordpress-plugins-developers-dream/</link>
		<comments>http://www.shrewdies.net/498/wordpress-plugins-developers-dream/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 13:55:22 +0000</pubDate>
		<dc:creator>Keith from shrewdies</dc:creator>
				<category><![CDATA[Function]]></category>
		<category><![CDATA[shrewdBar]]></category>
		<category><![CDATA[shrewdChat]]></category>
		<category><![CDATA[wordpress plugin]]></category>
		<category><![CDATA[wordpress plugins structure]]></category>
		<category><![CDATA[WordPress Pods CMS]]></category>

		<guid isPermaLink="false">http://www.shrewdies.net/?p=498</guid>
		<description><![CDATA[I searched for WordPress Plugins that would help me apply structure to my own efforts. A scary journey, but now the nightmare is over. Now I can dream happily of a bright WordPress development future. But, there is no time to dream. Not even time to hack together a pretty picture to decorate this article. [...]]]></description>
			<content:encoded><![CDATA[<div class="kctIntro">I searched for WordPress Plugins that would help me apply structure to my own efforts.</p>
<p>A scary journey, but now the <a href="http://www.shrewdies.net/279/wordpress-plugins-beginners-nightmare/" title="Elusive WordPress Plugins Structure">nightmare</a> is over.</p>
<p>Now I can dream happily of a bright WordPress development future.</p></div>
<p>But, there is no time to dream. Not even time to hack together a pretty picture to decorate this article. I&#8217;m fired up for developing, but there is just enough time to let you know what the plan is.</p>
<p>When I finally decided on the SCB framework, I sat down to plan how to integrate my menu system, a hack of DashBar, into that structure. It looked like a project that might also suit <a href="http://www.shrewdies.net/466/pods-wordpress-plugin/" title="WordPress Data Management">Pods</a>, as I would need somewhere to store menu item links.</p>
<p>What&#8217;s the first thing I notice in SCB? Routines to handle WordPress options and table data. But can&#8217;t I just use Pods for that?</p>
<p>Yes, I can!</p>
<p><span id="more-498"></span>To cut a long story, I knocked together a fully customizable menu system in record time. It is not finished yet, but I&#8217;m so pleased with the results, and ease of development, that I decided to feature how I have developed it over the next few days.</p>
<p>As of today, it is lurking near the foot of the page, with a list based cascading menu that doesn&#8217;t quite work (Note to CSS developers &#8211; beware inherited settings that you have assumed will not be used elsewhere). It would have been finished a day earlier, but I was trying to adapt a definition list dropdown menu. All was going really well, until I found that it is impossible to make that kind of CSS structure perform the variable width trick.</p>
<p>Variable width is really a must, as the <a href="http://www.shrewdies.net/shrewdbar/" title="WordPress Menu &#038; Login Combination Bar">shrewdBar</a> doubles as a login form. So I will get on with re-wrapping the menu in the same way as the DashBar-based version, then I&#8217;ll go through the development stages so you can see just how easy it is to get Pods to do most of your development work.</p>
<p>Once that is finished, I will convert my other plugin work-in-progress) to Pods, and also use it for a full-blown web based application that I have had in the pipeline for well over a year. <a href="http://www.shrewdies.net/shrewdbar/" title="Simple WordPress Forum">shrewdChat discussion package</a> soon, then The Big One, just as soon as I get shrewdBar &#038; shrewdChat to good, usable stage.</p>
<p><!--more--><div style="margin-left:-1em;"><table><tr><td><script type="text/javascript"><!--
google_ad_client = "pub-7512621270035949";
/* shrewdies 300x250, created 22/12/09 */
google_ad_slot = "4026195862";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td><td>
<script type="text/javascript"><!--
ch_client = "GoutPal";
ch_type = "mpu";
ch_width = 300;
ch_height = 250;
ch_color_bg = "ffffff";
ch_color_border = "ffffff";
ch_color_title = "00009e";
ch_color_site_link = "00009e";
ch_non_contextual = 4;
ch_vertical ="premium";
ch_sid = "ShrewdiesReward";
ch_alternate_ad_url = "http://www.shrewdies.net/ad.html";
var ch_queries = new Array( );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
if ( ch_selected < ch_queries.length ) {
ch_query = ch_queries[ch_selected];
}
//--></script>
<script  src="http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript">
</script></td></tr></table></div> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.shrewdies.net/498/wordpress-plugins-developers-dream/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Plugins &#8211; Beginners Nightmare</title>
		<link>http://www.shrewdies.net/279/wordpress-plugins-beginners-nightmare/</link>
		<comments>http://www.shrewdies.net/279/wordpress-plugins-beginners-nightmare/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 18:12:12 +0000</pubDate>
		<dc:creator>Keith from shrewdies</dc:creator>
				<category><![CDATA[Function]]></category>
		<category><![CDATA[wordpress plugin]]></category>
		<category><![CDATA[wordpress plugins structure]]></category>

		<guid isPermaLink="false">http://www.shrewdies.net/?p=279</guid>
		<description><![CDATA[WordPress plugins are vital for efficiently functioning websites. Given their importance, I would expect much more effort going into helping new plugin developers get to grips with plugin structure.&#160; The WordPress development team resist adding features to the core if they are not universal requirements and can be dealt with by plugins. This is a [...]]]></description>
			<content:encoded><![CDATA[<div class="kctIntro">
<p>WordPress plugins are vital for efficiently functioning websites.</p>
<p><div id="attachment_280" class="wp-caption alignright" style="width: 245px"><a href="http://www.shrewdies.net/wp-content/uploads/wordpress-plugins-structure-nightmare.gif"><img src="http://www.shrewdies.net/wp-content/uploads/wordpress-plugins-structure-nightmare-235x300.gif" alt="WordPress Plugins Structure Nightmare" title="WordPress Plugins Structure Nightmare" width="235" height="300" class="size-medium wp-image-280" /></a><p class="wp-caption-text">WordPress Plugins Structure Nightmare</p></div>
<p>Given their importance, I would expect much more effort going into helping new plugin developers get to grips with plugin structure.<br />&nbsp;</p>
</div>
<p>The WordPress development team resist adding features to the core if they are not universal requirements and can be dealt with by plugins. This is a good thing, and they have recently announced plans to develop &#8220;canonical&#8221; (i.e. official) plugins to &#8220;address the most popular functionality requests with superlative execution&#8221;<a href="#ref1">[1]</a>.</p>
<p>Significantly, these will be &#8220;the best possible example of coding standards&#8221;<a href="#ref1">[1]</a>. But just what are these coding standards that are deemed so important?</p>
<p>The first thing I want to do when I write a plugin is adopt a structure that:
<ul>
<li>Is the most efficient in terms of performance (i.e. no redundant code, especially admin code loaded for all users)</li>
<li>Uses core WordPress functions and methods instead of home-grown alternatives.</li>
<li>Uses latest functionality and best practice, avoiding deprecated functions and methods.</li>
<li>Is familiar to the majority of plugin developers.</li>
</ul>
<p>It&#8217;s the last point that induces the biggest nightmare. Official coding standards<a href="#ref2">[2]</a> focus heavily on inline documentation and formatting<a href="#ref3">[3]</a><a href="#ref4">[4]</a>. This is all very well, but we need good examples that clearly show best practice in how to organize code in modules. Which bits are best in separate modules, and how should they be organized in sub-folders?</p>
<p>It speaks volumes to me that <span id="more-279"></span>the biggest plugin competition judging can only produce a list of 10 things to avoid<a href="#ref5">[5]</a>. Developers would avoid these mistakes if they had decent examples to follow. Instead, we are all wallowing in our own vats of spaghetti code, producing our own coding structures (or lack of structure), and never achieving anything that is instantly accessible to other developers.</p>
<p>Don&#8217;t get me wrong, the 10 mistakes to avoid are welcome, and the judging comments on which they are based are invaluable. But the advice is difficult to take on board when you are wondering how to best structure an object oriented plugin that will not break as soon as you upload it. There are plenty of other good coding tips<a href="#ref6">[6]</a>, including good admin page tips<a href="#ref7">[7]</a>. These are all very welcome, but I&#8217;m still struggling with where to put them!</p>
<p>I have tried one or two &#8220;plugin templates&#8221;, but they are all out of date, and not easily developed. The best I have come across (from my limited perspective) has almost no documentation other than a pointer to an example.</p>
<p>The only good news is that the example in question is pretty good, and I will probably use it here. So by default, I&#8217;ll adopt that coding structure, and document it as I go on. My only hope is that it does not break every rule in the &#8220;official&#8221; WordPress plugin book.</p>
<hr />
<h3>WordPress Plugins References</h3>
<ol>
<li id="ref1"><a href="http://wordpress.org/development/2009/12/canonical-plugins/">WordPress › Blog » Canonical Plugins (Say What?)</a> [Internet]. [cited 2009 Dec 22]</li>
<li id="ref2"><a href="http://codex.wordpress.org/WordPress_Coding_Standards">WordPress Coding Standards « WordPress Codex</a> [Internet]. [cited 2009 Dec 22]</li>
<li id="ref3"><a href="http://codex.wordpress.org/Inline_Documentation">Inline Documentation « WordPress Codex</a> [Internet].  [cited 2009 Dec 22]</li>
<li id="ref4"><a href="http://comox.textdrive.com/pipermail/wp-hackers/2006-July/006930.html">[wp-hackers] Coding style</a> [Internet].  [cited 2009 Dec 22]</li>
<li id="ref5"><a href="http://planetozh.com/blog/2009/09/top-10-most-common-coding-mistakes-in-wordpress-plugins/">Top 10 Most Common Coding Mistakes in WordPress Plugins « planetOzh</a> [Internet]. [cited 2009 Dec 22]</li>
<li id="ref6"><a href="http://hungred.com/useful-information/wordpress-plugin-development-tips-tricks/">WordPress Plugin Development Tips And Tricks &#8211; Hungred Dot Com</a> [Internet]. [cited 2009 Dec 16]</li>
<li id="ref7"><a href="http://www.onextrapixel.com/2009/07/01/how-to-design-and-style-your-wordpress-plugin-admin-panel/">How To Design And Style Your WordPress Plugin Admin Panel | Onextrapixel &#8211; Showcasing Web Treats Without Hitch</a> [Internet]. [cited 2009 Dec 16]</li>
</ol>
<p><!--more--><div style="margin-left:-1em;"><table><tr><td><script type="text/javascript"><!--
google_ad_client = "pub-7512621270035949";
/* shrewdies 300x250, created 22/12/09 */
google_ad_slot = "4026195862";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></td><td>
<script type="text/javascript"><!--
ch_client = "GoutPal";
ch_type = "mpu";
ch_width = 300;
ch_height = 250;
ch_color_bg = "ffffff";
ch_color_border = "ffffff";
ch_color_title = "00009e";
ch_color_site_link = "00009e";
ch_non_contextual = 4;
ch_vertical ="premium";
ch_sid = "ShrewdiesReward";
ch_alternate_ad_url = "http://www.shrewdies.net/ad.html";
var ch_queries = new Array( );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
if ( ch_selected < ch_queries.length ) {
ch_query = ch_queries[ch_selected];
}
//--></script>
<script  src="http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript">
</script></td></tr></table></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.shrewdies.net/279/wordpress-plugins-beginners-nightmare/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
