<?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>Tortoise IT</title>
	<atom:link href="http://www.sean-barton.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sean-barton.co.uk</link>
	<description>by Sean Barton, a freelance PHP website developer in Crewe, Cheshire</description>
	<lastBuildDate>Tue, 31 Jan 2012 17:34:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>WordPress SB Mail Attachment Widget Update (V1.1)</title>
		<link>http://www.sean-barton.co.uk/2012/01/wordpress-sb-mail-attachment-widget-update-v11/</link>
		<comments>http://www.sean-barton.co.uk/2012/01/wordpress-sb-mail-attachment-widget-update-v11/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 17:32:26 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.sean-barton.co.uk/?p=715</guid>
		<description><![CDATA[A minor update today to improve the delivery efficiency of the emails with attachments. If you have no idea what this plugin is then check out my original post on it a few weeks ago here. Some users were reporting issues with the email coming through as ignoring the HTTP headers and including all of them within the email itself. A big mess indeed. Now it uses the wp_mail command so it can be hooked into by other plugins. Also because of this function usage it means that I don&#8217;t need to write the headers manually.. WordPress does all that &#8230; <a class="continue_reading" href="http://www.sean-barton.co.uk/2012/01/wordpress-sb-mail-attachment-widget-update-v11/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A minor update today to improve the delivery efficiency of the emails with attachments. If you have no idea what this plugin is then check out my original post on it a few weeks ago <a title="SB Mail Attachment Widget" href="http://www.sean-barton.co.uk/2011/12/sb-mail-attachment-widget/">here</a>.</p>
<p>Some users were reporting issues with the email coming through as ignoring the HTTP headers and including all of them within the email itself. A big mess indeed. Now it uses the wp_mail command so it can be hooked into by other plugins. Also because of this function usage it means that I don&#8217;t need to write the headers manually.. WordPress does all that for you. It should now be a lot more compatible with the various mail clients.</p>
<p>Download it here: <a href="http://www.sean-barton.co.uk/wp-content/plugins/download-monitor/download.php?id=28" title="Downloaded 39 times">SB Mail Attachment Widget (2.7 kB)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sean-barton.co.uk/2012/01/wordpress-sb-mail-attachment-widget-update-v11/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix the flaw in the WP Ecommerce table rate shipping module</title>
		<link>http://www.sean-barton.co.uk/2012/01/fix-flaw-wp-ecommerce-table-rate-shipping-module/</link>
		<comments>http://www.sean-barton.co.uk/2012/01/fix-flaw-wp-ecommerce-table-rate-shipping-module/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 19:21:56 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[Ecommerce]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.sean-barton.co.uk/?p=707</guid>
		<description><![CDATA[Catchy title eh! It&#8217;s difficult to name such a post but I have just diagnosed a client&#8217;s site and realised that there was a bit of an error in the WPEC (WPSC) table rate shipping module. Reading the code it looks like the table rate module is designed to be used exclusively or in conjunction with a secondary service. The flaw I have found is that table rate is coded to always return a price regardless of whether you want one or not. Basically my client wanted to use the weight shipping module for all postage except if the cart &#8230; <a class="continue_reading" href="http://www.sean-barton.co.uk/2012/01/fix-flaw-wp-ecommerce-table-rate-shipping-module/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright  wp-image-710" title="shopping-cart-icon-515" src="http://www.sean-barton.co.uk/wp-content/uploads/2012/01/shopping-cart-icon-515-300x300.png" alt="" width="200" height="200" />Catchy title eh! It&#8217;s difficult to name such a post but I have just diagnosed a client&#8217;s site and realised that there was a bit of an error in the WPEC (WPSC) table rate shipping module.</p>
<p>Reading the code it looks like the table rate module is designed to be used exclusively or in conjunction with a secondary service. The flaw I have found is that table rate is coded to always return a price regardless of whether you want one or not.</p>
<p>Basically my client wanted to use the weight shipping module for all postage except if the cart amount was more than £200 in which case free postage would be offered. Simple right?.. just add a layer (row) into the table rate settings with a minimum price of 200 and a value of 0. This would mean that weight based is used until the table rate conditional kicks in at £200 and offers cheaper postage (free in fact).</p>
<p>No.. sadly not correct <img src='http://www.sean-barton.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Table rate is written so that is always returns a price regardless of whether you want it to or not. Basically if you have a single row (layer) in the settings for the module it will show it. The system works well at the top end where price is greater than or equal to but there must always be a base price in the module (value of 0.00 or 0.01 if it doesn&#8217;t save) to catch those which fail the PHP logic. Note the following function to get a quote (taken directly from tablerate.php):</p>
<pre>    function getQuote() {

        global $wpdb, $wpsc_cart;
        if (isset($_SESSION['nzshpcrt_cart'])) {
            $shopping_cart = $_SESSION['nzshpcrt_cart'];
        }
        if (is_object($wpsc_cart)) {
            $price = $wpsc_cart-&gt;calculate_subtotal(true);
        }

        $layers = get_option('table_rate_layers');

        if ($layers != '') {

            // At some point we should probably remove this as the sorting should be
            // done when we save the data to the database. But need to leave it here
            // for people who have non-sorted settings in their database
            krsort($layers);

            foreach ($layers as $key =&gt; $shipping) {

                if ($price &gt;= (float)$key) {

                    if (stristr($shipping, '%')) {

                        // Shipping should be a % of the cart total
                        $shipping = str_replace('%', '', $shipping);
                        $shipping_amount = $price * ( $shipping / 100 );

                    } else {

                        // Shipping is an absolute value
                        $shipping_amount = $shipping;

                    }

                    return array("Table Rate"=&gt;$shipping_amount);

                }

            }

            $shipping = array_shift($layers);

            if (stristr($shipping, '%')) {
                $shipping = str_replace('%', '', $shipping);
                $shipping_amount = $price * ( $shipping / 100 );
            } else {
                $shipping_amount = $shipping;
            }

            return array("Table Rate"=&gt;$shipping_amount);

        }
    }</pre>
<p>If you read through the code it basically loops through all of the layers to find the conditional price point that matches and returns the price. The oddity is the next set of code which, I suppose, is a fall back. Sadly the fall back is entirely unnecessary and causes this issue. The code starts from the following onwards:</p>
<pre>$shipping = array_shift($layers);</pre>
<p>In fact the simplest way to &#8216;fix&#8217; the function is to put a return  statement just before that line:</p>
<pre>return false;
$shipping = array_shift($layers);</pre>
<p>Once that is in place you are free to use the module properly once again. I might write this as a separate shipping module for people to download as changing the name of each layer would be a nice idea as well as setting a maximum price point for each layer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sean-barton.co.uk/2012/01/fix-flaw-wp-ecommerce-table-rate-shipping-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn off theme CSS for the visual editor in WordPress 3.3+</title>
		<link>http://www.sean-barton.co.uk/2012/01/wordpress-visual-editor-css-deactivate/</link>
		<comments>http://www.sean-barton.co.uk/2012/01/wordpress-visual-editor-css-deactivate/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 10:59:32 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Time Savers]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.sean-barton.co.uk/?p=701</guid>
		<description><![CDATA[It&#8217;s been on the cards for months and WordPress has finally added the inbuilt function whereby CSS files declared on the front end are now also declared on the edit item (post/page/custom post type) pages within the admin system. This is wonderful for some but, as someone who looks at a fair few sites using a range of free, premium and bespoke themes, actually it&#8217;s a curse in disguise. Let me explain&#8230; Let&#8217;s say you go to the WordPress theme repository and grab a nice free theme which has been written by a developer less than &#8216;au fait&#8217; with WordPress &#8230; <a class="continue_reading" href="http://www.sean-barton.co.uk/2012/01/wordpress-visual-editor-css-deactivate/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been on the cards for months and WordPress has finally added the inbuilt function whereby CSS files declared on the front end are now also declared on the edit item (post/page/custom post type) pages within the admin system. This is wonderful for some but, as someone who looks at a fair few sites using a range of free, premium and bespoke themes, actually it&#8217;s a curse in disguise. Let me explain&#8230;</p>
<p>Let&#8217;s say you go to the WordPress theme repository and grab a nice free theme which has been written by a developer less than &#8216;au fait&#8217; with WordPress functionality or best practice. You turn on the theme, all looks good and then go to write a post only to be presented with the page from hell because loose CSS rules used in style.css have broken the editor page look and feel all together. As there is no way in CSS to set a priority without rewriting the code itself you are left with a mess.</p>
<p>Pre WordPress 3.3 this wasn&#8217;t an issue as you needed to explicitly declare an editor style sheet in order to use the styles and make it look somewhat closer to that which you might find on the front end of the site.</p>
<p>Now.. turning it off! Well it will require some coding and in actual fact the simplest way to do anything about it is to make your stylesheet invisible to WordPress. Let me explain: The correct way to enqueue any CSS and JS on your site is to do something like the following:</p>
<pre>add_action('wp_print_styles', 'theme_add_stylesheet');
function theme_add_stylesheet() {
    wp_register_style('theme_stylesheet', get_stylesheet_directory_uri() . '/style.css');
    wp_enqueue_style( 'theme_stylesheet');
}</pre>
<p>This means that when the <em>wp_head</em> action is triggered from header.php in your theme the style will be printed to screen along with the other styles and scripts. The enqueue style function adds the name and location of the script to a global array which can be reused at any time. In short, WordPress knows that it is a CSS file declared by a plugin or theme and therefore can reuse it at will.</p>
<p>The fix is simple.. don&#8217;t use that method and, instead, use the original crude method of adding a stylesheet which is to write the HTML yourself as follows:</p>
<pre>&lt;link rel="stylesheet" href="&lt;?php bloginfo('stylesheet_url'); ?&gt;" type="text/css" media="screen" /&gt;</pre>
<p>This code, when placed in header.php of your theme, simply outputs the line in the head section of your page and includes the stylesheet unbeknown to WordPress and therefore won&#8217;t be used in the editor.</p>
<p>99% of the themes I have seen and used use the latter method so it&#8217;s not an issue but hopefully this will hel someone who has just upgraded and has some sort of multicoloured and wierdly laid out admin post page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sean-barton.co.uk/2012/01/wordpress-visual-editor-css-deactivate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress plugin queue jumping made easy</title>
		<link>http://www.sean-barton.co.uk/2012/01/wordpress-plugin-queue-jumping-easy/</link>
		<comments>http://www.sean-barton.co.uk/2012/01/wordpress-plugin-queue-jumping-easy/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 21:58:31 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Time Savers]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.sean-barton.co.uk/?p=692</guid>
		<description><![CDATA[Hi all. Happy new year etc.. I have plenty of plans for the next 12 months but won&#8217;t go into them unlike every other person with a blog is undoubtedly doing at the moment. I want to keep this strictly useful information and me telling you I want to shift some weight, buy something or do something isn&#8217;t going to improve your lives any really is it. So here goes.. I have had an interesting problem for some months now which I have just solved albeit crudely! I have written several plugins and released them into the WordPress plugin repository &#8230; <a class="continue_reading" href="http://www.sean-barton.co.uk/2012/01/wordpress-plugin-queue-jumping-easy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright  wp-image-696" title="LEAPFROG" src="http://www.sean-barton.co.uk/wp-content/uploads/2012/01/LEAPFROG-300x279.jpg" alt="" width="210" height="195" />Hi all. Happy new year etc.. I have plenty of plans for the next 12 months but won&#8217;t go into them unlike every other person with a blog is undoubtedly doing at the moment. I want to keep this strictly useful information and me telling you I want to shift some weight, buy something or do something isn&#8217;t going to improve your lives any really is it. So here goes..</p>
<p>I have had an interesting problem for some months now which I have just solved albeit crudely! I have written several plugins and released them into the WordPress plugin repository as regular readers of this site might already know. What you are unlikely to know though is that in doing so all you get is an influx of support questions. I personally like these.. it gives me the illusion of helping people out whilst really knowing that it should have been right to begin with <img src='http://www.sean-barton.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The worst of these aforementioned support questions are to do with plugin conflicts. Cue potential threads and threads about how the &#8216;other guy&#8217; did something wrong which is going to need to poor user to go to their site/forum to get it sorted before our plugins can work in harmony as they were originally intended. This isn&#8217;t the best answer to a support question and certainly won&#8217;t get you any repeat custom. In all likelihood the user will ditch the plugin he finds least useful (yours.. after all he came to you to sort it in the first place meaning yours is likely the plugin they have just installed and are playing with) and install one of the other counterparts which undoubtedly does the same job but with umpteen donate buttons plastered all over it (I won&#8217;t go into that one right now but see <a href="http://www.sean-barton.co.uk/2011/12/donation-buttons-promotion-plugins-themes/">my previous post</a> for my thoughts on that particular subject).</p>
<p>One such example of a conflict I have been getting all year. It&#8217;s to do with my Welcome Email Editor plugin. WordPress does a fair few things very well indeed but sadly there are a few where it really could improve. This is why my Welcome Email Editor plugin exists at all. Can you guess what it does? Really? Ok so it lets you edit the WordPress welcome email.. the one that gives the user their user name and password if they decide to sign up for your site. The default offering is a little dull but luckily the guys who wrote WordPress have half heartedly thought about how it can be improved. Why let plugin writers like me do it of course. Sadly they opted not to use the action and filter system which already is ingrained in the rest of WordPress (for good reason I&#8217;m sure.. likely to do with load order) but instead just wrapped the entire wp_new_user_notification function in a PHP function called function_exists. This does what it says on the tin and only declares the function if someone else (a plugin or theme) doesn&#8217;t get there first.</p>
<p>In most cases this system works fine when you install a plugin dedicated to editing the welcome email and leave it at that. In reality most blogs have 30+ plugins active at any one time and probability and inevitability both say that more than one person is likely to want to jump on this handy feature for their plugin or theme. This means that one of the plugins needs to go! Normally if it were two plugins designed to edit the welcome email then we would be ok.. an obvious conflict of interest but what if one were a forum or shopping cart in conjunction with my plugin? Which goes then? Well the one which provides less functionality of course which, sadly, in that example would be my little plugin.</p>
<p>To make it somewhat more awkward, some plugins like to call WordPress core files directly thus causing the default function for the welcome email to be called before any other plugins and therefore chucking everyone else out of the race to declare the function first. Maintenance Mode is a plugin I know which does this when the system is active although it sorts itself out when you come out of maintenance mode so not really an issue. I have just been informed of another conflict with a plugin which makes dealing with WP Ecommerce in bulk easier (and we all know that was needed years ago!). Whatever reason they have called pluggable.php for I don&#8217;t know but it means that my plugin (or any other trying to declare a function first like this (it&#8217;s more common than you think!)) won&#8217;t function.</p>
<p>It&#8217;s such a simple solution but it works.. to fix you just need to rename my plugin directory to something else. WordPress naming conventions make calling a plugin anything starting with &#8216;WP&#8217; very trendy indeed. My plugins are all prefixed SB, my initial, for archiving more than anything else but the people who do the same with initials AA are laughing at us all right now I assure you (or not laughing but living in blissful ignorance!). Here&#8217;s the logic.. it&#8217;s really simple:</p>
<p>On any given page load WordPress will load it&#8217;s core files first and then look for plugins to bolt on to the system using the action/filter system. This is where the PHP files are initially &#8216;required&#8217;/'included&#8217; and individual balls (controlled by the plugin writers) set in motion. WordPress keeps a list of active plugins to call in the database in the wp_options table under an imaginatively named row called &#8216;active_plugins&#8217;. This is an alphabetically ordered list of plugins labelled by their location beneath the plugins directory (eg: <em>welcome-email-editor/sb_welcome_email_editor.php</em>). It will run from top to bottom including these files. This means there is a priority order for code defined only by the fact it has a name higher up the alphabet.</p>
<p>So to conclude the way to get your plugin run first to avoid conflicts with other plugins just put it in a directory called something beginning with a low alphabetical letter or special character. In my case I get a conflict every few months so it&#8217;s not worth changing but I am going to recommend that the next person to mention a conflict just renames their plugin folder from <em>welcome-email-editor</em> to <em>-welcome-email-editor</em> (note the leading hyphen). Job done!</p>
<p>I might add that changing the name of a plugin directory once a site is live isn&#8217;t a good idea on account of some plugins storing pathing information in the DB and WordPress itself storing the fact that plugin is active or not by it&#8217;s name in the directory tree. Put plainly if I change the name of my Welcome Email Editor plugin on my own site then it will deactivate itself and I shall need to reactivate it for it to continue working. Not a huge feat but try explaining that to normal user. Cue yet more support emails.</p>
<p>Hope this explains an issue for one or two of you. Perhaps plugin writers will learn not to call core PHP files directly in future to make my day run more smoothly&#8230; I doubt it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sean-barton.co.uk/2012/01/wordpress-plugin-queue-jumping-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress SB Auth Admin V1.3 (minor update)</title>
		<link>http://www.sean-barton.co.uk/2011/12/wordpress-sb-auth-admin-v13-minor-update/</link>
		<comments>http://www.sean-barton.co.uk/2011/12/wordpress-sb-auth-admin-v13-minor-update/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 12:00:50 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.sean-barton.co.uk/?p=685</guid>
		<description><![CDATA[I wrote a post about this a couple of days ago attributing some custom work to a client of mine. It seems that now other people (person) are (is) coming forward with more changes. This little time saver was sent to me which adds a quantity input box and a loop to add the key as many times as you want when adding a manual key. So, for example, let&#8217;s say you are offering a particular client 50 licenses for free (for some reason) and are doing it &#8216;off the books&#8217; so to spean but don&#8217;t want to have to &#8230; <a class="continue_reading" href="http://www.sean-barton.co.uk/2011/12/wordpress-sb-auth-admin-v13-minor-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_686" class="wp-caption alignright" style="width: 160px"><img class="size-thumbnail wp-image-686 " title="Screen Shot 2011-12-19 at 22.43.54" src="http://www.sean-barton.co.uk/wp-content/uploads/2011/12/Screen-Shot-2011-12-19-at-22.43.54-150x150.png" alt="" width="150" height="150" /><p class="wp-caption-text">The new field in all it&#39;s glory!</p></div>
<p>I wrote a post about this a couple of days ago attributing some custom work to a client of mine. It seems that now other people (person) are (is) coming forward with more changes. This little time saver was sent to me which adds a quantity input box and a loop to add the key as many times as you want when adding a manual key.</p>
<p>So, for example, let&#8217;s say you are offering a particular client 50 licenses for free (for some reason) and are doing it &#8216;off the books&#8217; so to spean but don&#8217;t want to have to add their key 50 times in a row. This box allows you to add it once and type 50 into the second box to do the same job!</p>
<p><strong>Download it here</strong>: <a href="http://www.sean-barton.co.uk/wp-content/plugins/download-monitor/download.php?id=25" title="Downloaded 116 times">SB Auth Admin (11.08 kB)</a></p>
<p>I also snuck in a new images directory and a WordPress Menu Icon for fun!</p>
<p><img class="wp-image-687 alignnone" title="Screen Shot 2011-12-19 at 22.44.00" src="http://www.sean-barton.co.uk/wp-content/uploads/2011/12/Screen-Shot-2011-12-19-at-22.44.00.png" alt="" width="138" height="34" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sean-barton.co.uk/2011/12/wordpress-sb-auth-admin-v13-minor-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress SB Auth Admin Update (V1.2)</title>
		<link>http://www.sean-barton.co.uk/2011/12/wordpress-sb-auth-admin-update-v12/</link>
		<comments>http://www.sean-barton.co.uk/2011/12/wordpress-sb-auth-admin-update-v12/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 21:00:40 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.sean-barton.co.uk/?p=677</guid>
		<description><![CDATA[Regular readers (or anyone Googling for free authentication systems for WordPress or PHP Projects to be honest) might have heard of my SB Auth Admin plugin which I talked about here. I have had a few comments and emails about it with people wanting to integrate it into their own sites and querying compatibility with additional Payment Processors. It only supported E-Junkie before which costs a few dollars a month I think. I have just been informed by a client of mine that it also works with JV Zoo. This is good news indeed seeing as this doesn&#8217;t cost per &#8230; <a class="continue_reading" href="http://www.sean-barton.co.uk/2011/12/wordpress-sb-auth-admin-update-v12/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-680" title="jvzoo" src="http://www.sean-barton.co.uk/wp-content/uploads/2011/12/jvzoo.png" alt="" width="268" height="100" />Regular readers (or anyone Googling for free authentication systems for WordPress or PHP Projects to be honest) might have heard of my SB Auth Admin plugin which I talked about <a title="WordPress product licensing system – SB Auth Admin" href="http://www.sean-barton.co.uk/2011/08/wordpress-product-licensing-system-sb-auth-admin/" target="_blank">here</a>.</p>
<p>I have had a few comments and emails about it with people wanting to integrate it into their own sites and querying compatibility with additional Payment Processors. It only supported E-Junkie before which costs a few dollars a month I think. I have just been informed by a client of mine that it also works with <a title="JV Zoo" href="https://www.jvzoo.com/" target="_blank">JV Zoo</a>. This is good news indeed seeing as this doesn&#8217;t cost per month so a definite winner over E-Junkie. I am an affiliate of neither so feel free to pick and choose which you use but if course no monthly outgoing is a winner in my book.</p>
<p>Well such news warranted a new version number and a blog post.. why not! Although the E-Junkie IPN line works I have added one for JV Zoo in case either change their protocols and I need to update the plugin.</p>
<p><strong>Download</strong></p>
<p>Get the new version here: <a href="http://www.sean-barton.co.uk/wp-content/plugins/download-monitor/download.php?id=25" title="Downloaded 116 times">SB Auth Admin (11.08 kB)</a></p>
<p><strong>Configuration</strong></p>
<div id="attachment_679" class="wp-caption alignright" style="width: 160px"><a href="http://www.sean-barton.co.uk/wp-content/uploads/2011/12/jvzoo_auth_admin_config.png" rel="lightbox[677]"><img class="size-thumbnail wp-image-679" title="jvzoo_auth_admin_config" src="http://www.sean-barton.co.uk/wp-content/uploads/2011/12/jvzoo_auth_admin_config-150x150.png" alt="" width="150" height="150" /></a><p class="wp-caption-text">Like the arrow? I did it myself. My Photoshop skills are unmatched!</p></div>
<p>It&#8217;s simple.. on the add/edit product screen you will see a field named &#8216;IPN Forwarding URL&#8217;. Simply copy and paste the line from the SB Auth Admin plugin admin page (which looks something like http://www.yoursite.com/?add_license_key=jvzoo) and you are done! Be sure to test it of course but I am told it works a treat.</p>
<p><em>Thanks to Mathias from <a href="http://www.wsoparty.com" target="_blank">wsoparty.com</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sean-barton.co.uk/2011/12/wordpress-sb-auth-admin-update-v12/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Donation buttons and self promotion in your plugins and themes.. yes or no?</title>
		<link>http://www.sean-barton.co.uk/2011/12/donation-buttons-promotion-plugins-themes/</link>
		<comments>http://www.sean-barton.co.uk/2011/12/donation-buttons-promotion-plugins-themes/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 11:37:57 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Personal Blog]]></category>
		<category><![CDATA[Shameless Plugs]]></category>
		<category><![CDATA[Statements and Rants]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[admin banners]]></category>
		<category><![CDATA[back links]]></category>
		<category><![CDATA[donate buttons]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[social media]]></category>

		<guid isPermaLink="false">http://www.sean-barton.co.uk/?p=668</guid>
		<description><![CDATA[As regular readers might have noticed, I am a (more than) full time WordPress plugin and theme developer. I have spent the last few years doing this and have an intimate knowledge of WordPress. Because of this, like so many others, I have a base stock of plugins I tend to use for my clients&#8217; sites which I use for a number of reasons. The list of reasons tends to include the obvious things like &#8216;are they any good or not&#8217; and &#8216;are they free&#8217; (always a winner that one). However, one of my other criteria is to do with &#8230; <a class="continue_reading" href="http://www.sean-barton.co.uk/2011/12/donation-buttons-promotion-plugins-themes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-671" title="coffee-fund-money-box2" src="http://www.sean-barton.co.uk/wp-content/uploads/2011/12/coffee-fund-money-box2-300x300.jpg" alt="" width="250" />As regular readers might have noticed, I am a (more than) full time WordPress plugin and theme developer. I have spent the last few years doing this and have an intimate knowledge of WordPress. Because of this, like so many others, I have a base stock of plugins I tend to use for my clients&#8217; sites which I use for a number of reasons.</p>
<p>The list of reasons tends to include the obvious things like &#8216;are they any good or not&#8217; and &#8216;are they free&#8217; (always a winner that one). However, one of my other criteria is to do with the existence of the other plethora of rubbish that some developers seem to chuck into their plugins almost as a matter of course.</p>
<p>This post was to do with donation buttons but I suppose that we can extend it to the following:</p>
<p><strong>Automatic backlinking</strong></p>
<p>When I looked at my sites XML Sitemap the other day I noticed that there was a nice little comment in there attributing the work to the guy that wrote the plugin. I find this incredibly annoying as, if it were an option in the plugin, it would almost certainly be turned off.</p>
<p><strong>Donate buttons</strong></p>
<p>I appreciate that plugins take time to write but little cheeky buttons that suggest they want $5 for a coffee is a particular annoyance of mine. I have one donate button and it&#8217;s on my homepage sidebar. This means that anyone wishing to give a donation can do but I never expect anyone to. The important thing is that whenever I go to the settings page on a plugin it&#8217;s not sitting there in a little box begging for some cash or, more suggestive, suggesting I look at their Amazon wishlist.</p>
<p><strong>Flashing/fixed admin banners</strong></p>
<p>I find that within some plugins people have gone as far as to write a nag box to show within the admin screens to ask for money or to show me a &#8216;sponsored&#8217; news feed. Often the developer has copied and pasted some code to add this and managed to add it to that all roles can see it, not just Administrators.</p>
<p><strong>News feeds</strong></p>
<p>This one doesn&#8217;t bother me as much but I do appreciate an &#8216;off&#8217; button. On the WordPress dashboard there are boxes linking to WordPress RSS feeds for plugin news and updates. Some developers like to put their little boxes on there too. If I were to allow people onto the admin backend of a site the last thing I would want to show them would be several boxes picking up content from RSS feeds I have no control over.</p>
<p><strong>Social media buttons</strong></p>
<p>The curse of social media now means that every man and his dog wants a Facebook or Twitter button on their site. I actually found myself considering getting a Twitter account the other day but then slipped out of that coma and came back to my senses. My personal feelings on people wasting their life posting &#8216;status updates&#8217; aside, seeing these boxes splattered all over the admin systems that I use is as much of an annoyance as anything else. Social media sites are great for companies wishing to promote themselves and for people &#8216;getting back in touch&#8217; (as often is an excuse given by Facebook fans.. what ever happened to email. Given it&#8217;s a new technology I know) and not to mention SEO but do I need a dedicated sidebar on admin pages for some plugins telling me what the developer ate from breakfast and is currently doing on the toilet.</p>
<p><strong>HTML comment backlinks</strong></p>
<p>I notice these all the time.. in fact I was speaking to a good friend about them last night when I mentioned I had written a major app which is being used by a few big name companies and he said that I need my name in there somewhere. I suppose my point is that if I have been paid to write something for someone then it&#8217;s their name that goes on it, not mine. It&#8217;s a little bit different with &#8216;free&#8217; WordPress plugins where the author needs their credit but then again that&#8217;s that the Author Name and Author URI comment fields are for within each plugin and theme.. to attribute credit in a clear, consistent and unbiased/customer facing manner.</p>
<p><strong>Forced suggested donations</strong></p>
<p>I came across this idea when using a plugin this morning. I am working on a client site and wanted to remove a little blue box which keeps popping up suggesting I buy him a coffee or pay his mortgage or something. There was a convenient little button to dismiss the box which I clicked (who wouldn&#8217;t!) and it took me to his site which was splattered with both advertising, follow buttons and an explanation saying that if I were to pay him some money they he would &#8216;arrange for those boxes to flutter away&#8217;.</p>
<p><strong>Security concerns</strong></p>
<p>I have some concerns here.. in effect the developer has written a back door into the site (and he&#8217;s not the only one.. lots of plugins do it). He can easily log my site address or any other information sent with the request and note how often it&#8217;s being used. It&#8217;s stats heaven for the developer but rather concerning for anyone else. In effect in order for advertising to &#8216;flutter away&#8217; he needs to add my site address to a list he has somewhere which will cause the advertising not to show. Feels a bit wrong to me.. thoughts anyone?</p>
<p><strong>Conclusion</strong></p>
<p>I tried to be impartial in this posting and intended to weigh up the pros and cons of this shameless self promotion (whoops) but clearly failed. It&#8217;s a shame that I really have to stop using, or just edit the code inside, some plugins because the person who wrote it feels that, for offering an open source plugin, they get carte blanche to advertise/nag/demand money from you until you jump through a hoop or two.</p>
<p>Plugins written for free should really be rated highly on the WordPress plugin directory. They should be talked about, celebrated and, as such, the developer will see both an improved site ranking/self popularity and most likely end up with more work because of it.</p>
<p>I have several plugins in the plugin repository myself and have offered tens of plugins on this site for free. In each one the only link to me or my name is the plugin author and site. The rest is on this site (sans social media and advertising and only the one small donate button if people really feel the need). I would love for a few more developers to take this approach as there are some really good plugins out there which I simply can not use out of the box because of one (or frequently more) of the afore mentioned reasons.</p>
<p><em>To see a list of the things I offer on this site then take a look at my <a href="http://www.sean-barton.co.uk/downloads/" target="_blank">downloads page</a></em></p>
<p><em>Ho ho ho and happy holidays everyone. I shall be working up until Christmas Eve undoubtedly but I hope to have written a new theme for this site by the n new year. Let&#8217;s see if it happens!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sean-barton.co.uk/2011/12/donation-buttons-promotion-plugins-themes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SB Mail Attachment Widget</title>
		<link>http://www.sean-barton.co.uk/2011/12/sb-mail-attachment-widget/</link>
		<comments>http://www.sean-barton.co.uk/2011/12/sb-mail-attachment-widget/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 13:19:59 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Time Savers]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[job application widget]]></category>
		<category><![CDATA[mail attachment widget]]></category>
		<category><![CDATA[wordpress email attachment]]></category>

		<guid isPermaLink="false">http://www.sean-barton.co.uk/?p=662</guid>
		<description><![CDATA[Ever wanted to use a simple contact form for your site where people can attach a file? Well I did for a recent project of mine. We wanted people to be able to apply for jobs whilst keeping the site very simple. Each post linked to a job and the consultant responsible for the job was set as the post author. Using a plugin like Contact Form 7 or Gravity Forms we thought we would be able to make up a form that people could fill in and, depending on the author of the post/page it&#8217;s on, send the email &#8230; <a class="continue_reading" href="http://www.sean-barton.co.uk/2011/12/sb-mail-attachment-widget/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-663" title="sb_mail_attachment_widget" src="http://www.sean-barton.co.uk/wp-content/uploads/2011/11/sb_mail_attachment_widget.png" alt="" width="289" height="310" />Ever wanted to use a simple contact form for your site where people can attach a file? Well I did for a recent project of mine. We wanted people to be able to apply for jobs whilst keeping the site very simple. Each post linked to a job and the consultant responsible for the job was set as the post author. Using a plugin like Contact Form 7 or Gravity Forms we thought we would be able to make up a form that people could fill in and, depending on the author of the post/page it&#8217;s on, send the email to one of many recipients.</p>
<p>Simple right using one of those bulky and, sometimes, advanced plugins? No&#8230;</p>
<p>I decided to write a plugin for it. The fields we wanted were clear, who are you, how can we get in touch with you and can you attach your CV? Well I wrote just that. This plugin adds a widget which allows you to configure the form and the email which gets sent. Most importantly it allows you to either set a fixed recipient address for the email or allow it to be set by the post author when the form is submitted. Emails sent with an attachment and it does work very well indeed (or did for us).</p>
<p>Note from the screenshot that you can include in the intro paragraph the name of the person who is to be informed if you so wish (admin2 in our case).</p>
<p>I am happy to make amends to this plugin for anyone if they will use it. I dare say I shall use it again in the future. I hope someone finds it useful if only for something to base their own plugin on.</p>
<p>Download it here: <a href="http://www.sean-barton.co.uk/wp-content/plugins/download-monitor/download.php?id=28" title="Downloaded 39 times">SB Mail Attachment Widget (2.7 kB)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sean-barton.co.uk/2011/12/sb-mail-attachment-widget/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SB Tell a Friend Widget</title>
		<link>http://www.sean-barton.co.uk/2011/11/sb-tell-a-friend-widget/</link>
		<comments>http://www.sean-barton.co.uk/2011/11/sb-tell-a-friend-widget/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 13:17:07 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Time Savers]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[free plugin]]></category>
		<category><![CDATA[recommend a friend]]></category>
		<category><![CDATA[tell a friend]]></category>

		<guid isPermaLink="false">http://www.sean-barton.co.uk/?p=658</guid>
		<description><![CDATA[I was looking for a widget to allow people to tell their friends about a site for a client of mine and realised that any I found in the WordPress repository were forcing you to use a third party service to do such a simple job. I wrote this plugin to do just that. It creates a widget for you to use on your site which is very flexible and requires no signups or payments to anything. It was written for a recruitment company so the screenshot shows it in the job vacancy context. The title, intro paragraph (optional) and &#8230; <a class="continue_reading" href="http://www.sean-barton.co.uk/2011/11/sb-tell-a-friend-widget/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-659" title="sb_taf" src="http://www.sean-barton.co.uk/wp-content/uploads/2011/11/sb_taf.png" alt="" width="288" height="205" />I was looking for a widget to allow people to tell their friends about a site for a client of mine and realised that any I found in the WordPress repository were forcing you to use a third party service to do such a simple job. I wrote this plugin to do just that. It creates a widget for you to use on your site which is very flexible and requires no signups or payments to anything.</p>
<p>It was written for a recruitment company so the screenshot shows it in the job vacancy context. The title, intro paragraph (optional) and labels for the boxes are all configurable via the widget as is the content of the email sent to the recommended person.</p>
<p>Currently there are no stats logged for usage of this plugin but it&#8217;s something I am going to be looking at in due course. It would be nice, for instance, to record the details of each recommendation sent either in our own system or in Google Analytics.</p>
<p>Download it here: <a href="http://www.sean-barton.co.uk/wp-content/plugins/download-monitor/download.php?id=27" title="Downloaded 33 times">SB Tell a Friend (2.03 kB)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sean-barton.co.uk/2011/11/sb-tell-a-friend-widget/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Getting the WordPress Excerpt outside of The Loop</title>
		<link>http://www.sean-barton.co.uk/2011/11/getting-the-wordpress-excerpt-outside-of-the-loop/</link>
		<comments>http://www.sean-barton.co.uk/2011/11/getting-the-wordpress-excerpt-outside-of-the-loop/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 14:36:13 +0000</pubDate>
		<dc:creator>Sean</dc:creator>
				<category><![CDATA[Bug Fixes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Themes]]></category>
		<category><![CDATA[Time Savers]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.sean-barton.co.uk/?p=654</guid>
		<description><![CDATA[I have been working my way around this one for a few months now, never bothering to think about the best solution. There is not, in fact, a WordPress simple function to get the excerpt outside of the WordPress loop. Why would you want to do that you ask&#8230; Example: I have a plugin I have written to create a basic shopping cart and shop front. It makes use of a simple shortcode on a Page to generate the shop which is based on a custom post type called Products. The Loop is used on the main page itself to &#8230; <a class="continue_reading" href="http://www.sean-barton.co.uk/2011/11/getting-the-wordpress-excerpt-outside-of-the-loop/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have been working my way around this one for a few months now, never bothering to think about the best solution. There is not, in fact, a WordPress simple function to get the excerpt outside of the WordPress loop. Why would you want to do that you ask&#8230;</p>
<p>Example:</p>
<p>I have a plugin I have written to create a basic shopping cart and shop front. It makes use of a simple shortcode on a Page to generate the shop which is based on a custom post type called Products. The Loop is used on the main page itself to generate the WordPress Page and subsequently process the shortcode. I loop through the products using a query_posts statement to bung the data into an array (for caching and manipulating so using a child Loop isn&#8217;t possible here) and then loop over it again later on. I want to show the Excerpt (which may or may not exist) on the shop front and the full description for my individual product pages.</p>
<p>So I initially thought of doing something like the following:</p>
<pre>&lt;?php
$product = get_page($product_id);
echo $product-&gt;post_excerpt;
?&gt;</pre>
<p>What this approach does wrong is returns nothing at all when the user hasn&#8217;t filled in an Excerpt for the product they entered. WordPress normally takes a selection of text from the main content, strips out any HTML and shortcodes and shows that instead.</p>
<p>Next option is this:</p>
<pre>&lt;?php
echo get_the_excerpt();
?&gt;</pre>
<p>What this does is prints the excerpt for the page which the shop front it hosted on (the parent page) because, as far as The Loop is concerned, the context of the page isn&#8217;t a shop front, it&#8217;s just a normal Page.</p>
<p>So why does this not work?</p>
<pre>&lt;?php
echo get_the_excerpt($product_id);
?&gt;</pre>
<p>Well some bright spark on a blog out in the ether thought it did however, regardless of what the argument for the function was initially, it no longer works as has been depracated (the argument that is).</p>
<p>So what&#8217;s the solution&#8230; well sadly it&#8217;s a custom function of your own. Luckily for you I have backtraced the code and writted my own little version of the above and it works a treat&#8230;</p>
<pre>&lt;?php
        function get_the_excerpt($id=false) {
            global $post;

            $old_post = $post;
            if ($id != $post-&gt;ID) {
                $post = get_page($id);
            }

            if (!$excerpt = trim($post-&gt;post_excerpt)) {
                $excerpt = $post-&gt;post_content;
                $excerpt = strip_shortcodes( $excerpt );
                $excerpt = apply_filters('the_content', $excerpt);
                $excerpt = str_replace(']]&gt;', ']]&amp;gt;', $excerpt);
                $excerpt = strip_tags($excerpt);
                $excerpt_length = apply_filters('excerpt_length', 55);
                $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');

                $words = preg_split("/[\n\r\t ]+/", $excerpt, $excerpt_length + 1, PREG_SPLIT_NO_EMPTY);
                if ( count($words) &gt; $excerpt_length ) {
                    array_pop($words);
                    $excerpt = implode(' ', $words);
                    $excerpt = $excerpt . $excerpt_more;
                } else {
                    $excerpt = implode(' ', $words);
                }
            }

            $post = $old_post;

            return $excerpt;
        }
?&gt;</pre>
<p>I have put mine in a class I used for my plugins these days as a helper function however just rename it (to avoid a naming conflict with it&#8217;s namesake) and call it from your plugin or theme as you would normally.</p>
<p>hope this helps someone out. Please let me know if anyone knows a better or simpler way. This works for me but I really wish there wasn&#8217;t such a monumental oversight by the WordPress guys on this one (other than creating sub loops which just feels wrong and inflexible to me)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sean-barton.co.uk/2011/11/getting-the-wordpress-excerpt-outside-of-the-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 8/61 queries in 0.543 seconds using disk
Object Caching 750/865 objects using disk

Served from: www.sean-barton.co.uk @ 2012-02-05 11:17:20 -->
