<?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>WPsites</title>
	<atom:link href="http://www.wpsites.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wpsites.co.uk</link>
	<description>Wordpress hosting &#38; development</description>
	<lastBuildDate>Mon, 10 Dec 2012 12:40:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Git to SVN deploy script for easily publishing your WordPress plugins to WordPress.org</title>
		<link>http://www.wpsites.co.uk/558-svn-deploy-script-for-easily-publishing-your-wordpress-plugins-to-wordpress.php</link>
		<comments>http://www.wpsites.co.uk/558-svn-deploy-script-for-easily-publishing-your-wordpress-plugins-to-wordpress.php#comments</comments>
		<pubDate>Fri, 25 May 2012 12:17:03 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.wpsites.co.uk/?p=558</guid>
		<description><![CDATA[Git is my version control system of choice and SVN just feels like a step backwards. Consequently I&#8217;m using Github to store the source code of my WordPress plugins making it super easy for anyone to fork/contribute. For months I&#8217;ve been searching&#160;&#8230; <a href="http://www.wpsites.co.uk/558-svn-deploy-script-for-easily-publishing-your-wordpress-plugins-to-wordpress.php">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Git is my version control system of choice and SVN just feels like a step backwards. Consequently I&#8217;m using Github to store the source code of my WordPress plugins making it super easy for anyone to fork/contribute.</p>
<p>For months I&#8217;ve been searching for an easier way to publish my code on Github to the WordPress.org repository without typing in SVN commands and finally I&#8217;ve found it.<span id="more-558"></span></p>
<p>I just wanted to point out that Git is my primary version control system and the wordpress.org svn repository is used only as a distribution mechanism. As far as I&#8217;m concerned I never want to type another SVN command, if SVN must be used then I would rather automate that whole side of things.</p>
<p>There is an interesting blog post that goes over the differences between using <a href="http://teleogistic.net/2011/05/revisiting-git-github-and-the-wordpress-org-plugin-repository/">Git as your primary or secondary version control system</a> and also documents a non automated way of keeping your GIt and SVN repositories in sync (even the commit history).</p>
<h3>By this time you probably just want to see the deployment script&#8230;</h3>
<p>The <a href="https://github.com/WPsites/WPide/blob/master/wporg-deploy.sh">wporg-deploy.sh</a> script can be viewed over on the Github repository for WPide, a plugin I&#8217;m actively developing (<a href="http://wordpress.org/extend/plugins/wpide/">a WordPress code editor</a>).</p>
<p>The script is simple to configure with just a few variables towards the top of the script that you will need to update with your own info:</p>
<pre class="wp-code-highlight prettyprint"># main config
PLUGINSLUG=&quot;wpide&quot; # this is used to create the tmp directory so don't use spaces etc
MAINFILE=&quot;WPide.php&quot; # this should be the name of your main php file in the wordpress plugin

# svn config
SVNURL=&quot;http://plugins.svn.wordpress.org/wpide/&quot; # URL to the remote SVN repo on wordpress.org, with no trailing slash
SVNUSER=&quot;WPsites&quot; # your svn username
SVNIGNORE=&quot;
backups
.DS_Store&quot; #other files you you don't need to publish to the WP.org repo</pre>
<p>Once you have a copy of the deployment script in the root of your plugin (in your git repo), that you&#8217;ve configured with your details, you can publish your plugin to the WordPress SVN repo just by executing the wporg-deply.sh script.</p>
<h3>Your workflow then goes like this:</h3>
<p style="padding-left: 30px;"><strong>1)</strong> You make changes to your plugin in your local Git repository</p>
<p style="padding-left: 30px;"><strong>2)</strong> Once those changes are ready for release (on the master branch of your local repo) make your final commit to update the version tags in your readme.txt file + main plugin file and update the changelog in the readme.txt file</p>
<p style="padding-left: 30px;"><strong>3)</strong> Final step is to execute the ./wporg-deploy.sh script to publish the plugin to the WordPress repo over SVN</p>
<p>The script takes care of tagging the release on your local Git repo, pushing that tag to your origin (Github in most cases) as well as tagging the release on the WordPress SVN repo and uploading everything.</p>
<p><strong>That&#8217;s it, you use Git as your version control system and you run the script to publish the plugin to the WordPress plugin directory, no more SVN commands!</strong></p>
<p>I didn&#8217;t write this script. I found it on Github <a href="https://github.com/thenbrent/multisite-user-management/blob/master/deploy.sh">https://github.com/thenbrent/multisite-user-management/blob/master/deploy.sh</a> after months of looking for an easier way to publish my plugins to the WordPress SVN repo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpsites.co.uk/558-svn-deploy-script-for-easily-publishing-your-wordpress-plugins-to-wordpress.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPide and how I used the TGM Plugin Activation class</title>
		<link>http://www.wpsites.co.uk/518-wpide-and-how-i-used-the-tgm-plugin-activation-class.php</link>
		<comments>http://www.wpsites.co.uk/518-wpide-and-how-i-used-the-tgm-plugin-activation-class.php#comments</comments>
		<pubDate>Fri, 09 Mar 2012 12:47:16 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WPide]]></category>

		<guid isPermaLink="false">http://www.wpsites.co.uk/?p=518</guid>
		<description><![CDATA[For a couple of months now I&#8217;ve been working on a web based development environment for WordPress. It had to be done, desktop based editors are either slow, don&#8217;t quite work the way you expect or mess with your code&#160;&#8230; <a href="http://www.wpsites.co.uk/518-wpide-and-how-i-used-the-tgm-plugin-activation-class.php">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For a couple of months now I&#8217;ve been working on a web based development environment for WordPress. It had to be done, desktop based editors are either slow, don&#8217;t quite work the way you expect or mess with your code sometimes breaking your website in the process.</p>
<p>The initial version of <a href="http://wordpress.org/extend/plugins/wpide/">WPide is on the WordPress plugin directory</a>.<br />
The bigger, better version of <a href="https://github.com/WPsites/WPide">WPide is over on Github</a> (V2dev branch).<span id="more-518"></span></p>
<p>With the initial development of WPide I just wanted to replace the convenient but somewhat difficult to work with built-in theme and plugin editor with the Ajax.org Cloud9 Editor (<a href="http://ace.ajax.org/" rel="nofollow">http://ace.ajax.org/</a>). I wanted to have line numbers, syntax highlighting, code completion for WordPress functions and backups of files just incase things go wrong.</p>
<p>Version 1 of WPide which is currently on the WordPress plugin directory achieves that, but it&#8217;s by no means perfect.</p>
<p>Over the last month I noticed a blog post or two talking about the WordPress theme/plugin editor needing improvements and even that the editor should be removed.That, combined with a real need for tabbed editing (no one is happy editing one file at a time) and some extra contributors to the project spurred me on to create version 2 of WPide. Main features being tabbed editing, using ajax for the saving/opening of files and remove the reliance on the built in editor (just in case it <em>is</em> removed in future). So now WPide has it&#8217;s own menu item in the admin sidebar and it&#8217;s own file manager that opens up access to the whole of the wp-content folder.</p>
<p>Although good progress has been made on V2, it&#8217;s still not ready for release in the WordPress repository (<a href="https://github.com/WPsites/WPide/issues?state=open&amp;sort=created&amp;direction=asc">see Github for outstanding issues</a>).  Although it&#8217;s not rocket science to download the development code from Github to try out the new version, it&#8217;s still 10x harder than installing a plugin from the WordPress repository. That&#8217;s especially true if the plugin is larger than your web hosts&#8217; maximum file upload size so has to be done through SSH/SFTP.</p>
<p style="text-align: left;"><img class="alignright size-medium wp-image-529" title="admin-notice" src="http://www.wpsites.co.uk/wp-content/uploads/admin-notice-300x148.png" alt="" width="300" height="148" />Then yesterday on Twitter <a href="https://twitter.com/#!/sanchothefat">SanchoTheFat</a> alerted me to an awesome PHP library called <a href="http://tgmpluginactivation.com/">TGM Plugin Activation</a>. When included in your plugin/theme, this library can be used to suggest or require additional plugins. Upon activation of your plugin/theme the user will be shown an alert with full details.</p>
<p style="text-align: left;">I have used theTGM Plugin Activation library in the WordPress repository hosted version of our plugin. Everyone now has an easy way to check out the new version of the plugin before release without having to even know github exists.</p>
<p style="text-align: left;">Clicking on either the alert from the TGM library or clicking the link on the WPide row of the plugin list will start the install process of WPide V2 (the development version, cutting edge, bugs and all).</p>
<h3 style="text-align: left;">So what&#8217;s cool about the TGM library?</h3>
<p style="text-align: left;">For theme creators it means you can easily setup plugin dependencies. If your theme uses Contact Form 7 that requirement can be easily defined from within your theme. When the theme is activated the user will be alerted to the plugins required and given an easy way to install all plugins without them having to know where to find them and what version to use. The plugins don&#8217;t even need to be hosted in the WordPress repository! Plugin dependencies can be pulled from Github or any other URL.</p>
<h3 style="text-align: left;">Plans for WPide</h3>
<p style="text-align: left;">I plan to get the outstanding issues with V2 ticked off in the next couple of weeks and get that version available on the WordPress plugin repository. Turns out the time I just put into adding the TGM library could have been enough to simply get V2 ready for release! That wasn&#8217;t because the TGM library is hard to implement, the challenges came from potentially running two versions of WPide on the same WordPress install, publishing the plugin to the SVN repository over at WordPress and then having to republish another version over to WordPress when things didn&#8217;t work quite as well as I had hoped.</p>
<p style="text-align: left;">The file manager needs more work as it currently doesn&#8217;t allow you to create new directories or files, only browse through existing items.</p>
<p style="text-align: left;">Once V2 is live I have another development branch on my local repository that includes some proof of concept code to push CSS changes from the IDE to the live website you have open in another browser tab. I also plan to try have this working in the opposite direction, so changes done on your live webpage using Firebug/inspector can automatically be fed into your open WPide instance to be saved. Sort of a live editor if you like. So you have one browser window open which is the WPide and in another window you have your live website; the CSS changes you make in the IDE will be shown in the live webpage (although it&#8217;s not actually live, you are just doing the same local/temporary updates just like with Firebug). Then when you are ready, all your changes can be saved and made live by clicking save in the IDE. Same could be done with JS files, .less, maybe even PHP.</p>
<p style="text-align: left;">As the editor uses the Ajax.org Cloud9 Editor (<a href="http://ace.ajax.org/" rel="nofollow">http://ace.ajax.org/</a>) the syntax checking and highlighting isn&#8217;t that great for PHP. The Cloud9 editor is primarily a JavaScript editor so not as much development has gone into the PHP mode. Therefore a worker needs creating for PHP and I&#8217;m sure the PHP mode has room for improvements.</p>
<p style="text-align: left;">Code auto complete also needs improvement. I would like to see some separation between PHP autocompletes and WordPress function autocompletes. On the WordPress function autocomplete I would also like to show arguments to function calls and links through to the codex for further assistance on function calls, actions etc.</p>
<p style="text-align: left;">Right now you can potentially break a site by uploading a PHP file with syntax errors. In future syntax needs to be checked in PHP files before they are saved to disk to stop this EVER happening. In future maybe a WordPress worker needs to be created so that we can encourage developers to code to the WordPress standards, inline documentation etc.</p>
<p style="text-align: left;">All comments and contributions gratefully received!</p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.wpsites.co.uk/518-wpide-and-how-i-used-the-tgm-plugin-activation-class.php/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gravity Forms &#8211; adding UK specific address fields</title>
		<link>http://www.wpsites.co.uk/468-gravity-forms-adding-uk-specific-address-field.php</link>
		<comments>http://www.wpsites.co.uk/468-gravity-forms-adding-uk-specific-address-field.php#comments</comments>
		<pubDate>Fri, 11 Nov 2011 00:00:05 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[Gravity Forms]]></category>

		<guid isPermaLink="false">http://www.wpsites.co.uk/?p=468</guid>
		<description><![CDATA[I haven&#8217;t used Gravity Forms much, as Contact Form 7 is our form plugin of choice, but today a client wanted to have the address changed on one of his Gravity forms. Just State changing to county and zip removing&#160;&#8230; <a href="http://www.wpsites.co.uk/468-gravity-forms-adding-uk-specific-address-field.php">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t used <a href="http://www.gravityforms.com/">Gravity Forms</a> much, as <a href="http://wordpress.org/extend/plugins/contact-form-7/">Contact Form 7</a> is our form plugin of choice, but today a client wanted to have the address changed on one of his Gravity forms. Just State changing to county and zip removing from the post code section.<span id="more-468"></span></p>
<p>On Gravity Forms the individual address fields are not that easy to change since the whole address field set is a single object, with a couple of options such as hiding address line 2. To change the address fields you need to put together some PHP to hook deep within the Gravity Form code and alter the output.</p>
<p><strong>Here is the code that you will need to place in your themes functions.php file:</strong></p>
<pre class="wp-code-highlight prettyprint">

add_filter(&quot;gform_address_types&quot;, &quot;uk_address&quot;, 10, 2);
function uk_address($address_types, $form_id){
$address_types[&quot;uk&quot;] = array(
&quot;label&quot; =&gt; &quot;UK&quot;,
&quot;country&quot; =&gt; &quot;United Kingdom&quot;,
&quot;zip_label&quot; =&gt; &quot;Postcode&quot;,
&quot;state_label&quot; =&gt; &quot;County&quot;,
&quot;states&quot; =&gt; array(&quot;Aberdeenshire&quot;=&gt;&quot;Aberdeenshire&quot;,&quot;Angus/Forfarshire&quot;=&gt;&quot;Angus/Forfarshire&quot;,&quot;Argyllshire&quot;=&gt;&quot;Argyllshire&quot;,&quot;Ayrshire&quot;=&gt;&quot;Ayrshire&quot;,&quot;Banffshire&quot;=&gt;&quot;Banffshire&quot;,&quot;Bedfordshire&quot;=&gt;&quot;Bedfordshire&quot;,&quot;Berkshire&quot;=&gt;&quot;Berkshire&quot;,
&quot;Berwickshire&quot;=&gt;&quot;Berwickshire&quot;,&quot;Blaenau Gwent&quot;=&gt;&quot;Blaenau Gwent&quot;,&quot;Bridgend&quot;=&gt;&quot;Bridgend&quot;,&quot;Buckinghamshire&quot;=&gt;&quot;Buckinghamshire&quot;,&quot;Buteshire&quot;=&gt;&quot;Buteshire&quot;,&quot;Caerphilly&quot;=&gt;&quot;Caerphilly&quot;,&quot;Caithness&quot;=&gt;&quot;Caithness&quot;,
&quot;Cambridgeshire&quot;=&gt;&quot;Cambridgeshire&quot;,&quot;Cardiff&quot;=&gt;&quot;Cardiff&quot;,&quot;Carmarthenshire&quot;=&gt;&quot;Carmarthenshire&quot;,&quot;Ceredigion&quot;=&gt;&quot;Ceredigion&quot;,&quot;Cheshire&quot;=&gt;&quot;Cheshire&quot;,&quot;Clackmannanshire&quot;=&gt;&quot;Clackmannanshire&quot;,
&quot;Conwy&quot;=&gt;&quot;Conwy&quot;,&quot;Cornwall&quot;=&gt;&quot;Cornwall&quot;,&quot;Cromartyshire&quot;=&gt;&quot;Cromartyshire&quot;,&quot;Cumberland&quot;=&gt;&quot;Cumberland&quot;,&quot;Denbighshire&quot;=&gt;&quot;Denbighshire&quot;,&quot;Derbyshire&quot;=&gt;&quot;Derbyshire&quot;,&quot;Devon&quot;=&gt;&quot;Devon&quot;,&quot;Dorset&quot;=&gt;&quot;Dorset&quot;,
&quot;Dumfriesshire&quot;=&gt;&quot;Dumfriesshire&quot;,&quot;Dunbartonshire/Dumbartonshire&quot;=&gt;&quot;Dunbartonshire/Dumbartonshire&quot;,&quot;Durham&quot;=&gt;&quot;Durham&quot;,&quot;East Lothian/Haddingtonshire&quot;=&gt;&quot;East Lothian/Haddingtonshire&quot;,&quot;Essex&quot;=&gt;&quot;Essex&quot;,&quot;Fife&quot;=&gt;&quot;Fife&quot;,
&quot;Flintshire&quot;=&gt;&quot;Flintshire&quot;,&quot;Gloucestershire&quot;=&gt;&quot;Gloucestershire&quot;,&quot;Gwynedd&quot;=&gt;&quot;Gwynedd&quot;,&quot;Hampshire&quot;=&gt;&quot;Hampshire&quot;,&quot;Herefordshire&quot;=&gt;&quot;Herefordshire&quot;,&quot;Hertfordshire&quot;=&gt;&quot;Hertfordshire&quot;,&quot;Huntingdonshire&quot;=&gt;&quot;Huntingdonshire&quot;,
&quot;Inverness-shire&quot;=&gt;&quot;Inverness-shire&quot;,&quot;Isle of Anglesey&quot;=&gt;&quot;Isle of Anglesey&quot;,&quot;Kent&quot;=&gt;&quot;Kent&quot;,&quot;Kincardineshire&quot;=&gt;&quot;Kincardineshire&quot;,&quot;Kinross-shire&quot;=&gt;&quot;Kinross-shire&quot;,&quot;Kirkcudbrightshire&quot;=&gt;&quot;Kirkcudbrightshire&quot;,
&quot;Lanarkshire&quot;=&gt;&quot;Lanarkshire&quot;,&quot;Lancashire&quot;=&gt;&quot;Lancashire&quot;,&quot;Leicestershire&quot;=&gt;&quot;Leicestershire&quot;,&quot;Lincolnshire&quot;=&gt;&quot;Lincolnshire&quot;,&quot;Merthyr Tydfil&quot;=&gt;&quot;Merthyr Tydfil&quot;,&quot;Middlesex&quot;=&gt;&quot;Middlesex&quot;,
&quot;Midlothian/Edinburghshire&quot;=&gt;&quot;Midlothian/Edinburghshire&quot;,&quot;Monmouthshire&quot;=&gt;&quot;Monmouthshire&quot;,&quot;Morayshire&quot;=&gt;&quot;Morayshire&quot;,&quot;Nairnshire&quot;=&gt;&quot;Nairnshire&quot;,&quot;Neath Port Talbot&quot;=&gt;&quot;Neath Port Talbot&quot;,
&quot;Newport&quot;=&gt;&quot;Newport&quot;,&quot;Norfolk&quot;=&gt;&quot;Norfolk&quot;,&quot;Northamptonshire&quot;=&gt;&quot;Northamptonshire&quot;,&quot;Northumberland&quot;=&gt;&quot;Northumberland&quot;,&quot;Nottinghamshire&quot;=&gt;&quot;Nottinghamshire&quot;,&quot;Orkney&quot;=&gt;&quot;Orkney&quot;,
&quot;Oxfordshire&quot;=&gt;&quot;Oxfordshire&quot;,&quot;Peeblesshire&quot;=&gt;&quot;Peeblesshire&quot;,&quot;Pembrokeshire&quot;=&gt;&quot;Pembrokeshire&quot;,&quot;Perthshire&quot;=&gt;&quot;Perthshire&quot;,&quot;Powys&quot;=&gt;&quot;Powys&quot;,&quot;Renfrewshire&quot;=&gt;&quot;Renfrewshire&quot;,
&quot;Rhondda Cynon Taff&quot;=&gt;&quot;Rhondda Cynon Taff&quot;,&quot;Ross-shire&quot;=&gt;&quot;Ross-shire&quot;,&quot;Roxburghshire&quot;=&gt;&quot;Roxburghshire&quot;,&quot;Rutland&quot;=&gt;&quot;Rutland&quot;,&quot;Selkirkshire&quot;=&gt;&quot;Selkirkshire&quot;,&quot;Shetland&quot;=&gt;&quot;Shetland&quot;,&quot;Shropshire&quot;=&gt;&quot;Shropshire&quot;,
&quot;Somerset&quot;=&gt;&quot;Somerset&quot;,&quot;Staffordshire&quot;=&gt;&quot;Staffordshire&quot;,&quot;Stirlingshire&quot;=&gt;&quot;Stirlingshire&quot;,&quot;Suffolk&quot;=&gt;&quot;Suffolk&quot;,&quot;Surrey&quot;=&gt;&quot;Surrey&quot;,&quot;Sussex&quot;=&gt;&quot;Sussex&quot;,&quot;Sutherland&quot;=&gt;&quot;Sutherland&quot;,&quot;Swansea&quot;=&gt;&quot;Swansea&quot;,&quot;Torfaen&quot;=&gt;&quot;Torfaen&quot;,
&quot;Vale of Glamorgan&quot;=&gt;&quot;Vale of Glamorgan&quot;,&quot;Warwickshire&quot;=&gt;&quot;Warwickshire&quot;,&quot;West Lothian/Linlithgowshire&quot;=&gt;&quot;West Lothian/Linlithgowshire&quot;,&quot;Westmorland&quot;=&gt;&quot;Westmorland&quot;,
&quot;Wigtownshire&quot;=&gt;&quot;Wigtownshire&quot;,&quot;Wiltshire&quot;=&gt;&quot;Wiltshire&quot;,&quot;Worcestershire&quot;=&gt;&quot;Worcestershire&quot;,&quot;Wrexham&quot;=&gt;&quot;Wrexham&quot;,&quot;Yorkshire&quot;=&gt;&quot;Yorkshire&quot;)
);
return $address_types;
}

</pre>
<p>Once that code is in place you will then have an additional address type called UK (default options are International, United States and Canadian).</p>
<h1><span style="color: #003366;">Before</span></h1>
<p><img class="size-full wp-image-472 alignnone" title="before" src="http://www.wpsites.co.uk/wp-content/uploads/before.jpg" alt="" width="488" height="223" /></p>
<h1><span style="color: #003366;">After</span></h1>
<p><img class="alignnone size-full wp-image-473" title="after" src="http://www.wpsites.co.uk/wp-content/uploads/after.jpg" alt="" width="488" height="223" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpsites.co.uk/468-gravity-forms-adding-uk-specific-address-field.php/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Replacing shortcodes in TinyMCE with a graphic</title>
		<link>http://www.wpsites.co.uk/435-replacing-inserted-shortcodes-in-tinymce-with-a-graphic.php</link>
		<comments>http://www.wpsites.co.uk/435-replacing-inserted-shortcodes-in-tinymce-with-a-graphic.php#comments</comments>
		<pubDate>Fri, 28 Oct 2011 14:09:58 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Short codes]]></category>
		<category><![CDATA[TinyMCE]]></category>

		<guid isPermaLink="false">http://www.wpsites.co.uk/?p=435</guid>
		<description><![CDATA[To cut a long story short I went to the Liverpool WordPress interest group last night and one thing that came up that no one seemed to have a solution for was users messing up short codes and how could&#160;&#8230; <a href="http://www.wpsites.co.uk/435-replacing-inserted-shortcodes-in-tinymce-with-a-graphic.php">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>To cut a long story short I went to the <a href="http://interconnectit.com/2986/liverpool-wordpress-interest-group-swig-meeting-27th-october-2011/">Liverpool WordPress interest group</a> last night and one thing that came up that no one seemed to have a solution for was users messing up short codes and how could we replace the short code with a more user friendly image just like the WordPress gallery short code.<span id="more-435"></span>This must have played on my mind because I woke this morning a couple of hours before the alarm and just had to get up and find a solution.</p>
<p>To create the plugin I had to find a short code which I could then attempt to replace with a graphic and since <a href="http://interconnectit.com/2364/announcing-spots/">Spots from Interconnect IT</a> is one of my favourite plugins right now I thought I would use that. So I have created a plugin that will replace any &#8220;icitspot&#8221; short codes with a small graphic. This plugin isn&#8217;t meant for release, it was made quickly this morning (when I say quickly I mean the whole morning) and  isn&#8217;t thoroughly tested. Hopefully it may help someone who is trying to achieve similar things with their own plugin short codes.</p>
<h3>Quick rundown on how the plugin works</h3>
<p>The plugins main php file uses just two filters (mce_external_plugins, tiny_mce_before_init) to add our TinyMCE plugin and an extra CSS file for styling.</p>
<p>Most of the code that does the bulk of the work is inside tinymce-plugin/icitspots/editor_plugin.js which is in effect a <a href="http://www.tinymce.com/wiki.php/API3:class.tinymce.Plugin">TinyMCE plugin</a>.</p>
<p>I borrowed some code and structure from \wp-includes\js\tinymce\plugins\wpgallery\editor_plugin.dev so if you want to add buttons and click events to this then take a look at that file for guidance.</p>
<p><a href="http://www.wpsites.co.uk/wp-content/uploads/tinymce-graphical-shortcode.zip">You can download the plugin files here.</a></p>
<p>Hopefully this will be of use to someone. I&#8217;d like to think the code is pretty straight forward. Send us a comment if you have any questions or observations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpsites.co.uk/435-replacing-inserted-shortcodes-in-tinymce-with-a-graphic.php/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Being More Social</title>
		<link>http://www.wpsites.co.uk/439-being-more-social.php</link>
		<comments>http://www.wpsites.co.uk/439-being-more-social.php#comments</comments>
		<pubDate>Fri, 28 Oct 2011 13:26:13 +0000</pubDate>
		<dc:creator>lucy</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[WP Sites news]]></category>

		<guid isPermaLink="false">http://www.wpsites.co.uk/?p=439</guid>
		<description><![CDATA[At WP Sites we&#8217;re admittedly not the best at keeping in touch with the WordPress community through social media.  I&#8217;m sure most WordPress and hosting professionals find, like we do, that you&#8217;re busy with your own infrastructure and client&#8217;s projects,&#160;&#8230; <a href="http://www.wpsites.co.uk/439-being-more-social.php">Continue&#160;reading&#160;<span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At WP Sites we&#8217;re admittedly not the best at keeping in touch with the WordPress community through social media.  I&#8217;m sure most WordPress and hosting professionals find, like we do, that you&#8217;re busy with your own infrastructure and client&#8217;s projects, and need to make a conscious effort to look away from your development platform and pause to talk about it!</p>
<p>Now and then we do have a eureka or a huh? moment that we want to share.  And we&#8217;ve enjoyed a recent plethora of WordPress meet-ups that have inspired both questions and answers that deserve further research and discussion.  Over the last month we&#8217;ve managed to attend the inaugural WordPress Birmingham (don&#8217;t forget the UK) meetup, South Yorkshire WordPress User Group and Liverpool WordPress Interest Group (SWIG) &#8211; almost a clean sweep of the North West WordPress user groups and a diverse mixture of attendees, agendas and accents.  Thanks to the organisers and users of those groups we may finally have the push we need to become more social and do a little sharing&#8230;</p>
<p>So welcome to our blog where we may talk about WordPress development, hosting and anything else that gives us pause for thought..</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wpsites.co.uk/439-being-more-social.php/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/

Page Caching using disk: enhanced

Served from: www.wpsites.co.uk @ 2013-05-19 06:32:15 -->