<?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"
	>

<channel>
	<title>William Eaton - Scripts &#038; Function</title>
	<atom:link href="http://www.williameaton.co.uk/scripts/feed" rel="self" type="application/rss+xml" />
	<link>http://www.williameaton.co.uk/scripts</link>
	<description>Scripts and functions that I have written or found useful</description>
	<pubDate>Wed, 11 Jun 2008 11:29:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Resetting owner of files Linux</title>
		<link>http://www.williameaton.co.uk/scripts/linux-commands/resetting-owner-of-files-linux</link>
		<comments>http://www.williameaton.co.uk/scripts/linux-commands/resetting-owner-of-files-linux#comments</comments>
		<pubDate>Wed, 11 Jun 2008 11:29:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[linux commands]]></category>

		<guid isPermaLink="false">http://www.williameaton.co.uk/scripts/?p=29</guid>
		<description><![CDATA[chown user:group -R *
recursively resets all files the the ownership &#8220;user&#8221; in the group &#8220;group&#8221; for all files and folders in current working directory and and sub folders.
]]></description>
		<wfw:commentRss>http://www.williameaton.co.uk/scripts/linux-commands/resetting-owner-of-files-linux/feed</wfw:commentRss>
		</item>
		<item>
		<title>Drupal WYSIWYG stops working with my new template</title>
		<link>http://www.williameaton.co.uk/scripts/drupal/drupal-wysiwyg-stops-working-with-my-new-template</link>
		<comments>http://www.williameaton.co.uk/scripts/drupal/drupal-wysiwyg-stops-working-with-my-new-template#comments</comments>
		<pubDate>Sat, 31 May 2008 10:19:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[not showing]]></category>

		<category><![CDATA[own template]]></category>

		<category><![CDATA[WYSIWYG]]></category>

		<guid isPermaLink="false">http://www.williameaton.co.uk/scripts/?p=28</guid>
		<description><![CDATA[I work on the technical side of Drupal and my colleague works on the design part. At one point in time (without realising when), our WYSIWYG editor stopped working and no others would work in its place. We were using HTMLArea/Xinha but tried the YUI as well as the FCKeditor without any luck. The strange [...]]]></description>
		<wfw:commentRss>http://www.williameaton.co.uk/scripts/drupal/drupal-wysiwyg-stops-working-with-my-new-template/feed</wfw:commentRss>
		</item>
		<item>
		<title>Drupal htaccess for SEO friendly URLs</title>
		<link>http://www.williameaton.co.uk/scripts/mod_rewrite/drupal-htaccess-for-seo-friendly-urls</link>
		<comments>http://www.williameaton.co.uk/scripts/mod_rewrite/drupal-htaccess-for-seo-friendly-urls#comments</comments>
		<pubDate>Wed, 27 Feb 2008 14:57:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://www.williameaton.co.uk/scripts/php/drupal-htaccess-for-seo-friendly-urls</guid>
		<description><![CDATA[I have had some issues myself with drupal websites and getting the SEO friendly URLs to work when I either have no access to the server or the server changes cannot be made (CPANEL does cause a problem)
Attached is a copy of an htaccess that you can use&#8230;.
Drupal Example htaccess file
]]></description>
		<wfw:commentRss>http://www.williameaton.co.uk/scripts/mod_rewrite/drupal-htaccess-for-seo-friendly-urls/feed</wfw:commentRss>
		</item>
		<item>
		<title>strtotime that accepts dates</title>
		<link>http://www.williameaton.co.uk/scripts/php/strtotime-that-accepts-dates</link>
		<comments>http://www.williameaton.co.uk/scripts/php/strtotime-that-accepts-dates#comments</comments>
		<pubDate>Thu, 07 Feb 2008 19:46:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.williameaton.co.uk/scripts/php/strtotime-that-accepts-dates</guid>
		<description><![CDATA[I got tired of writing many lines of code to simply add x amount of time onto a given date due to having to workout the linux timestamp for a certain date, then adding the date, then converting it back for next time so I wrote this&#8230;
Basically, it works in the same wasas strtotime() except [...]]]></description>
		<wfw:commentRss>http://www.williameaton.co.uk/scripts/php/strtotime-that-accepts-dates/feed</wfw:commentRss>
		</item>
		<item>
		<title>Quick Email Function</title>
		<link>http://www.williameaton.co.uk/scripts/php/quick-email-function</link>
		<comments>http://www.williameaton.co.uk/scripts/php/quick-email-function#comments</comments>
		<pubDate>Thu, 07 Feb 2008 19:27:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.williameaton.co.uk/scripts/php/quick-email-function</guid>
		<description><![CDATA[Its not the most secure email function in the world but if you want something quick or simple especially for testing then I use the below&#8230;
function send_email($recipient,$subject,$body)
{
$headers = &#8220;From: Email System\n&#8221;;
$headers .= &#8220;Reply-To: me@mydomain.com\n&#8221;;
$headers .= &#8220;MIME-version: 1.0\n&#8221;;
$headers .= &#8220;Content-type: multipart/alternative; boundary=\&#8221;Message-Boundary\&#8221;\n\n&#8221;;
$headers .= &#8220;This is a multi-part message in MIME format.\n\n&#8221;;
$headers .= &#8220;&#8211;Message-Boundary\n&#8221;;
$headers.=&#8221;Content-Type: text/plain; charset=iso-8859-1\n&#8221;;
$headers.=&#8221;Content-Transfer-Encoding: 8bit\n\n&#8221;;
$headers.= [...]]]></description>
		<wfw:commentRss>http://www.williameaton.co.uk/scripts/php/quick-email-function/feed</wfw:commentRss>
		</item>
		<item>
		<title>mysql delete duplicate rows</title>
		<link>http://www.williameaton.co.uk/scripts/mysql/mysql-delete-duplicate-rows</link>
		<comments>http://www.williameaton.co.uk/scripts/mysql/mysql-delete-duplicate-rows#comments</comments>
		<pubDate>Mon, 05 Nov 2007 18:08:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[MYSQL]]></category>

		<guid isPermaLink="false">http://www.williameaton.co.uk/scripts/mysql/mysql-delete-duplicate-rows</guid>
		<description><![CDATA[DELETE tablename
FROM tablename,
(SELECT MAX(uid) AS dupid,COUNT(uid) AS dupcnt
FROM tablename
GROUP BY id,url HAVING dupcnt&#62;1)
AS dups
WHERE tablename.uid=dups.dupid;
]]></description>
		<wfw:commentRss>http://www.williameaton.co.uk/scripts/mysql/mysql-delete-duplicate-rows/feed</wfw:commentRss>
		</item>
		<item>
		<title>replace string in a table</title>
		<link>http://www.williameaton.co.uk/scripts/mysql/replace-string-in-a-table</link>
		<comments>http://www.williameaton.co.uk/scripts/mysql/replace-string-in-a-table#comments</comments>
		<pubDate>Wed, 17 Oct 2007 11:08:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[MYSQL]]></category>

		<guid isPermaLink="false">http://www.williameaton.co.uk/scripts/php/replace-string-in-a-table</guid>
		<description><![CDATA[If you want to change certain rows in a database where a query applies &#8230; for example an &#8220;if&#8221; query finding all entries which contain &#8220;samplesearchtext&#8221;&#8230; then run the following script either via mysql/phpmyadmin/php
update mytable set myfield =replace (myfield, &#8217;samplesearchtext&#8217;, &#8217;samplereplacetext&#8217;);
]]></description>
		<wfw:commentRss>http://www.williameaton.co.uk/scripts/mysql/replace-string-in-a-table/feed</wfw:commentRss>
		</item>
		<item>
		<title>Shorten string length</title>
		<link>http://www.williameaton.co.uk/scripts/php/shorten-string-length</link>
		<comments>http://www.williameaton.co.uk/scripts/php/shorten-string-length#comments</comments>
		<pubDate>Wed, 26 Sep 2007 14:26:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.williameaton.co.uk/scripts/php/shorten-string-length</guid>
		<description><![CDATA[$query = substr($query,0,-1);
Shortens the string by one character. Change the second value to remove more or see php.net/substr for more information
]]></description>
		<wfw:commentRss>http://www.williameaton.co.uk/scripts/php/shorten-string-length/feed</wfw:commentRss>
		</item>
		<item>
		<title>mysql error codes</title>
		<link>http://www.williameaton.co.uk/scripts/mysql/mysql-error-codes</link>
		<comments>http://www.williameaton.co.uk/scripts/mysql/mysql-error-codes#comments</comments>
		<pubDate>Mon, 24 Sep 2007 08:11:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[MYSQL]]></category>

		<guid isPermaLink="false">http://www.williameaton.co.uk/scripts/php/mysql-error-codes</guid>
		<description><![CDATA[#1046-No database Selected. You are trying to query without choosing a database
#1054 - Unknown Column
#1109 - Unknown Table
#1136 - Column count doesn&#8217;t match the value count
]]></description>
		<wfw:commentRss>http://www.williameaton.co.uk/scripts/mysql/mysql-error-codes/feed</wfw:commentRss>
		</item>
		<item>
		<title>Find and replace in mysql</title>
		<link>http://www.williameaton.co.uk/scripts/php/find-and-replace-in-mysql</link>
		<comments>http://www.williameaton.co.uk/scripts/php/find-and-replace-in-mysql#comments</comments>
		<pubDate>Mon, 10 Sep 2007 09:46:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.williameaton.co.uk/scripts/php/find-and-replace-in-mysql</guid>
		<description><![CDATA[To find certain characters or strings and replace them with another value, execute the following query&#8230;
update [table_name] set [field_name] = replace([field_name],&#8217;[string_to_find]&#8216;,&#8217;[string_to_replace]&#8216;);
This is quite useful for finding strange characters that appear instead of letters with accents over them. I usually replace the strange character with the ASCII value (Ã¡ becomes á)
]]></description>
		<wfw:commentRss>http://www.williameaton.co.uk/scripts/php/find-and-replace-in-mysql/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
