<?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>Woody Hayday &#124; Blog &#187; PHP</title>
	<atom:link href="http://blog.woodylabs.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.woodylabs.com</link>
	<description>An exploration of life, technology and writing</description>
	<lastBuildDate>Wed, 25 Jan 2012 07:08:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Recent Projects, Top Freelancer People Per Hour</title>
		<link>http://blog.woodylabs.com/2011/12/recent-projects-top-freelancer-on-people-per-hour/</link>
		<comments>http://blog.woodylabs.com/2011/12/recent-projects-top-freelancer-on-people-per-hour/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 09:45:57 +0000</pubDate>
		<dc:creator>Woody</dc:creator>
				<category><![CDATA[Looking Back]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Technology]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[freelance]]></category>
		<category><![CDATA[freelancing]]></category>
		<category><![CDATA[people per hour]]></category>

		<guid isPermaLink="false">http://blog.woodylabs.com/?p=826</guid>
		<description><![CDATA[It was a busy November, but it paid off &#8211; completed a good few projects for some great clients, and whats more I won no# 1 Top Freelancer @ people per hour! You can read more about some of my recent projects here, although there&#8217;s only a few case studies up, the most public of [...]<hr /><a href="http://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
			<content:encoded><![CDATA[<div align="center"><a href="http://www.peopleperhour.com/toprankedfreelancers.php?month=1320105600" target="_blank"><img class="aligncenter" title="I am Top 1 of 169,000 freelancers for November!" src="http://www.woodyhayday.com/pph/pph-TopFreelancer.png" alt="I am Top 1 of 169,000 freelancers for November!" width="150" height="110" border="0" /></a></div>
<p>It was a busy November, but it paid off &#8211; completed a good few projects for some great clients, and whats more I won no# 1 Top Freelancer @ people per hour!</p>
<p>You can read more about some of my recent projects <a href="http://www.woodyhayday.com/pph/">here</a>, although there&#8217;s only a few case studies up, the most public of the projects was a great life planning app that I built to first iteration, you can check it out (DO IT NOW!) @ <a href="http://www.5years.me" target="_blank">5years.me</a> &#8211; built in the cloud on PaaS, behind the scenes I have also helped develop a social media analytics platform that is a marketeers wet dream, maybe as it gets properly released I will divulge more on that. Needless to say November was a great month of good work for great clients &#8211; off the radar now until my big project in early 2012 <img src='http://blog.woodylabs.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<div align="center"><a href="http://www.woodyhayday.com/pph/php-mysql-jquery-web-application-built-cloudcontrol.png" target="_blank"><img src="http://www.woodyhayday.com/pph/life-planning-web-app-built-in-the-cloud-php-jquery-mysql-schema.png" width="640" height="320" alt="Life Planning Web App Built in the cloud (cloudcontrolled.com)" border="0" /></a></div>
<div class="shr-publisher-826"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.woodylabs.com/2011/12/recent-projects-top-freelancer-on-people-per-hour/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook time in php &#8211; Facebook uses GMT not PDT/PST?</title>
		<link>http://blog.woodylabs.com/2011/10/facebook-time-in-php-facebook-uses-gmt-not-pdtpst/</link>
		<comments>http://blog.woodylabs.com/2011/10/facebook-time-in-php-facebook-uses-gmt-not-pdtpst/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 12:09:11 +0000</pubDate>
		<dc:creator>Woody</dc:creator>
				<category><![CDATA[Facebook Pages]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook apps]]></category>
		<category><![CDATA[facebook pages]]></category>
		<category><![CDATA[facebook time]]></category>
		<category><![CDATA[timezones]]></category>

		<guid isPermaLink="false">http://blog.woodylabs.com/?p=793</guid>
		<description><![CDATA[I don&#8217;t know whether its purely related to my location when I am calling facebooks&#8217; graph API or what, but all the talk about what timestamps facebooks API returns seems to be wrong. Perhaps they&#8217;ve changed something, perhaps they are re-adjusting them just for me. If its the latter I wonder why they are giving me GMT [...]<hr /><a href="http://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know whether its purely related to my location when I am calling facebooks&#8217; graph API or what, but all the talk about what timestamps facebooks API returns seems to be wrong. Perhaps they&#8217;ve changed something, perhaps they are re-adjusting them just for me. If its the latter I wonder why they are giving me GMT when I am in Belgium? Is it based on the USER?</p>
<div align="center"><img src="http://farm4.static.flickr.com/3308/3324587240_c663bd1c9b_z.jpg?zz=1" width="640" height="425" alt="Antique Clock Face"><br /><a href="http://www.flickr.com/photos/arcticpuppy/3324587240/" title="Antique Clock Face by tibchris, on Flickr" rel="nofollow" target="_blank">Clock Face by tibchris</a><br /><strong>Facebook Time in PHP, who the what where?</strong></div>
<p>If you haven&#8217;t tried pulling anything time-sensitive out of the graph API yet, don&#8217;t, that&#8217;s my advice. There is not a single bit of coherent explanation as to how the API hand&#8217;s out times, when I first researched it I had written on my pad &#8220;Pacific time&#8221;&#8230;great, did my past (possibly beer holding) self not remember that Pacific time is one thing half the year and another the other half? PDT/PST? Obviously not. What&#8217;s more, now when I check (post something on a page, grab it with graph API) &#8211; its giving me GMT+00 times, WHEN I&#8217;M IN GMT+01.</p>
<p>&nbsp;</p>
<p>All I can work out is facebook have either been pleasant enough to convert the time to the users original registration locale (likely, and pleasant) and not noted it down ANYWHERE publicly, or they have chosen to use GMT. Probably the former, either way &#8211; facebook developers &#8211; we need a better solution for working with facebook times.</p>
<div class="shr-publisher-793"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.woodylabs.com/2011/10/facebook-time-in-php-facebook-uses-gmt-not-pdtpst/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hosting facebook Apps/Applications/iFrame Pages on 1and1 (SSL)</title>
		<link>http://blog.woodylabs.com/2011/08/hosting-facebook-appsapplicationsiframe-pages-on-1and1-ssl/</link>
		<comments>http://blog.woodylabs.com/2011/08/hosting-facebook-appsapplicationsiframe-pages-on-1and1-ssl/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 08:28:37 +0000</pubDate>
		<dc:creator>Woody</dc:creator>
				<category><![CDATA[Facebook Graph API]]></category>
		<category><![CDATA[Facebook Pages]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Technology]]></category>
		<category><![CDATA[1and1]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook apps]]></category>
		<category><![CDATA[fan gating]]></category>
		<category><![CDATA[fan page]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://blog.woodylabs.com/?p=778</guid>
		<description><![CDATA[For those who run facebook fan pages you will likely know about fan gating and the importance of adding your own content to your facebook fanpage. This used to be done with the facebook static fbml app but that&#8217;s really the old way, looking forward the best way is to make its own specific app. [...]<hr /><a href="http://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
			<content:encoded><![CDATA[<p>For those who run facebook fan pages you will likely know about fan gating and the importance of adding your own content to your facebook fanpage. This used to be done with the facebook static fbml app but that&#8217;s really the old way, looking forward the best way is to make its own specific app. There&#8217;s <a href="http://www.hyperarts.com/blog/adding-iframe-application-to-facebook-fan-page/" rel="nofollow" target="_blank">a bunch</a> of <a href="http://www.hyperarts.com/blog/facebook-secure-browsing-https-iframe-tabs-mixed-content-warnings/" rel="nofollow" target="_blank">really good stuff</a> out there about setting up your apps but none of it seems to deal with the middle level guys who don&#8217;t want to shell out time/capital setting up amazon hosting (probably a good idea either way) or don&#8217;t strictly have https for the domain, those that just need an interim/growth testing solution with their current hosts, specifically in this case 1and1.</p>
<p>You <em>can</em> host facebook apps on any host, but hosting somewhere unsecure (not accessible via https) will flag up the following prompt for anyone browsing to the page with secure browsing turned on (high proportion of fb users.) You CAN also use amazon cloud storage (S3) for free https file storage, up to a level, however you <em>cannot run server side code</em> (php/ASP.NET) without setting up a server with their EC service.</p>
<div align="center"><img class="aligncenter size-full wp-image-779" title="facebook-fan-page-app-creation-on-1and1-ssl" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/facebook-fan-page-app-creation-on-1and1-ssl.png" alt="" width="458" height="217" /><br /><em>Not pretty eh</em>? What will that do to your conversion rates? Yep nothing good.</div>
<p><span id="more-778"></span></p>
<p>Its not just the mavericks either, for example brands like banana republic are still running http stuff, prompting the user with this message on loading their like-capture pages.</p>
<h3>Set up 1and1 shared hosting to host Secure SSL facebook apps/applications/tab pages</h3>
<p>So anyway here&#8217;s the cheap, quick way to hosting your facebook apps SECURELY using 1and1 shared hosting.</p>
<ol>
<li>Log onto admin.1and1.co.uk (or .com)</li>
<li>(Optional) Register a domain name which you don&#8217;t mind generically hosting your fb content. For me this is www.whfb.co.uk &#8211; this will only show up if users looked at the information for the frame, probably wont ever matter, but if you are running a whole host of different niche pages it might be worth it for simplicity/segmentation.</li>
<li>Go to domain management section and click &#8220;Shared SSL Encryption&#8221; under SSL option<br /><img class="aligncenter size-full wp-image-780" title="shared-ssl-for-facebook-apps-applications-1and1" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/shared-ssl-for-facebook-apps-applications-1and1.png" alt="" width="364" height="83" /></li>
<li>Assign the Shared SSL Encryption to your generic domain/main domain you want to use<br /><img class="aligncenter size-full wp-image-781" title="assign-ssl-to-domain-for-creating-facebook-apps-secure" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/assign-ssl-to-domain-for-creating-facebook-apps-secure.png" alt="" width="224" height="76" /></li>
<li>Setup a folder under your domain like you would with any facebook page, use the facebook php api to fangate or just put some html up there, bare in mind all objects referenced in what you put up should direct resources to &#8220;https&#8221; not http. That is if you reference &#8220;http://www.example.com/someimage.png&#8221;, switch the http for https (save your own copy of the file if you need to. Referencing images locally in the folder should work fine for http/https if you use the same domain.</li>
<li>Setup your facebook app (theres thousands of guides on this&#8230;) and set the following (under &#8220;Select how your app integrates with Facebook -&gt; Page Tab&#8221;)<br /><img class="aligncenter size-full wp-image-782" title="select-how-your-tab-app-integrates-with-facebook-http-https" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/select-how-your-tab-app-integrates-with-facebook-http-https.png" alt="" width="423" height="146" /></li>
<li>Add the app to your facebook fan page and visit it, (setting it as default landing page perhaps <img src='http://blog.woodylabs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) &#8211; you should not get any security messages, if you have you need to go back and check your html is pointing to any external elements via https.</li>
</ol>
<p>Chances are if you are running 1and1 shared hosting (or any other major) then you will have SSLRelays free of charge with your package, what&#8217;s more this takes about 1 minute to setup, so test with this before you stick stuff in the cloud!</p>
<div class="shr-publisher-778"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.woodylabs.com/2011/08/hosting-facebook-appsapplicationsiframe-pages-on-1and1-ssl/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Remove unwanted eBay strings from A2P [Auction2post] posts with Automated Editor</title>
		<link>http://blog.woodylabs.com/2011/08/remove-unwanted-ebay-strings-from-a2p-auction2post-posts-with-automated-editor/</link>
		<comments>http://blog.woodylabs.com/2011/08/remove-unwanted-ebay-strings-from-a2p-auction2post-posts-with-automated-editor/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 04:58:32 +0000</pubDate>
		<dc:creator>Woody</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Search Engine Optimisation]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Auction2Post]]></category>
		<category><![CDATA[Automated Editor]]></category>

		<guid isPermaLink="false">http://blog.woodylabs.com/?p=718</guid>
		<description><![CDATA[Free rules file with this post! Do you use Auction2Post [A2P]? If you don&#8217;t its a wordpress plugin which automatically implants listings from ebay as wordpress posts, including affiliate links through the ebay partner network from which you earn a commission. Its quite useful. Read my post about it here. Anyhow if you don&#8217;t use the [...]<hr /><a href="http://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: right;">Free rules file with this post!</h3>
<p>Do you use <a href="http://blog.woodylabs.com/2009/10/auction-2-post/">Auction2Post</a> [A2P]? If you don&#8217;t its a wordpress plugin which automatically implants listings from ebay as wordpress posts, including affiliate links through the ebay partner network from which you earn a commission. Its quite useful. Read my post about it <a href="http://blog.woodylabs.com/2009/10/auction-2-post/">here</a>. Anyhow if you don&#8217;t use the plugin you can pretty much skip this post, unless you use a similar thing which is generating all kinds of nasty strings you don&#8217;t want in your posts <img src='http://blog.woodylabs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>This post will show you how to sanitise your auction2post posts for annoying (and contract breaking) ebay auction strings, it even has 125 rules already in a file for import!</p>
<h3>The problem</h3>
<p>Auction2Post is great in lots of respects, its well written and does a prescribed job. Where it caused irritation for me is arguably after its done its job, after the wordpress plugin had created its posts. You see you can create posts via templates, which is great, it allows enough customisation for most, however I wanted a bit of text processing as often you are left with irritating auction footers and garbage text which make the user hit back or close at a displeasing rate (some of these ebay strings might actually make your Auction 2 posts sites break ebay partner network terms of service, its really worth sanitising your posts as I describe below!)</p>
<div style="border: 1px solid #09C; background-color: #b5d1ea; padding: 4px; margin: 10px; text-align: center;">
<strong>For Example:</strong></p>
<p>My EBAY User ID: yah00002009</p>
<p>welcome to Our ebay Store shop</p>
<p>IF YOU ARE NEW TO EBAY OR DO NOT HAVE A PAY PAL ACCOUNT PLEASE CONTACT ME SO WE CAN HELP MAKE ARRANGEMENTS WITH YOU</p>
</div>
<h3>The Solution</h3>
<p>This problem with Auction 2 Post and wordpress is one of the reasons <a href="http://www.automatededitor.com"  target="_blank">Automated Editor</a> was born, to give a bit more freedom in text processing, wordpress filters are great but I don&#8217;t think filtering hundreds of ebay phrases like that is effective.</p>
<p><span id="more-718"></span></p>
<p>If you want to cleanse your Auction2post posts of dirty ebay auction footers and the like here is how I currently do it:</p>
<ol>
<li>Install Automated Editor plugin on the blog in question. (Get it <a href="http://www.automatededitor.com/launch-offer-save-over-50-percent/" target="_blank">here</a> and install like a normal plugin.)</li>
<li>Go to the plugin (Auto Editor on its plugin menu) and read the disclaimer (big red box) and THEN accept it.</li>
<li>Download the rules file I have created (Get it at the bottom of this post) and unzip it somewhere.
<div style="border: 1px solid #09C; background-color: #b5d1ea; padding: 4px; margin: 10px; text-align: center;"><img class="alignnone size-full wp-image-726" title="ebay-string-replace-rules-file" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/ebay-string-replace-rules-file.png" alt="" width="96" height="116" /></div>
</li>
<li>Go to &#8220;Import/Export&#8221; on the Automated Editor plugin menu.
<div style="border: 1px solid #09C; background-color: #b5d1ea; padding: 4px; margin: 10px; text-align: center;"><img class="alignnone size-full wp-image-727" title="using-automated-editor-sidebar" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/using-automated-editor-sidebar.png" alt="" width="156" height="163" /></div>
</li>
<li>Choose the aforementioned rules file and hit import.
<div style="border: 1px solid #09C; background-color: #b5d1ea; padding: 4px; margin: 10px; text-align: center;"><img class="alignnone size-full wp-image-728" title="automated-editor-and-auction-2-post-importexport" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/automated-editor-and-auction-2-post-importexport.png" alt="" width="498" height="132" /></div>
</li>
<li>You should now have 125 or so rules in your rules list <img src='http://blog.woodylabs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>Now go to Schedules on the plugin menu and then click Add New.</li>
<li>Scroll down and hit Select All (under the long list of rule checkboxes ebay1, ebay2 etc.)
<div style="border: 1px solid #09C; background-color: #b5d1ea; padding: 4px; margin: 10px; text-align: center;"><img class="alignnone size-full wp-image-723" title="automated-editor-plugin-ebay-replace-select-all" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/automated-editor-plugin-ebay-replace-select-all.png" alt="" width="355" height="144" /></div>
</li>
<li>Scroll down again and select Most Recent Post from the Target dropdown.</li>
<li>Make sure run option is on &#8220;After a post is published&#8221;.
<div style="border: 1px solid #09C; background-color: #b5d1ea; padding: 4px; margin: 10px; text-align: center;"><img class="alignnone size-full wp-image-724" title="automated-editor-schedule-for-ebay-phrase-replace" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/automated-editor-schedule-for-ebay-phrase-replace.png" alt="" width="344" height="220" /></div>
</li>
<li>Save it.</li>
<li>Turn on schedules.
<div style="border: 1px solid #09C; background-color: #b5d1ea; padding: 4px; margin: 10px; text-align: center;"><a target="_blank" href="http://blog.woodylabs.com/wp-content/uploads/2011/08/automated-editor-automation-turned-on.png"><img class="alignnone size-full wp-image-722" title="automated-editor-automation-turned-on-sm" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/automated-editor-automation-turned-on-sm.png" border="0" alt="" width="600" height="190" /></a></div>
</li>
<li>Post a test post, either via A2P or manually, it should remove any of the 125 annoying (common) ebay auction strings it finds! Sorted.</li>
</ol>
<h4>Notes on this method:</h4>
<ul>
<li>You will need the <a href="http://www.automatededitor.com/compare-versions/" target="_blank">Full version</a> (Ultra Pro) of Automated Editor, the free version is limited to 3 rules and this rules file alone has 125 ebay-string removing rules. It&#8217;s cheap though <a href="http://www.automatededitor.com/launch-offer-save-over-50-percent/" target="_blank">here</a>.</li>
<li>If you already have Auction2Post auction posts in the system you will have to setup a different schedule to operate on those, I usually set this up before I set any automation (it&#8217;s quite easy, just do the same thing and switch out &#8220;Most Recent post&#8221; for &#8220;all posts&#8221;, run it once then disable the schedule &#8211; you don&#8217;t want it operating on them all every time!)</li>
<li>Currently this removes 125 strings I have found previously, mostly from uk auctions, I am considering writing a simplified version of this whole setup, an &#8220;Auction2Post Post Cleaner&#8221; which you can just activate and leave, perhaps with cloud rules, so watch this space. Good thing about the above setup though is you can continually improve your own rules file by adding your own strings.</li>
</ul>
<h3>Rules File</h3>
<div>The link below offers a RAR&#8217;d version of my Automated Editor rules file which contains 125 x ebay string removal rules, yours for free <img src='http://blog.woodylabs.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Please however do use carefully, as with all automated-editor situations if you don&#8217;t understand what you are doing then don&#8217;t use it, this is for the people that understand the above problem and have the full version of the plugin.</div>
<div align="center"><img class="aligncenter size-full wp-image-726" title="ebay-string-replace-rules-file" src="http://blog.woodylabs.com/wp-content/uploads/2011/08/ebay-string-replace-rules-file.png" alt="" width="96" height="116" /><br />
<br /><a href="http://blog.woodylabs.com/downloads/Woodylabs_AE_Rules_Export_125.rar">Download Rules File</a><br />[Right click-Save as]</div>
<div class="shr-publisher-718"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.woodylabs.com/2011/08/remove-unwanted-ebay-strings-from-a2p-auction2post-posts-with-automated-editor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automated Editor Released!</title>
		<link>http://blog.woodylabs.com/2011/08/automated-editor-released/</link>
		<comments>http://blog.woodylabs.com/2011/08/automated-editor-released/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 12:33:55 +0000</pubDate>
		<dc:creator>Woody</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[Business]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Technology]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Automated Editor]]></category>
		<category><![CDATA[Small Nugget Projects]]></category>

		<guid isPermaLink="false">http://blog.woodylabs.com/?p=697</guid>
		<description><![CDATA[A nice small chunk of a project, Automated Editor is a wordpress plugin which allows you to automate some of the post editing process. Written to be lightweight and flexible it can do a lot with a little input. The plugin replaces a previous script/small app I had previously commissioned to offer automatic string replacement/removal [...]<hr /><a href="http://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.automatededitor.com/i/automated-editor-box-109-t.png" alt="Automated Editor wordpress plugin" border="0" align="left" style="margin:9px;"/><br />
A nice small chunk of a project, <a href="http://www.automatededitor.com" target="_blank">Automated Editor</a> is a wordpress plugin which allows you to automate some of the post editing process. <a href="http://www.automatededitor.com/compare-versions/" target="_blank"><img src="http://www.automatededitor.com/i/download-automated-editor-word-press-plugin.png" alt="Automated Editor wordpress plugin" border="0" align="right" style="margin:5px;"/></a>Written to be lightweight and flexible it can do a lot with a little input. The plugin replaces a previous script/small app I had previously commissioned to offer automatic string replacement/removal from posts at point of publishing. With this public release version though it has had all the bells and whistles added to it, and will do some other useful tasks such as the following:
<div style="margin-top:20px">
<ul>
<li>Replace one string with another (String replace) e.g. Replace ‘X’ with ‘Y’</li>
<li>Remove instances of a string (String remove) e.g. Remove all instances of ‘X’</li>
<li>Replace strings which match a regex rule with another string (Regex replace) e.g. Replace any numbers (^[0-9]{3}$) with ‘y’</li>
<li>Remove strings which match a regex rule (Regex replace) e.g. Remove any numbers (^[0-9]{3}$)</li>
<li>Prepend a string onto the front of a post (Prepend) e.g. Add ‘X’ to the top of a post</li>
<li>Append a string onto the back of a post (Append) e.g. Add ‘X’ to the bottom of a post</li>
<li>Add a post into a category (Add category) e.g. Add category ‘X’ to the post if its not already added.</li>
<li>Add a tag onto a post (Add tag) e.g. Add tag ‘X’ to the post if its not already added.</li>
<li>Change a posts date</li>
<li>Change a posts status</li>
</ul>
<p>(Taken from <a href="http://www.automatededitor.com/anatomy/#rules" target="_blank">here</a>.)</div>
<p>If you want to read more about the plugin you can check out this post on, <a href="http://www.automatededitor.com/what-is-the-point-in-the-automated-editor-plugin/" target="_blank">What is the point in Automated Editor</a> or go right ahead and <a href="http://wordpress.org/extend/plugins/automated-editor/" target="_blank">get it from wordpress.org</a> or buy the professional version at <a href="http://www.automatededitor.com/compare-versions/" target="_blank">AutomatedEditor.com</a>.</p>
<p>Watch this space for a few posts on how I use the plugin, (it works fantastically well when rigged up with <a href="http://blog.woodylabs.com/2009/10/auction-2-post/" target="_blank">Auction2Post</a>.)</p>
<div class="shr-publisher-697"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.woodylabs.com/2011/08/automated-editor-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>get_tag_name function for wordpress</title>
		<link>http://blog.woodylabs.com/2011/07/get_tag_name-function-for-wordpress/</link>
		<comments>http://blog.woodylabs.com/2011/07/get_tag_name-function-for-wordpress/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 16:48:04 +0000</pubDate>
		<dc:creator>Woody</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.woodylabs.com/?p=679</guid>
		<description><![CDATA[get_cat_name is a simple useful function to get the category name from its id in wordpress, there isn&#8217;t one for tag (and you cant use the same one&#8230;) so here&#8217;s I adapted it for tags. TBH its super lazy to be using this, but meh. Uses get_term. I am writing Automated Editor, a wordpress plugin [...]<hr /><a href="http://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
			<content:encoded><![CDATA[<p><a href="http://codex.wordpress.org/Function_Reference/get_cat_name" rel="nofollow" target="_blank">get_cat_name</a> is a simple useful function to get the category name from its id in wordpress, there isn&#8217;t one for tag (and you cant use the same one&#8230;) so here&#8217;s I adapted it for tags. TBH its super lazy to be using this, but meh. Uses <a href="http://codex.wordpress.org/Function_Reference/get_term" rel="nofollow" target="_blank">get_term</a>.</p>
<pre class="brush: php; title: ; notranslate">
function get_tag_name( $tag_id ) {

     $tag_id = (int) $tag_id;
     $tag = get_term( $tag_id, 'post_tag'; );

     if ( ! $tag || is_wp_error( $tag ) )

          return '';

     return $tag-&gt;name;

}
</pre>
<p>I am writing <a href="http://www.automatededitor.com">Automated Editor</a>, a wordpress plugin which will give you a bunch of pro automation possibilities, in case you were wondering.</p>
<div class="shr-publisher-679"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.woodylabs.com/2011/07/get_tag_name-function-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hackers wrecking your shared host account? Check your Website Portfolio Integrity</title>
		<link>http://blog.woodylabs.com/2011/05/hackers-wrecking-your-shared-host-account-check-your-website-portfolio-integrity/</link>
		<comments>http://blog.woodylabs.com/2011/05/hackers-wrecking-your-shared-host-account-check-your-website-portfolio-integrity/#comments</comments>
		<pubDate>Mon, 23 May 2011 11:41:32 +0000</pubDate>
		<dc:creator>Woody</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Search Engine Optimisation]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Technology]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.woodylabs.com/?p=616</guid>
		<description><![CDATA[10 days of perpetual issues with hackers. 10 DAYS. 100+ sites bombed randomly between every 5 minutes and 5 hours and that&#8217;s only after proper detection, who knows how far it had gone before. But from the relentless irritation some positives developed, if you are in the (precarious) position of hosting LOTS of websites on [...]<hr /><a href="http://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
			<content:encoded><![CDATA[<p>10 days of perpetual issues with hackers. 10 DAYS. 100+ sites bombed randomly between every 5 minutes and 5 hours and that&#8217;s only after proper detection, who knows how far it had gone before. But from the relentless irritation some positives developed, if you are in the (precarious) position of hosting LOTS of websites on a shared hosting account or you run a shared hosting service then read on, the value of maintaining limit pushing amounts of sites on a single account really should be considered &#8211; if the loss of earnings for all the hacker downtime doesn&#8217;t wipe out the savings then the cost of repair, security hole identification and eradication probably will, not to mention the loss of face to the search engines.</p>
<div style="border: 1px solid #09C; background-color: #b5d1ea; padding: 4px; margin: 10px; text-align:center">The following is a half vent, half information dump spawned from the irritation of being hacked, again. I have written a piece of monitoring/reconciliation software (Windows based works with your ftp account) to deal with detection/fixing. If you’re in the same boat and all you want is the alpha release, skip to the bottom and <a href="http://blog.woodylabs.com/2011/05/hackers-wrecking-your-shared-host-account-check-your-website-portfolio-integrity/#respond">drop me a comment</a>.</div>
<div align="center"><img src="http://blog.woodylabs.com/wp-content/uploads/2011/05/is-wordpress-a-website-security-hole.jpg" alt="" title="is-wordpress-a-website-security-hole" width="600" height="338" class="aligncenter size-full wp-image-621" /></div>
<h3>Website hacker entrance vectors (have any security holes?)</h3>
<p><strong>Common CMS, E-Commerce systems and forums</strong> (out of date or zero day, they all have or have had vulnerabilities) &#8211; WordPress, Drupal, OSCommerce, Gallery, PHPBB, VBulletin etc. etc. Particularly relevant here are the open source systems, but they are all susceptible &#8211; how many of these do you have installed where? For me these could of been answered with &#8220;a lot&#8221; and &#8220;some places&#8221;, clarity has now been restored but more on that later.</p>
<p><strong>CMS Plugins (^^)</strong> – Often overlooked (especially by me), installed plugins can in themselves be entry vectors, often CMS’s push their communities to develop additional functionality for their system, which is a good thing, however if the system itself doesn’t deal particularly well with the security of folder structures or indeed how plugins are accessed they can offer ways in. Be careful with plugins which deal with file management and code execution (e.g. file attachers/uploaders etc.) Try to use late version highly rated plugins from reputable sources, with things like WordPress, plugins are low risk though as it has an excellent security model.</p>
<p><strong>Bespoke server-side code and CMS&#8217;s</strong> &#8211; in my experience these is often LESS likely to get hacked, firstly &#8220;hackers&#8221; in this case are more likely to be script kiddies sitting in web cafes in some of the poorer world nations, they often use known exploits on common systems rather than trawl the web, searching for one off programmer mistakes. If you are behind the bespoke stuff leave out as many foot prints as possible and triple check everything. For bespoke stuff the most likely point of entry is simple SQL Injection, use SQL parameters.</p>
<p><strong>FTP/WebDav</strong> &#8211; This really comes down to passwords as next indicated.</p>
<p><strong>Passwords</strong> – Acquired by trojans or traffic sniffers, it becomes irrelevant what security you have in place across the whole setup if you don’t look after them properly. Avoid connecting to anything unencrypted (or at all if possible) on any network you don’t 100% trust, WIFI and wired, even if it’s a friends they could have a network sniffing Trojan on an idle machine. Install good anti-virus and protection software. Use Avast (free for private use) and Spybot Search and Destroy (these two are plenty.) Be careful with providing access to other users, whether it FTP, CMS, SSH, whatever – you may trust them but do you trust their computers?</p>
<p><span id="more-616"></span></p>
<h3>Detection and Fixing – Realising you’ve been hit and fixing it</h3>
<p>So after they gain entry, what would a hacker really do? Often with web hacking the motivation is kudos, money or sabotage – all are achieved through defacing, deleting or modifying web pages/logic and/or altering/downloading databases. A nightmare from the point of view of shared hosting users.</p>
<p>Depending on how they gain entry a hacker (or their automated executing code) may search through all of the files they can access, through ftp or server-side scripts, built to identify possible files to manipulate. They may download copies of things (e.g. databases!) but will likely set about cycling through all available webpage files and doing things such as:</p>
<ul>
<li>Inserting code within the page (iframes to bad websites, links to their websites – designed to improve their search engine rankings, redirect code which just shuttles people on to their sites)</li>
<li>Replacing the file with a predesigned page (kudos fronts ‘this website was hacked by&#8230;’)</li>
<li>Replacing common server-side functions and variables (e.g. replacing all the send values on email scripts to forward emails to an account other than the owners)</li>
</ul>
<p>If you have a single site, or 10 or something the chances are you personally check them all every now and again, getting a little facetime at least once a week say. In this case your opportunity for hosting a hacked site is 7 days, not awful, not great – Google and browsers will start blocking your site if the hacker has inserted any code going to malware or similar, and otherwise may start to drop you down the rankings if your site now displays a ‘hacked by..’ page instead of your wholesome site.</p>
<p>In the case of a lot more sites on the host this can mean no detection for a longer time, if no system is in place, often first recognised through a drop in statistics/earnings (more likely earnings as in the case of iframed malware a change in the number of hits can be not hugely obvious.)</p>
<p>To add confusion to the mix it’s not unknown for hackers to mask their changes to you, it’s very easy with .htaccess files and php/asp headers (for example) to show content relative to its viewer. E.g. the hacker could shuttle people coming in from Google to a hacked page but people that access the site directly (typing it in) get shown the normal site. Furthermore they may not hit every site you have, perhaps a handful of random choices, some folders not others, a smokescreen like attack which could change each time.</p>
<p>Chances are once you get all your pages fixed and get around to looking at where the security hole is that when you recheck your sites they would have been hit again. This tells you two things, 1. The hacker is relentless (or more likely has a relentless automated program, exploiting 24/7) and 2. You have not plugged the security hole. Or if you are really unlucky you are being hacker tag teamed.</p>
<p>So anyway, detection. How do you go about knowing the integrity of your web portfolio? What if it spans 10 shared hosting accounts or 4 servers? Well likely if you own your own server you have spent the time/cash in locking everything down, what I suggest here would be useful to you guys but you may already have a better solution in place.</p>
<p>Currently there are a bunch of services which will do this for you, of which I have tried zero. “Monitoring” services are available worldwide ranging in prices drastically, for me though even the high end services didn’t offer a full set of features and were mostly hugely overpriced but for the top 50% of the portfolio, not effective for me.</p>
<p>The good things about using external monitoring services are obvious but none seemed to be able to offer realistic change monitoring (e.g. WordPress blogs may change content between &lt;div id=”whatever”&gt; and &lt;/div&gt; every hour but the rest of the page should stay almost the same.) It is important they see the addition of malicious code to good pages and not throw constant false alarms. For ‘this website was hacked by..’ pages though they probably do a good job (as well as malware detection.) Uptime monitoring is also common as part of the packages, useful without doubt.</p>
<p>I suggest another way though of monitoring an established portfolio, that is the way I have resolved my recent hacker attacks, a realistic option for shared host/anywhere-in-the-world-with-a-laptop client based use. Ultimately an extension of a few older applications I wrote to manage a growing portfolio, weathered by several hacks across accounts within the past 6 months – Hard checks of every important file.</p>
<div align="center"><img src="http://blog.woodylabs.com/wp-content/uploads/2011/05/website-integrity.jpg" alt="" title="website-integrity" width="600" height="450" class="aligncenter size-full wp-image-619" /></div>
<div align="center" style="font-size:16px;font-weight:700;margin:30px">“The best way to check the integrity of your shared hosting account is to physically check the integrity of your shared hosting account.”</div>
<p>At first I wrote my system to simply allow me to take stock of the sites and CMS’s I have in place, to work out possible security holes from behind the scenes – but it turns out it works surprisingly well in identifying breaches. By checking your actual live file structure (.htaccess, index.php, default.aspx, index.html etc.) against a known correct file structure snapshot, you take the whole http part of the checking out of the loop, effectively making it a higher level integrity check than external services can ever offer.</p>
<p>By making Checksums of every critical file (often hackers just hit index.php, index.html, default.aspx etc.) within a given ftp/file structure and then automatically rechecking at scheduled points it becomes easy to minimise your window for financial fallout from hackers. This may seem like a time/bandwidth/processor consuming task but in actuality 100 websites with WordPress installed could be checked in a few Mb of download – in terms of modern data use that’s a few browses of a facebook photo gallery. What’s more it can run in the background, only prompting you on changes to files, as frequently as you want.</p>
<p>The side benefit of producing complete hosting account checksum snapshots is you are also able to accurately backup a working copy of your hosting account. Built into the checking process this means that you can then correct hackers’ malicious changes with a click of a button.</p>
<p>This of course does not take into account more hard-file based websites, database changes or regularly altered sites. I recommend automated screenshots to cover these or the combination of external monitoring services and integrity checking.</p>
<p>I have written an alpha release of this system (named Website Integrity Checker for now) and will gladly distribute/discuss it if you drop me a comment below. A beta copy might make its way out sometime.</p>
<div class="shr-publisher-616"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.woodylabs.com/2011/05/hackers-wrecking-your-shared-host-account-check-your-website-portfolio-integrity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Forget Inertia &#8211; A new era.</title>
		<link>http://blog.woodylabs.com/2010/12/forget-inertia-a-new-era/</link>
		<comments>http://blog.woodylabs.com/2010/12/forget-inertia-a-new-era/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 14:02:40 +0000</pubDate>
		<dc:creator>Woody</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Ideas]]></category>
		<category><![CDATA[Looking Back]]></category>
		<category><![CDATA[Looking Forward]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Technology]]></category>
		<category><![CDATA[WoodyLabs]]></category>

		<guid isPermaLink="false">http://blog.woodylabs.com/?p=420</guid>
		<description><![CDATA[There is by far enough written words about the freedom and positives of leaving ones established job, for better or for worse I think it is the right way forward for me, now. I have had a long list of things to post about, technology thoughts and projects completed; now thankfully I have the control [...]<hr /><a href="http://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
			<content:encoded><![CDATA[<p>There is by far enough written words about the freedom and positives of leaving ones established job, for better or for worse I think it is the right way forward for me, now. I have had a long list of things to post about, technology thoughts and projects completed; now thankfully I have the control of my time enough that I can post about them. </p>
<div align="center"><img alt="" src="http://blog.woodylabs.com/wp-content/uploads/2010/04/pp-buckets.jpg" title="Thailand Phi Phi - Buckets with good friends" class="aligncenter" /><img src="http://blog.woodylabs.com/wp-content/uploads/2010/12/bandipur-nepal-office-in-the-clouds.jpg" alt="" title="bandipur-nepal-office-in-the-clouds" width="360" height="270" class="aligncenter size-full wp-image-422" /></div>
<p>2010 Has been a good year for travel, from the sandy cocktail beach&#8217;s and fast paced mountain biking through lychee groves of Thailand across to the lake of Pokhara and the remote Bandipur in Nepal; sidestepping riots in both countries and a ridiculous ash cloud, through grace or luck. From central park and the Guggenheim to the Robert Moses beach and Long Island, New York was epic; and now in 48 hours or so on to Agadir, Marakesh, Casablanca and Fez, Morocco, its been a good year for travel.</p>
<div align="center"><img src="http://blog.woodylabs.com/wp-content/uploads/2010/12/bandipur-nepal.jpg" alt="" title="bandipur-nepal" width="360" height="270" class="aligncenter size-full wp-image-421" /><img src="http://blog.woodylabs.com/wp-content/uploads/2010/12/yankee-stadium-ny-yankees.jpg" alt="" title="yankee-stadium-ny-yankees" width="360" height="270" class="aligncenter size-full wp-image-423" /></div>
<p><span id="more-420"></span></p>
<p>While at home I have also picked up climbing, something I wish I had done more of while in Thailand. The Castle near Finsbury park is a fantastic location, especially when visited with a few good friends. I need to do more of that. I also look forward to a time when I have a piano in a house of mine so I can truely take that forward and carry on learning <img src='http://blog.woodylabs.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<div align="center"><img src="http://blog.woodylabs.com/wp-content/uploads/2011/07/previewWallpapersAndSelect.jpg" alt="" title="reddit wallpaper downloader" /></div>
<p>Through work and exploration this year I have absorbed C#, something I am quite happy with as it bridges the gap in my skillset between open-source and MSFT, between web programming and local app development. In my opinion it is also a good year for Microsoft, despite their mediocre year on NASDAQ; they are releasing much more rounded products and seem to be beginning to see the benefits of what I see as a change in strategy. Either way C# has lead me to refine my rapid application development and brought the brute modern processing power directly into use, I would thoroughly suggest it to supplement your language base if you are leant heavily towards php/LAMP (while I would only use it over php for few of my future web projects.) RAD in C# let me experiment with an <a href="http://blog.woodylabs.com/2010/08/arbitrage-betting-programmatically-finding-arbitrage-bets/" target="_blank">arbitrage betting program</a> and write a quick <a href="http://blog.woodylabs.com/reddit-wallpaper-grabber/" target="_blank">Reddit wallpaper grabber</a> (yes I know it needs fixing); as well as a bunch of other stuff like a Filezilla bulk user import, an SQL->php hardcoded rewrite of a huge site that meant 300% quicker loads, a remote image processing app, tons of little <a href="http://www.sharepointcode.co.uk" target="_blank">sharepoint integration</a> bits, a full sharepoint 2010 site migration routine and also a true 3rd gen website asset management tool, which I will perhaps post more about. </p>
<p>Near U has had a fairly good year and I have added a few more sites to the portfolio (I still need to diversify though) &#8211; mostly bolstering and fulfilling old ideas for domains that have been stagnating, I hope to shift this up a gear to bring it all back into line now I have the freedom to do so; the cold financial climate does seem to have slowed people buying cars, specifically though on-line auctions this past quarter but I have high hopes for the new year. Part of managing this portfolio of now more than 200 sites has been writing up a proper asset management tool geared towards websites (mostly affiliate) as assets of value, csharp has allowed me to write this multi threaded, flexible, detail rich program in a ridiculous short stint of evening programming, perhaps it may even make its way as a sell-able tool, this however is to be seen.</p>
<p>In the last few months I have also been running with Sharepoint 2010 (another example of microsoft getting themselves together) &#8211; which although on its preface is limited or &#8220;nothing new&#8221; in fact has quite sufficient enough depth to hold weight as an intranet solution. I doubt you will find better workflow, versioning, integration and scope in a web-based solution (even if it is £120k for enterprise for 1000+ users) &#8211; developers should not be scared of it. To supplement a sharepoint installation I would also advise the familiarisation of developers with WCF, microsofts best answer to web services moving forward.</p>
<div align="center"><img src="http://blog.woodylabs.com/wp-content/uploads/2010/12/harpers-mag.png" alt="" title="harpers-mag" width="305" height="100" class="aligncenter size-full wp-image-425" /></div>
<p>There has been a few good books recently which have also left a resounding impression, <a href="http://www.amazon.co.uk/gp/product/0099727404?ie=UTF8&#038;tag=woodylabs-21&#038;linkCode=as2&#038;camp=1634&#038;creative=6738&#038;creativeASIN=0099727404" title="The road less travelled is epic" rel="nofollow" target="_blank">The Road Less Travelled</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=woodylabs-21&#038;l=as2&#038;o=2&#038;a=0099727404" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> (by M. Scott Peck) left me thinking more about the sub concious and revealed new angles on understanding people will that I will forever remember. In Nepal I left my copy of <a href="http://www.amazon.co.uk/gp/product/0340750154?ie=UTF8&#038;tag=woodylabs-21&#038;linkCode=as2&#038;camp=1634&#038;creative=6738&#038;creativeASIN=0340750154" title="Its important to be happy" rel="nofollow" target="_blank">The Art of Happiness</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=woodylabs-21&#038;l=as2&#038;o=2&#038;a=0340750154" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> on a bus, but luckily found another copy in a bookshop in Pokhara; it is a fantastic book that taught me more than anything to see things more clearly and seek contentment truthfully. <a href="http://www.amazon.co.uk/gp/product/0451205367?ie=UTF8&#038;tag=woodylabs-21&#038;linkCode=as2&#038;camp=1634&#038;creative=6738&#038;creativeASIN=0451205367" title="The richest man in babylon"  rel="nofollow" target="_blank">The Richest Man in Babylon</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=woodylabs-21&#038;l=as2&#038;o=2&#038;a=0451205367" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> was suggested to me by a friend who is investing in silver, which <a href="http://www.ebullionguide.com/price-chart-silver-last-10-years.aspx" rel="nofollow" target="_blank">seems sensible</a> &#8211; what a fantastic little book! some basic rules on managing money are told through a Babylonian narrative which is fun and quick to read. If reading like this was more present in our schools we would all be wealthier, at least everyone except producers of instant gratification goods. I also subscribed to <a href="http://www.harpers.org" target="_blank">Harpers</a> this year, after finding it in Bangkok airport with hours to kill. It has significantly inspired me to proceed with writing my novel, it is always a great read and the harpers index is good:</p>
<blockquote><p>Percentage of U.S. car owners who keep maps in their glove compartments: 50, Sunglasses: 23, Gloves: 0</p>
<p>Estimated value of Chinese household income that goes unreported: $1,400,000,000,000; Portion of China&#8217;s GDP this represents: 1/3</p>
<p>Number of poisonous dead mice the USDA airdropped into Guam this year to eradicate an invasive snake species: 316</p>
<p>Number of times between January and June that google turned over user information to government investigators: 4,287</p></blockquote>
<p>Might have already posted about this before but <a href="http://www.evernote.com" target="_blank" rel="nofollow">Evernote</a> has served me well all year, allowing me to dump my ideas, wacky thoughts or notes into a single searchable repository, wherever I am. I also started backing up to the cloud (cant wait to write new software that takes advantage of the amazon storage cloud) via JungleDisk, which seems to be pretty spot on for me, and backing up iphone contacts to Google contacts was also a helpful find. If you guys are not yet using Chromium (NOT Chrome), that&#8217;s another no-brainer. <a href="http://build.chromium.org/f/chromium/snapshots/chromium-rel-xp/" rel="nofollow" target="_blank">Install it</a>, you&#8217;ll see what I mean (sorry Mozilla, you were trumped on speed.) Spotify has continued to be epic, even if the lack of nichey remix&#8217;s and the removal of some epic songs is irritating. Finally I have to say that Microsoft dropping their Express versions of visual studio 2010 and SQL Server is both useful, and strategically a good idea. Their IDE is pretty ridiculously good, and providing free (although slightly limited &#8211; SQL max db of 5gb for example) versions will bring in the hordes, and if they develop anything decent, chances are they will shell out for licences legitimately. </p>
<div align="center"><img src="http://blog.woodylabs.com/wp-content/uploads/2010/12/emancipator-goodmusic.jpg" alt="" title="emancipator-goodmusic" width="360" height="245" class="aligncenter size-full wp-image-424" /><br />Best music find of recent months: <a href="http://open.spotify.com/album/1KHKPYKo4h8btHa8u3wjEB" target="_blank">Emancipator</a></div>
<p></p>
<p>Looking forwards I now cant wait to finish my novel, write a bunch of new useful softwares and in 2011 start another business, perhaps a software house selling software as a service? I have a pretty devilishly good idea that will leverage the amazon clouds scalability. Perhaps. Either way I fly to Morocco in 48 hours and I haven&#8217;t even thought about it yet. Better go.</p>
<div align="center"><img src="http://blog.woodylabs.com/wp-content/uploads/2010/12/eh-novel.png" alt="" title="eh-novel" width="341" height="176" class="aligncenter size-full wp-image-426" /><img src="http://blog.woodylabs.com/wp-content/uploads/2010/12/eh-bt.png" alt="" title="eh-bt" width="297" height="382" class="aligncenter size-full wp-image-427" /></div>
<div class="shr-publisher-420"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.woodylabs.com/2010/12/forget-inertia-a-new-era/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Graph Api &#8211; Is user a fan of page id &#8211; Using FQL and opengraph to mimic Pages.IsFan</title>
		<link>http://blog.woodylabs.com/2010/09/facebook-graph-api-is-user-a-fan-of-page-id-using-fql-and-opengraph-to-mimic-pages-isfan/</link>
		<comments>http://blog.woodylabs.com/2010/09/facebook-graph-api-is-user-a-fan-of-page-id-using-fql-and-opengraph-to-mimic-pages-isfan/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 14:14:02 +0000</pubDate>
		<dc:creator>Woody</dc:creator>
				<category><![CDATA[Facebook Graph API]]></category>
		<category><![CDATA[Facebook Pages]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fan gating]]></category>
		<category><![CDATA[fan page]]></category>
		<category><![CDATA[FQL]]></category>

		<guid isPermaLink="false">http://blog.woodylabs.com/?p=403</guid>
		<description><![CDATA[Working with integration of Facebook Connect for authentication is mostly easy at the moment, once you have got your head around FBML etc. However as they are in between switching from the old Restful API and the new graph API there remains the odd little thing that has only a splatter of useful documentation online. [...]<hr /><a href="http://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
			<content:encoded><![CDATA[<p>Working with integration of Facebook Connect for authentication is mostly easy at the moment, once you have got your head around FBML etc. However as they are in between switching from the old Restful API and the new graph API there remains the odd little thing that has only a splatter of useful documentation online. The first one of these I have come across is trying to find out if a user (who is logged in to  your site via facebook connect) is a fan of page X.</p>
<p>There is infinite uses for this &#8211; with facebook more and more integrating &#8220;likes&#8221; with their search and other stuff you will need this functionality to drive traffic from facebook. Anyway this used to be the easy case of using https://api.facebook.com/method/pages.isFan?access_token=&#8230; to get a 1 or 0 depending on whether or not the user had &#8220;fanned&#8221; the page/website/whatever.</p>
<p>But then came along the big bad Graph API, which to get this IsFan functionality is a bitch. Getting the &#8220;likes&#8221; directly works for the page owner (which confuses everything) but not for third parties, showing just the popular/main category &#8220;likes&#8221; against them (and you need extended permissions.)<br />
<span id="more-403"></span><br />
Long and short of it there&#8217;s about 5 ways to skin this cat, all of which suck except this one, in my brief, frustrated look into it. In any case this uses FQL and the Graph API call to produce a Boolean indicating whether or not the user has fanned something with id $pageID. It works, in all scenario&#8217;s for me so far.</p>
<blockquote><p>$likeID = $facebook-&gt;api(<br />
array( &#8216;method&#8217; =&gt; &#8216;fql.query&#8217;, &#8216;query&#8217; =&gt;<br />
&#8216;SELECT target_id FROM connection WHERE source_id = $userID AND target_id = $pageID&#8217; )<br />
);</p>
<div>if ( empty($likeID) ) {</div>
<div style="margin-left:20px;">// user has NOT Liked the page/whatever</div>
<div>} else {</div>
<div style="margin-left:20px;">// user HAS Liked the page/whatever</div>
<div>}</div>
</blockquote>
<p>If only facebook would update their documentation to show how easy it is to fql query from the API!</p>
<div class="shr-publisher-403"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.woodylabs.com/2010/09/facebook-graph-api-is-user-a-fan-of-page-id-using-fql-and-opengraph-to-mimic-pages-isfan/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Multiple WordPress blogs from 1 instance / 1 wordpress folder to maintain</title>
		<link>http://blog.woodylabs.com/2010/01/multiple-wordpress-blogs-from-1-instance-1-wordpress-folder-to-maintain/</link>
		<comments>http://blog.woodylabs.com/2010/01/multiple-wordpress-blogs-from-1-instance-1-wordpress-folder-to-maintain/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 16:34:27 +0000</pubDate>
		<dc:creator>Woody</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Transactional SQL]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Technology]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.woodylabs.com/?p=142</guid>
		<description><![CDATA[WordPress is a victim of its own success, but its no victim. It is huge. Millions upon millions of people use wordpress to power their blogs (like this one for example) to make money and to have their voice present on the internet. It has become a first stop for a huge host of people [...]<hr /><a href="http://blog.woodylabs.com">Visit Woody Haydays Blog</a><hr />]]></description>
			<content:encoded><![CDATA[<p>WordPress is a victim of its own success, but its no victim. It is huge. Millions upon millions of people use wordpress to power their blogs (like this one for example) to make money and to have their voice present on the internet. It has become a first stop for a huge host of people making their way online and is often one that leaves such a positive impression that it never leaves that same user. Its free, its slick, its efficient, its easy&#8230;literally I have nothing but good things to say about wordpress and the people that support it. I could spend hours applauding the democratisation of tools that is wordpress and discuss how its helped the internet blossom and why its so key to understanding the web today but that&#8217;s not what this post is about. If you haven&#8217;t already got a wordpress blog then I would suggest you get one, either for free at wordpress.com or from wordpress.org (the latter if you have your own hosting) &#8211; and once you have one you might soon realise the huge benefit of having 2, 3, 4 or more wordpress blogs. These are real benefits.</p>
<p>The question then comes after  you have 30 wordpress blogs on the go, various niche market&#8217;s blogged too or personal sites about cats or what have you, what then? Updates then. WordPress do update fairly regularly, they aren&#8217;t the slow moving behemoths some other companies are because they are open source, and that&#8217;s a good thing. Anyway maintaining 30 copies of wordpress is actually a lot easier than it sounds, an update is usually nothing more than 10 minutes uploading the new wordpress files over the old ones via FTP. But say you had a little project where you wanted to create a few more wordpress blogs. For the sake of this post lets say you wanted 90 blogs. 90 WordPress blogs installed on an average web host (I suggest 1and1) is not a big deal. It can be as big a deal as you make of it but in your pursuits and interests online its potentially likely to crop up.</p>
<p>You can run 90 wordpress blogs (or 1000 etc.) from 1 instance of wordpress. That is 1 wordpress folder on your host serving to 90 blogs at blogsite1.co.uk, blogsite2.com etc. thats nothing new &#8211; I am sure the quicker off the mark or longer in the tooth of wordpress users have been doing it for a while, but somehow I missed this up until I got past the 30 blog mark and so I thought its about time I looked at the option of hundreds of wordpress-blogs running from 1 folder, a project has come up. The reason this works by the way is the wonderful way (take not web developers) that wordpress splits its config files and its database. The only file in the wordpress files you upload to your blog that contains any site specific data is the config file, which pulls everything from the database.</p>
<p>On the preface there are both good and bad things about doing this with word press, here are the pro&#8217;s and con&#8217;s as I see them pre-project.</p>
<p><strong>Pros</strong></p>
<ul>
<li>Single central wordpress folder  &#8211; 1 wordpress folder to update periodically</li>
<li>File size &#8211; rather than using up 4mb per wordpress install, this method uses 4mb per x number of wordpress installs, although space isn&#8217;t an issue really in current web hosting</li>
<li>Plugins and themes only need to be copied once &#8211; they can effectively be shared</li>
<li>Easier to backup &#8211; backing up files of wordpress blogs is pretty pointless apart from wp-content (uploaded images, themes, etc) &#8211; putting all your blogs in one basket means backing up the whole lot is a breeze, 1 folder not 90!</li>
<li>WordPress database is seperate &#8211; you could potentially run all the blogs from 1 database too &#8211; (capacity dependant) &#8211; as wordpress allows table prefix&#8217;s</li>
<li>Adding a blog can be automated <img src='http://blog.woodylabs.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  &#8211; replicating the first wp database from an install can mean tons less setup work</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li>Permalink structure may have to be the same? *not 100% on this one and havent tested but there may be issues with permalink setups across multiple blogs as htaccess is shared*</li>
<li>Other .htaccess differences &#8211; because you will effectively only have 1 .htaccess file for all domains pointing to this folder, this puts all that custom .htaccess code out of the window</li>
<li>Flip side of themes being easy to install is that editing one theme will lead to all blogs using that theme to notice the change, fine if your blogs are stable in design but multiple versions of the same theme will be required if you want to tweak these on a blog specific level, which could make for a messy confusing setup if not through through</li>
<li>If you are running a network of blogs and want to stay under the radar or just want the sites to be as different as possible &#8211; by nature of single resource they will leave footprints unless you are aware and make sure you do things like rename folders for themes non-sequentially etc ( or maybe don&#8217;t be paranoid :p )</li>
<li>Centralising the files for all domains/sites/blogs does mean this folder on this box does then become a single point of failure, loose/break this and the whole of your blog network/project is down. Probably not such an issue with stable hosts these days</li>
<li>As previous point if you do update, change a file or accidentally delete anything it does effect every site &#8211; its a risk but not a big one just be careful!</li>
</ul>
<p><strong>Limitations</strong></p>
<ul>
<li>Unsure about .htaccess but presume custom rewriting becomes a pain as all sites share a file</li>
<li>There will be a limit as to how many blogs you can run off a single install. It&#8217;s probably thousands though &#8211; if you had 30,000 sites for example &#8211; the file which points the install to the right database tables would become bloated</li>
</ul>
<p><strong>How to run tens, hundreds or thousands of wordpress blogs from 1 instance &#8211; install wordpress once for hundreds of blogs &#8211; without MU.</strong></p>
<ol>
<li>Install wordpress into a folder on you hosting (download latest from wordpress.org and then upload via FTP/copy across network)</li>
<li>Get your database details together, you will need Database Name, Database Username, Database Password and the Database host for each of the databases you are going to host wordpress tables in</li>
<li>Install a single blog using the normal method &#8211; point a domain at the folder, go to that domain and follow the wordpress wizard, entering your database connection details and this blogs title.
<ol>
<li>Go through this newly installed blog and commit any changes that you will want duplicated throughout the new installs &#8211; delete the &#8220;hello world&#8221; post/default wp links for example.</li>
<li>Imagine this like creating a ghost image for a network of pc&#8217;s &#8211; you want to make a bare bones default wordpress setup so you can replicate this onwards without having to redo it.</li>
</ol>
</li>
<li>Happy with  your ghost blog setup? go to your phpmyadmin (assuming you have it) and export all the tables for this blog into SQL.</li>
<li>Open that SQL into your favourite text editor, in this case I am using Dreamweaver because I like its find+replace.</li>
<li>You will need to do several find + replaces here, but by doing this you can literally clone a wordpress installation &#8211; (works as at 2.9.1 anyway) &#8211; this is great for mass distribution (This is quicker than installing and can be automated)</li>
<li>For example if your site was &#8220;harrysblog1.co.uk&#8221; with a title of  &#8220;Harrys Blog 1&#8243; then do a find and replace for &#8220;harrysblog1.co.uk&#8221;, switching out the new domain to be added, same with title&#8217;s, users, post&#8217;s etc. This way you could clone a wordpress site and switch out words&#8230;you can change the table prefix this way too.</li>
<li>Run this newly modified SQL on whatever mysql database you want to run the blog from (could be same one if you mass replaced the table prefix&#8217;s)</li>
<li>Alter your wp-config.php file very simply:
<ol>
<li>Open it up and put a bit of logic which basically says &#8220;what domain am I loading from, ah this one &#8211; use this DB and this table prefix&#8221; &#8211; This logic can be as simple or as complex as you want it to be &#8211; I kept mine short and sweet with literally:</li>
</ol>
</li>
</ol>
<div style="border:1px solid #09C; background-color:#b5d1ea;padding:4px;margin:10px;">$thisDom = $_SERVER['HTTP_HOST'];</p>
<p>if ($thisDom == &#8220;www.specificDomainWhatever.co.uk&#8221; || $thisDom == &#8220;specificDomainWhatever.co.uk&#8221;){ $useDB = 1; $table_prefix = &#8220;specificDomainWhatever_&#8221;; }</p>
<p>if ($useDB == 1){</p>
<p>define(&#8216;DB_NAME&#8217;, &#8216;xxx&#8217;);</p>
<p>/** MySQL database username */<br />
define(&#8216;DB_USER&#8217;, &#8216;xxx&#8217;);</p>
<p>/** MySQL database password */<br />
define(&#8216;DB_PASSWORD&#8217;, &#8216;xxx&#8217;);</p>
<p>/** MySQL hostname */<br />
define(&#8216;DB_HOST&#8217;, &#8216;xxx&#8217;);</p>
<p>/** Database Charset to use in creating database tables. */<br />
define(&#8216;DB_CHARSET&#8217;, &#8216;utf8&#8242;);</p>
<p>/** The Database Collate type. Don&#8217;t change this if in doubt. */<br />
define(&#8216;DB_COLLATE&#8217;, &#8221;);</p>
<p>}</p></div>
<p>*note this is just how I did it, there are other ways &#8211; the code works but was just to test the theory &#8211; when upscaled to a network of xxx or x,xxx sites this is automated quite easily</p>
<p>*note2 I am having to cut this post short but if anyone has any questions or wants to know more/help on replicating wordpress or multi blog &#8211; 1 wordpress instance installs let me know in the comments</p>
<p><strong>References</strong></p>
<p>Striderweb &#8211; <a rel="nofollow" href="http://striderweb.com/nerdaphernalia/2006/10/hello-again-world/">this post</a> pretty much explains the theory, a bit like this post &#8211; but I actually happened across it after writing the post &#8211; well worth reading if your going to do this &#8211; Stephen Rider has made a great plugin that will do everything you want it to do as above, I winged it and just modified the wp-config which simply worked in my case so personally I didn&#8217;t use it, but no doubt its probably worth a try if  you want a more deep solution.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px;">Woody Hayday<br />
9a Holywell Hill</p>
<p>Hi Jo</p>
<p>I have just found out that I will be away to thailand in the beginning of march and as my 6 months of tenancy is up in feb (08th) I was wondering how it worked with regards to rolling contracts?</p>
<p>I would like to move out just before</p>
</div>
<div class="shr-publisher-142"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.woodylabs.com/2010/01/multiple-wordpress-blogs-from-1-instance-1-wordpress-folder-to-maintain/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

