<?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>Jon Moore</title>
	<atom:link href="http://www.jonmoore.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jonmoore.co.uk</link>
	<description>Tips &#039;n&#039; Snips</description>
	<lastBuildDate>Fri, 18 May 2012 10:13:54 +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>Backup Drupal 6 Sites with the Backup &amp; Migrate Module</title>
		<link>http://www.jonmoore.co.uk/drupal/backup-drupal-6-sites-with-the-backup-migrate-module</link>
		<comments>http://www.jonmoore.co.uk/drupal/backup-drupal-6-sites-with-the-backup-migrate-module#comments</comments>
		<pubDate>Fri, 18 May 2012 10:10:21 +0000</pubDate>
		<dc:creator>Jon Moore</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Amp]]></category>
		<category><![CDATA[Automatic Backup]]></category>
		<category><![CDATA[Backup File]]></category>
		<category><![CDATA[Click Create]]></category>
		<category><![CDATA[Content Backup]]></category>
		<category><![CDATA[Content Management]]></category>
		<category><![CDATA[Daily Basis]]></category>
		<category><![CDATA[Default Settings]]></category>
		<category><![CDATA[Heart]]></category>
		<category><![CDATA[Internet Control Panel]]></category>
		<category><![CDATA[Internet Site]]></category>
		<category><![CDATA[Org Project]]></category>
		<category><![CDATA[Project Backup]]></category>
		<category><![CDATA[Reseller Account]]></category>
		<category><![CDATA[Scheduled Tasks]]></category>
		<category><![CDATA[Server Settings]]></category>
		<category><![CDATA[Upload]]></category>

		<guid isPermaLink="false">http://www.jonmoore.co.uk/?p=1013</guid>
		<description><![CDATA[In light of recent events, where I managed to delete a database that I shouldn’t have… I figured I should make sure that all of my Heart Internet hosted Drupal...]]></description>
			<content:encoded><![CDATA[<p>In light of recent events, where I managed to delete a database that I shouldn’t have… I figured I should make sure that all of my Heart Internet hosted Drupal accounts are backed up on a daily basis&#8230;</p>
<p>As this is very easily done on a Drupal site via the ‘Backup and Migrate’ module, I figured I’d set them all up and create some instructions at the same time&#8230;</p>
<ol>
<li>Make sure the ‘Backup &amp; Migrate’ module is there, if not, go here (<a href="http://drupal.org/project/backup_migrate" target="_blank">http://drupal.org/project/backup_migrate</a>), download, unzip, upload, turn on, etc…</li>
<li>The main settings page is ‘Content management &gt; Backup and migrate’, (or ‘admin/content/backup_migrate’).</li>
<li>You can take a manual back-up and save it to your computer simply by pressing the ‘Backup Now’ button, but we need to setup an automatic backup using the ‘Schedules’ tab, (or ‘admin/content/backup_migrate/schedule’).</li>
<li>You will need to click the ‘Create a new schedule’ link, and then fill in the form as follows:</li>
<ol>
<li>Enabled tickbox – leave ticked.</li>
<li>Schedule Name – Use something descriptive like ‘Daily save to live server’.</li>
<li>Settings Profile – Leave as ‘Default Settings’.</li>
<li>Backup every – Leave as ‘1 Days’.</li>
<li>Number of Backup file to keep – I’d suggest to set to 30.</li>
<li>Destination – Leave as ‘Scheduled Backups Directory’.</li>
<li>Press ‘Save schedule’.</li>
</ol>
<li>Once setup, you’ll be back at the main ‘Schedule’ screen and you’ll see the details of the schedule you’ve just set up. It also says that it’s ‘Never’ been run… At this point it’s worth checking that the ‘Scheduled task has been set-up. To check this, do the following:</li>
<ol>
<li>Set up ‘Scheduled Tasks’ from the Heart Internet Control panel for this domain.</li>
<li>So login to the main Heart Internet site (I&#8217;m using a &#8216;Reseller&#8217; account, but if you&#8217;re not, skip to step 4),</li>
<li>go to ‘RCC’, then ‘Manage Hosting Accounts’, select ‘Superuser’ for the domain/site we’re setting up…</li>
<li>A new tab will open and you need to click ‘Scheduled Tasks’, under ‘Web Tools’.</li>
<li>You should see a task set-up in the first box, if not, do the following:</li>
<ol>
<li>Under ‘Run this command’ paste: /usr/bin/php5 /home/sites/##########.co.uk/public_html/cron.php</li>
<li>Change ‘##########’ for the domain name (no www.) and leave the other settings as they are.</li>
<li>Press ‘Update’ to save.</li>
</ol>
<li>To test the ‘Automatic Backup’, press ‘Test Command’, and you should get a message back ending with ‘Content-Type: text/html; charset=utf-8’.</li>
</ol>
<li>Go back to the main ‘Backup and Migrate Schedule’ screen (admin/content/backup_migrate/schedule) and check the details of the schedule you’ve just set up.</li>
<li>‘Last run’ should now show thew date and time you pressed the ‘Test Command’ button.</li>
<li>If not, press ‘F5’ and check again, and if it’s still not working, re-trace your steps.</li>
</ol>
<p>Back-up and Migrate can also email back-ups to an email address. To do this, follow these instructions:</p>
<ol>
<li>From the main settings page (‘Content management &gt; Backup and migrate’, or ‘admin/content/backup_migrate’), select the ‘Destinations’ tab.</li>
<li>You’ll see a few default settings in the list, but you need to click the ‘Create a new destination’ link.</li>
<li>The next page offers several options, but we and ‘Email’ at the bottom, so click that link.</li>
<li>The next page just has 2 fields:</li>
<ol>
<li>Destination name – This is really just a title to be displayed in the list on the main ‘Destinations’ page, so title it something like ‘Email to me&#8217;.</li>
<li>Email Address – Add the same email you put in the field above.</li>
<li>Press the ‘Save destination’ button.</li>
</ol>
<li>Now that we have the ‘destination’ we need to set-up the ‘schedule’.</li>
<li>Do exactly the same as you did in the first set of instructions, but when you get to the ‘Create a new schedule’ form:</li>
<ol>
<li>For ‘Destination’, use the drop down and select your destination title, i.e. ‘Email to me ’</li>
<li>For ‘Backup every’, select how often you want the email to be sent… If already saving every day for a month, this can be set to ‘4 weeks’.</li>
<li>If set to ‘4 weeks’, set ‘Number of Backup files to keep’ to ‘13’, which covers us for a year.</li>
</ol>
<li>To test, just ‘run cron’ (admin/reports/status/run-cron).</li>
</ol>
<p>Hope this helps</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonmoore.co.uk/drupal/backup-drupal-6-sites-with-the-backup-migrate-module/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter RSS</title>
		<link>http://www.jonmoore.co.uk/php/twitter-rss</link>
		<comments>http://www.jonmoore.co.uk/php/twitter-rss#comments</comments>
		<pubDate>Mon, 23 Apr 2012 12:30:31 +0000</pubDate>
		<dc:creator>Jon Moore</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Alien]]></category>
		<category><![CDATA[Api]]></category>
		<category><![CDATA[Favorites]]></category>
		<category><![CDATA[Screen Name]]></category>
		<category><![CDATA[Seo]]></category>
		<category><![CDATA[Statuses]]></category>
		<category><![CDATA[Timeline]]></category>
		<category><![CDATA[Tips And Tricks]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Xxxxx]]></category>

		<guid isPermaLink="false">http://www.jonmoore.co.uk/uncategorized/twitter-rss</guid>
		<description><![CDATA[Ever tried to get an RSS feed from a Twitter account? They don&#8217;t make it easy&#8230; Fortunately, someone has figured it out, and shared it&#8230; So let&#8217;s share it some...]]></description>
			<content:encoded><![CDATA[<p>Ever tried to get an RSS feed from a Twitter account? They don&#8217;t make it easy&#8230; </p>
<p>Fortunately, someone has figured it out, and shared it&#8230; So let&#8217;s share it some more&#8230;</p>
<p><a href="http://seo-alien.com/tips-and-tricks/find-twitter-rss-feed/" target="_blank">seo-alien.com/tips-and-tricks/find-twitter-rss-feed</a></p>
<p>Use this code below and replace xxxxx with your Twitter username to use your Twitter RSS Feed:<br />
http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=xxxxx (Where xxxxx is the username.)<br />
That&#8217;s it, it&#8217;s really that simple.</p>
<p>How to Find Your Twitter Favorites RSS Feed</p>
<p>Your feed for only the favorites: http://twitter.com/favorites/xxxxx.rss (Where xxxxx is the username.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonmoore.co.uk/php/twitter-rss/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Site Hacked</title>
		<link>http://www.jonmoore.co.uk/wordpress/wordpress-site-hacked</link>
		<comments>http://www.jonmoore.co.uk/wordpress/wordpress-site-hacked#comments</comments>
		<pubDate>Wed, 11 Apr 2012 11:51:59 +0000</pubDate>
		<dc:creator>Jon Moore</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Barclays]]></category>
		<category><![CDATA[Br]]></category>
		<category><![CDATA[Content Folder]]></category>
		<category><![CDATA[Document Root]]></category>
		<category><![CDATA[Dolly]]></category>
		<category><![CDATA[Htaccess File]]></category>
		<category><![CDATA[Htm Extension]]></category>
		<category><![CDATA[Htm File]]></category>
		<category><![CDATA[Ip Addresses]]></category>
		<category><![CDATA[Jpg Extension]]></category>
		<category><![CDATA[Locals]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Php File]]></category>
		<category><![CDATA[Sarcasm]]></category>
		<category><![CDATA[Server Document]]></category>
		<category><![CDATA[Several Times]]></category>
		<category><![CDATA[Unlink]]></category>
		<category><![CDATA[Wp]]></category>
		<category><![CDATA[Zip File]]></category>

		<guid isPermaLink="false">http://www.jonmoore.co.uk/?p=988</guid>
		<description><![CDATA[After having the same site hacked several times, and not finding anyone with the same issue I&#8217;ve had, I decided to add it here in case it helps anyone else....]]></description>
			<content:encoded><![CDATA[<p>After having the same site hacked several times, and not finding anyone with the same issue I&#8217;ve had, I decided to add it here in case it helps anyone else.</p>
<p>I had the following files added:</p>
<pre>wp-content/barclays.zip
wp-content/barclays/barclays2.html
wp-content/barclays/finish.html
wp-content/barclays/locals.php
wp-content/barclays/barclays.html
wp-content/barclays/local.php</pre>
<p>I think they were done through &#8216;hello.php&#8217; which was also in the &#8216;wp-content&#8217; folder, (not to be confused with Hello Dolly although it has the same name).</p>
<p>The IP addresses of these lovelly people (sarcasm in case I need to point it out) was:<br />
<em>103.3.223.15</em><br />
<em>41.184.113.178</em></p>
<h2>The Solution:</h2>
<p>add the following to my .htaccess file:</p>
<pre>order allow,deny
deny from 41.184.113
deny from 103.3.223
allow from all</pre>
<p>Plus I added a script that deletes any .php, .htm, .html, .zip files from the &#8216;wp-content&#8217; folder, just at that level. Script is:</p>
<pre>
&lt;?php

#######################################################################################################################
#
#    Get File List

	// Vars
	$phpFiles 	= array();
	$filePath 	= 'wp-content/'; # Specify the path you want to look in.
	$outputMessage = '';

	// Get list and store in array
	$dir = opendir($_SERVER['DOCUMENT_ROOT'].$filePath); # Open the path
	while($file = readdir($dir)){
		if(eregi("\.php",$file)){ # Look at only files with a .jpg extension
			$phpFiles[] = $file;
		}
		if(eregi("\.htm",$file)){ # Look at only files with a .htm extension
			$phpFiles[] = $file;
		}
		if(eregi("\.html",$file)){ # Look at only files with a .htm extension
			$phpFiles[] = $file;
		}
		if(eregi("\.zip",$file)){ # Look at only files with a .htm extension
			$phpFiles[] = $file;
		}
	}

	// Output
	if(count($phpFiles) > 0){

		foreach($phpFiles as $val){
			$outputMessage .= $_SERVER['DOCUMENT_ROOT'].$filePath.$val.'&lt;br /&gt;'."\n";
			unlink($_SERVER['DOCUMENT_ROOT'].$filePath.$val);
		}

		$outputMessage .= 'Files wiped.'."\n";
	}
	else { $outputMessage .= 'No files in '.$filePath.'.'."\n"; }

	echo $outputMessage;

#
#######################################################################################################################

?&gt;
</pre>
<p>This script can be run manually or even better, trigger it every hour using a scheduled task.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonmoore.co.uk/wordpress/wordpress-site-hacked/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replace in MySQL</title>
		<link>http://www.jonmoore.co.uk/php/mysql/replace-in-mysql</link>
		<comments>http://www.jonmoore.co.uk/php/mysql/replace-in-mysql#comments</comments>
		<pubDate>Wed, 14 Mar 2012 16:36:25 +0000</pubDate>
		<dc:creator>Jon Moore</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Email Phone]]></category>
		<category><![CDATA[Sql Query]]></category>
		<category><![CDATA[Sql Replace]]></category>
		<category><![CDATA[Sql Select]]></category>
		<category><![CDATA[Sql Statement]]></category>

		<guid isPermaLink="false">http://www.jonmoore.co.uk/uncategorized/replace-in-mysql</guid>
		<description><![CDATA[A quick example of a SQL statement with REPLACE $query = 'SELECT id FROM `user` WHERE email ="'.$email.'" AND REPLACE(tel_1, " ","") = "'.$phone.'" LIMIT 1';]]></description>
			<content:encoded><![CDATA[<p>A quick example of a SQL statement with REPLACE</p>
<pre>$query = 'SELECT id FROM `user` WHERE email ="'.$email.'" AND REPLACE(tel_1, " ","") = "'.$phone.'" LIMIT 1';</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jonmoore.co.uk/php/mysql/replace-in-mysql/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal XML Sitemap Module Setup</title>
		<link>http://www.jonmoore.co.uk/drupal/drupal-xml-sitemap-module-setup</link>
		<comments>http://www.jonmoore.co.uk/drupal/drupal-xml-sitemap-module-setup#comments</comments>
		<pubDate>Wed, 08 Feb 2012 14:43:42 +0000</pubDate>
		<dc:creator>Jon Moore</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Content Type]]></category>
		<category><![CDATA[Content Types]]></category>
		<category><![CDATA[Cron]]></category>
		<category><![CDATA[Dropdown Menus]]></category>
		<category><![CDATA[Inclusion]]></category>
		<category><![CDATA[Lifetime]]></category>
		<category><![CDATA[Priority]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Settings Tab]]></category>
		<category><![CDATA[Step 1]]></category>
		<category><![CDATA[Test Site]]></category>
		<category><![CDATA[Xml Sitemap]]></category>

		<guid isPermaLink="false">http://www.jonmoore.co.uk/uncategorized/drupal-xml-sitemap-module-setup</guid>
		<description><![CDATA[OK, I&#8217;ve managed to get to the bottom of it&#8230; For the life of me I couldn&#8217;t figure out how to get the XML Sitemap module to show pages other...]]></description>
			<content:encoded><![CDATA[<p>OK, I&#8217;ve managed to get to the bottom of it&#8230; For the life of me I couldn&#8217;t figure out how to get the XML Sitemap module to show pages other than the home page&#8230;</p>
<p>Then I found it!</p>
<p>Step 1 &#8211; Enable the module(s)<br />
. Go to &#8216;admin/build/modules/list&#8217; and at the very bottom is the &#8216;XML Sitemap&#8217; module.<br />
. Tick the first &#8216;XML Sitemap&#8217; and the &#8216;XML sitemap node&#8217; module.<br />
. You might want to look at the &#8216;XML sitemap engines&#8217; module, as it submits to search engines, etc. I won&#8217;t turn it on here as it&#8217;s not what we want to do on the test site.<br />
. Press &#8216;Save Configuration&#8217; at the bottom of the page.</p>
<p>Step 2 &#8211; Enable the &#8216;content types&#8217; we want the &#8216;XML sitemap node&#8217; module to pick-up. (this is the bit that was causing the problem).<br />
. Go to &#8216;admin/content/types/list&#8217;<br />
. You&#8217;ll need to decide &#8216;which&#8217; to activate, but for example, use &#8216;Tabbed Page&#8217;. Press the &#8216;edit&#8217; link.<br />
. At the bottom of the next page you&#8217;ll see &#8216;XML sitemap&#8217; which opens up to show 2 dropdown menus.<br />
. Inclusion &#8211; allows you to turn on/off<br />
. Default priority &#8211; allows you to choose a level. You probably know more about the &#8216;correct&#8217; level than I do.<br />
. Press &#8216;Save content type&#8217; to save.<br />
. Do the same for all of the &#8216;content types&#8217; you want to be shown.</p>
<p>Step 3 &#8211; Sitemap Settings<br />
. Go to &#8216;admin/settings/xmlsitemap&#8217;<br />
. Under the settings set the &#8216;minimum sitemap lifetime&#8217; to 1 day as they recommend.<br />
. Drop down &#8216;Content&#8217; and you&#8217;ll see a list of &#8216;content types&#8217; along with numbers to represent how many are &#8216;available&#8217;, &#8216;indexed&#8217;, and visible&#8217;.<br />
. If &#8216;indexed&#8217; and &#8216;visible&#8217; are at zero, you&#8217;ll need to run cron (which normally happens every hour), or use the &#8216;Rebuild links&#8217; tab to &#8216;Rebuild sitemap&#8217;.<br />
. Check &#8216;Content&#8217; on the &#8216;Settings&#8217; tab again</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonmoore.co.uk/drupal/drupal-xml-sitemap-module-setup/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>htaccess 301 Redirect Guide</title>
		<link>http://www.jonmoore.co.uk/html-and-css/htaccess-301-redirect-guide</link>
		<comments>http://www.jonmoore.co.uk/html-and-css/htaccess-301-redirect-guide#comments</comments>
		<pubDate>Fri, 16 Dec 2011 08:31:06 +0000</pubDate>
		<dc:creator>Jon Moore</dc:creator>
				<category><![CDATA[HTML & CSS]]></category>
		<category><![CDATA[Handy Guide]]></category>
		<category><![CDATA[Htaccess Redirect]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://www.jonmoore.co.uk/?p=971</guid>
		<description><![CDATA[Handy guide from the team at Sitepoint&#8230; http://www.sitepoint.com/the-missing-guide-301-redirects-for-mac-and-pc/]]></description>
			<content:encoded><![CDATA[<p>Handy guide from the team at Sitepoint&#8230;</p>
<p><a href="http://www.sitepoint.com/the-missing-guide-301-redirects-for-mac-and-pc/">http://www.sitepoint.com/the-missing-guide-301-redirects-for-mac-and-pc/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonmoore.co.uk/html-and-css/htaccess-301-redirect-guide/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal 6 Set-up on Heart Internet</title>
		<link>http://www.jonmoore.co.uk/drupal/drupal-6-set-up-on-heart-internet</link>
		<comments>http://www.jonmoore.co.uk/drupal/drupal-6-set-up-on-heart-internet#comments</comments>
		<pubDate>Mon, 12 Dec 2011 18:42:24 +0000</pubDate>
		<dc:creator>Jon Moore</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Address Username]]></category>
		<category><![CDATA[Cgi Scripts]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[Control Panel]]></category>
		<category><![CDATA[Default Folder]]></category>
		<category><![CDATA[Default Folders]]></category>
		<category><![CDATA[Dns Records]]></category>
		<category><![CDATA[Domain Name]]></category>
		<category><![CDATA[Dreamweaver Download]]></category>
		<category><![CDATA[Drupal Cms]]></category>
		<category><![CDATA[Heart]]></category>
		<category><![CDATA[Hosting Reseller]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[Memory Allocation]]></category>
		<category><![CDATA[Memory Limit]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Reseller Account]]></category>
		<category><![CDATA[Server Name]]></category>
		<category><![CDATA[Using Dreamweaver]]></category>
		<category><![CDATA[White Pages]]></category>

		<guid isPermaLink="false">http://www.jonmoore.co.uk/?p=964</guid>
		<description><![CDATA[This is more for myself, but good if it helps someone else too&#8230;. This is a Drupal 6 (6.22) set-up on Heart Internet hosting (Reseller account). Once the hosting account...]]></description>
			<content:encoded><![CDATA[<p>This is more for myself, but good if it helps someone else too&#8230;.</p>
<p>This is a Drupal 6 (6.22) set-up on Heart Internet hosting (Reseller account).</p>
<ul>
<li>Once the hosting account has been set-up and the ‘install hour’ has passed, go to the ‘Manage Hosting Accounts’ page (https://customer.heartinternet.co.uk/manage/manage-packages.cgi) and select ‘Super User’ for the account you want to set-up.</li>
<li>From the ‘Control Panel Home’ page, select ‘Drupal CMS’ from the ‘CGI Scripts’ section near the bottom of the page.</li>
<li>Choose the location. Normally we’re installing at ‘root’ so leave the box blank. Press ‘Install Now’.</li>
<li>Once it has installed the scripts and database for you, you’ll notice 2 links near the bottom of the page. Both link to the domain name root (i.e. http://domainname.co.uk) however one will have the server name at the front (i.e. http://79.170.44.155/domainname.co.uk). If the first one works, use it, however if the domain name isn’t quite ready (DNS records) use the 2<sup>nd</sup>….</li>
<li>You are now at the beginning of ‘Drupals Installation Process’. Simply follow the instructions page by page adding in the Site Name, Your email address, Username and Password. Once done you’ll be at a familiar ‘welcome’ page…</li>
<li>Using Dreamweaver, download the ‘sites’ folder, which includes the ‘all’ and ‘default’ folders.</li>
<li>In the ‘default’ folder is the ‘settings.php’ file used to configure the database, etc. Open this file and locate the PHP settings, normally on lines  156 to 167.</li>
<li>Add a new line on the end to increase the memory allocation and to stop ‘white pages’ on heavy resource pages like ‘modules’ and ‘blocks’. So line 168 can become:<br />
‘<strong>ini_set(&#8216;memory_limit&#8217;,&#8217;516M&#8217;);</strong>’.<br />
Save and upload.</li>
<li>In the ‘all’ folder we need to add folders for the ‘modules’, ‘themes’, libraries’ plus our own ‘clereJquery’ folder. This is easiest done by copying the ‘all’ folder from another site already set up. It’s worth noting here that you don’t need to copy a theme already in the ‘theme’ folder unless you intend to use it… Like wise, you can copy a theme from another Drupal site into this folder if you want to use it. The ‘theme’ folder can contain as many themes as you want available, but it’s best to just copy the one you intend to use…</li>
<li>Upload your ‘new’ ‘all’ folder with your modules and themes.</li>
<li>Now you can go back to your browser and log into the site using the username and password you added a few steps ago…</li>
<li>Once in, we need to set a few basic thing up, so first we’ll start with ‘Modules’….</li>
<li>Go to ‘Administer &gt; Site Building &gt; Modules’ (or use this <strong>admin/build/modules</strong> for speed).</li>
<li>Preferably with another similar site open, tick the modules you are going to need, a suggestion is:
<ul>
<li>Administration
<ul>
<li>Administration Menu</li>
</ul>
</li>
<li>CCK
<ul>
<li>Content</li>
<li>Content Copy</li>
<li>Fieldgroup</li>
<li>Number</li>
<li>Text</li>
</ul>
</li>
<li>Core Optional
<ul>
<li>Aggregator</li>
<li>Contact</li>
<li>Database Logging</li>
<li>Help</li>
<li>Menu</li>
<li>Path</li>
<li>Taxonomy</li>
<li>Update Status</li>
<li>Upload</li>
</ul>
</li>
<li>Event
<ul>
<li>Event</li>
</ul>
</li>
<li>Image
<ul>
<li>Image</li>
<li>Image Attach</li>
<li>Image Gallery</li>
</ul>
</li>
<li>Mate Tags
<ul>
<li>Admin interface for Nodewords</li>
<li>Basic meta tags</li>
<li>Extra meta tags</li>
<li>Nodewords</li>
<li>Site verification meta tags</li>
</ul>
</li>
<li>Other
<ul>
<li>Clone modules</li>
<li>Global redirect</li>
<li>Googtube</li>
<li>IMCE</li>
<li>Lightbox 2</li>
<li>Path redirect</li>
<li>Pathauto</li>
<li>Sitemap</li>
<li>Token</li>
<li>Transliteration</li>
<li>Weather</li>
</ul>
</li>
<li>SEO Compliance Checker
<ul>
<li>Basic SEO Rules</li>
<li>Keyword Rules</li>
<li>SEO Compliance Checker</li>
</ul>
</li>
<li>User Interface
<ul>
<li>IMCE Wysiwyg API bridge</li>
<li>Wysiwyg</li>
</ul>
</li>
<li>Views
<ul>
<li>Views</li>
<li>Views Exporter</li>
<li>Views UI</li>
</ul>
</li>
</ul>
</li>
<li>Next we need to set the default time zone (<strong>admin/settings/date-time</strong>), to ‘Europe/London’, plus the date formats and the ‘First day of the week’.</li>
<li>Nodeword Meta tags can be set-up here: <strong>admin/content/nodewords</strong></li>
<li>The ‘Event’ content type needs to be created by going here: <strong>admin/content/node-type/event</strong></li>
<li>Set ‘Full HTML’ as the default Input Format here: <strong>admin/settings/filters/list</strong></li>
<li>Set WYSIWYG editior here: <strong>admin/settings/wysiwyg</strong>for ‘Full HTML’, then press ‘Edit’ to select the icons to use. Suggestions under ‘Buttons and plugins’:
<ul>
<li>Bold</li>
<li>Italic</li>
<li>Underline</li>
<li>Bullet list</li>
<li>Numbered list</li>
<li>Outdent</li>
<li>Indent</li>
<li>Undo</li>
<li>Redo</li>
<li>Link</li>
<li>Unlink</li>
<li>Image</li>
<li>Remove Format</li>
<li>HTML block format</li>
<li>Paste from Word</li>
<li>IMCE</li>
</ul>
</li>
<li>Set ‘Automated alias settings’, here: <strong>admin/build/path/pathauto</strong>. Drop ‘Node paths’ down and change:
<ul>
<li>the default from ‘content/[title-raw]’ to just ‘[title-raw]’</li>
<li>‘Event’ to ‘event/[eventyyyy]/[eventmon]/[eventdd]/[title-raw]’</li>
<li>‘image’ to ‘image/[title-raw]’</li>
</ul>
</li>
<li>Check for available updates here: <strong>admin/reports/updates</strong>. Download and install any updated modules, unzip, upload, etc.
<ul>
<li>Run ‘Updates’ to make sure the new modules are in sync with the database. (www.domain.co.uk/update.php?op=info)</li>
</ul>
</li>
<li>Check ‘Status Report’ (<strong>admin/reports/status</strong>) for any issues, run cron and check again.</li>
<li>Create a ‘Home’ page, then go to ‘Site Information (admin/settings/site-information) and change the setting ‘Default front page’ at the bottom from ‘node’ to ‘home’. Note: this is assuming you home page URL is ‘/home’…</li>
<li>Set up ‘Scheduled Tasks’ from the Heart Internet Control panel. It’s under ‘Web Tools’.
<ul>
<li>Under ‘Run this command’ paste: <strong>/usr/bin/php5 /home/sites/##########.co.uk/public_html/cron.php</strong></li>
<li><strong>C</strong>hange ‘<strong>##########</strong>’ for the domain name (no www.) and leave the other settings as they are.</li>
<li>Press ‘Update’ to save.</li>
<li>To test if it’s working, press ‘Test Command’, and you should get a message back ending with ‘Content-Type: text/html; charset=utf-8’.</li>
<li>Go back to Status Report, (admin/reports/status), and under ‘Cron maintenance tasks’ it should say ‘Last run’ and then how many minutes/seconds ago you pressed ‘Test Command’.</li>
</ul>
</li>
<li>Install a theme here: admin/build/themes, make sure that the only theme enabled is the one you uploaded to the ‘theme’ folder. Press ‘Save Configuration’. If everything has gone to plan, you should be looking at an empty site with your selected theme. If images are missing, it’ll just be the path in either the stylesheet, page.tpl.php or template.php files….</li>
<li>Reset Blocks (<strong>admin/build/block</strong>)  – Remove ‘Powered by Drupal’, ‘Navigation’ and ‘User Login’ from their regions by selecting ‘&lt;none&gt;’ from their dropdown lists and press ‘Save Blocks’.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.jonmoore.co.uk/drupal/drupal-6-set-up-on-heart-internet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add new Region to Drupal Theme</title>
		<link>http://www.jonmoore.co.uk/drupal/add-new-region-to-drupal-theme</link>
		<comments>http://www.jonmoore.co.uk/drupal/add-new-region-to-drupal-theme#comments</comments>
		<pubDate>Thu, 08 Dec 2011 16:24:42 +0000</pubDate>
		<dc:creator>Jon Moore</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Banner]]></category>
		<category><![CDATA[Banner Width]]></category>
		<category><![CDATA[Div Id]]></category>
		<category><![CDATA[Footer]]></category>
		<category><![CDATA[Header Header]]></category>
		<category><![CDATA[Line 3]]></category>
		<category><![CDATA[Lowercase]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Nbsp Nbsp Nbsp Nbsp Nbsp]]></category>
		<category><![CDATA[Prints]]></category>
		<category><![CDATA[Punctuation]]></category>
		<category><![CDATA[Regions]]></category>
		<category><![CDATA[Rsquo]]></category>
		<category><![CDATA[Style Sheet]]></category>
		<category><![CDATA[Stylesheet]]></category>
		<category><![CDATA[Tpl]]></category>

		<guid isPermaLink="false">http://www.jonmoore.co.uk/?p=953</guid>
		<description><![CDATA[There are loads of themes available, but you&#8217;ll rarely find one that&#8217;s exactly what you want (or what the client wants), straight out of the bag&#8230; So at some point...]]></description>
			<content:encoded><![CDATA[<p>There are loads of themes available, but you&#8217;ll rarely find one that&#8217;s exactly what you want (or what the client wants), straight out of the bag&#8230; So at some point you&#8217;ll need to add a region, and this is how.</p>
<p>In each &lsquo;theme&rsquo; you will have a .info file, a page.tpl.php file  and the style sheet. The .info file will start with the name of you theme, so themename.info for example.</p>
<p><strong>INFO</strong><br />
To add a new region called &lsquo;Banner&rsquo;, you open the .info file  and you should see a section like:</p>
<pre>
regions[sidebar_first] = sidebar first
regions[sidebar_last] = sidebar last
regions[header] = header
regions[nav] = nav
regions[content_top] = content top
regions[content] = content
regions[content_bottom] = content bottom
regions[footer] = footer</pre>
<p>To add our new region we just add it to the above like: <em>regions[banner] = Banner</em> <br />
    Note: the first &lsquo;banner&rsquo; is all lowercase, no spaces, and  the second &lsquo;Banner&rsquo; is for display, so can have spaces, etc, just be careful with punctuation.</p>
<p>Your new region will now show on the &lsquo;blocks&rsquo; page, and you can start assigning blocks to your new region. (Flush cache if it doesn&rsquo;t  show). However it won&rsquo;t appear on the website pages yet.</p>
<p><strong>PAGE TPL</strong><br />In the page.tpl.php page, find the area you want the new region to show and paste the following:</p>
<pre>
&lt;?php if($banner){ ?&gt;
    &lt;div id=&quot;banner&quot;&gt;
        &lt;?php print $banner; ?&gt;
    &lt;/div&gt;
&lt;?php } ?&gt;</pre>
<p>Note: The variable you used in <em>region[]</em> (banner) is also used here, but it has a <em>$</em> sign in front. i.e. <em>$banner</em>. The first line in the code above uses <em>if</em> to check that something has been put in the <em>banner</em> region, (i.e. a block),  and if it has, line 3 prints/writes it to the page as it&#8217;s being built. Lines 2 and 4 add the CSS div start/end with an <em>id</em> of <em>banner</em> so you can control it in the stylesheet by using <em>#banner</em>.</p>
<p><strong>STYLESHEET</strong><br />Add the following and amend it as you see fit:</p>
<pre>#banner  { 
    width: 960px; 
    height: 300px; 
    clear: both; 
    margin: 0; 
    padding: 0; 
    background: #f0f; 
    position: relative;
}</pre>
<p>See? Painless really&#8230; If something isn&#8217;t showing, remember to flush the cache so the system loads the .info and template files again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonmoore.co.uk/drupal/add-new-region-to-drupal-theme/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert Database Date to Something More &#8216;User Friendly&#8217;</title>
		<link>http://www.jonmoore.co.uk/php/handy-functions/convert-database-date-to-something-more-user-friendly</link>
		<comments>http://www.jonmoore.co.uk/php/handy-functions/convert-database-date-to-something-more-user-friendly#comments</comments>
		<pubDate>Sat, 12 Nov 2011 20:06:38 +0000</pubDate>
		<dc:creator>Jon Moore</dc:creator>
				<category><![CDATA[Handy Functions]]></category>
		<category><![CDATA[Date Time]]></category>
		<category><![CDATA[Return Date]]></category>

		<guid isPermaLink="false">http://www.jonmoore.co.uk/?p=922</guid>
		<description><![CDATA[// // Convert database date to something more user friendly // function userFriendlyDbDate($date){ $time = strtotime($date); return date('d/m/Y H:i', $time); }]]></description>
			<content:encoded><![CDATA[<pre>//
//   Convert database date to something more user friendly
//
function userFriendlyDbDate($date){
   $time = strtotime($date);
   return date('d/m/Y H:i', $time);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.jonmoore.co.uk/php/handy-functions/convert-database-date-to-something-more-user-friendly/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Email Validation</title>
		<link>http://www.jonmoore.co.uk/php/php-email-validation</link>
		<comments>http://www.jonmoore.co.uk/php/php-email-validation#comments</comments>
		<pubDate>Fri, 11 Nov 2011 11:45:59 +0000</pubDate>
		<dc:creator>Jon Moore</dc:creator>
				<category><![CDATA[Handy Functions]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Array]]></category>
		<category><![CDATA[Domainname]]></category>
		<category><![CDATA[Email Addresses]]></category>
		<category><![CDATA[Email Validation]]></category>
		<category><![CDATA[Hostname]]></category>
		<category><![CDATA[Mark Jackson]]></category>
		<category><![CDATA[Match]]></category>
		<category><![CDATA[Php Email]]></category>
		<category><![CDATA[Valid Extension]]></category>
		<category><![CDATA[Validate Email]]></category>
		<category><![CDATA[Z0]]></category>

		<guid isPermaLink="false">http://www.jonmoore.co.uk/?p=880</guid>
		<description><![CDATA[Email validation is something that is needed in a variety of situations, but I&#8217;ve always struggled to find a good one&#8230;. Well, here are 2! The first is something I...]]></description>
			<content:encoded><![CDATA[<p>Email validation is something that is needed in a variety of situations, but I&#8217;ve always struggled to find a good one&#8230;. Well, here are 2!</p>
<p>The first is something I found online somewhere, and has been modified a little&#8230;</p>
<pre>$email = 'you@youremailaddress.com';

if(preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})+$/i", $email)) {
    // All OK, do something
}
else {
    // Not OK, throw error
}</pre>
<p>The second is from the legendary <a href="http://www.mjdigital.co.uk/blog/" target="_blank">Mark Jackson</a>, it requires PHP5 and in his words:</p>
<p><em>PHP actually has a built in function called filter_var which has an email validation flag in it but it will allow for any hostname (like mark@localhost) which I do not like so I have added another simple check to make sure it has a dot after the @ sign the function I use is:</em></p>
<pre>
function checkEmail($e,$bypassVal=false) {
    // ensure the email has a valid extension
    if(($bypassVal!==false)&#038;&#038;(is_array($bypassVal))&#038;&#038;(in_array($e,$bypassVal))) { return true; }
    if(strpos($e,'@')>=strrpos($e,'.')) { return false; }
    return (filter_var($e, FILTER_VALIDATE_EMAIL) &#038;&#038; preg_match('/@.+\./', $e)) ? true : false;
}
</pre>
<p><em>The $bypassVal variable allows you to specify any email addresses (in an array format) which can can go through without validation &#8211; just in case you want to specify a particular string or email which can get through.</em></p>
<p><em>Examples<br />
checkEmail(&#8216;mark@domainname.co.uk&#8217;); // returns true<br />
checkEmail(&#8216;mark@localhost&#8217;); // returns false<br />
checkEmail(&#8216;mark@localhost&#8217;,array(&#8216;mark@localhost&#8217;)); // returns true<br />
checkEmail(&#8216;__I_GET_THROUGH__&#8217;,array(&#8216;mark@localhost&#8217;,'__I_GET_THROUGH__&#8217;)); // returns true</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jonmoore.co.uk/php/php-email-validation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

