<?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>Aprium</title>
	<atom:link href="http://aprium.co/feed/" rel="self" type="application/rss+xml" />
	<link>http://aprium.co</link>
	<description>I am a freelance web designer &#38; general coder</description>
	<lastBuildDate>Thu, 26 Jan 2012 13:52:31 +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>Ubuntu Netbeans 7</title>
		<link>http://aprium.co/ubuntu-netbeans-7/</link>
		<comments>http://aprium.co/ubuntu-netbeans-7/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 13:52:31 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://aprium.co/?p=207</guid>
		<description><![CDATA[Day-to-day I use Gedit with a ton of plug-ins to do my PHP development but a friend of mine suggested I gave Netbeans 7 a go. I last tried Netbeans at version 6 and wanted to know if it had fixed the problems it had. However after installing it on linux it just looked awful, [...]]]></description>
			<content:encoded><![CDATA[<p>Day-to-day I use Gedit with a ton of plug-ins to do my PHP development but a friend of mine suggested I gave Netbeans 7 a go. I last tried Netbeans at version 6 and wanted to know if it had fixed the problems it had. However after installing it on linux it just looked awful, mainly due to the fonts not being anti-aliases and I remembered why I never really got into Netbeans. I think this is a problem with java on linux in general but I&#8217;m not sure.</p>
<p>I came across this post http://ibnaziz.wordpress.com/2009/06/10/netbeans-anti-aliasing/ and added the line:</p>
<pre>
netbeans_default_options="-J-Dorg.netbeans.modules.tomcat.autoregister.token=1244593975203 -J-Dorg.netbeans.modules.tomcat.autoregister.catalinaHome=\"C:\Progr$
</pre>
<p>This fixed the problem for me and now the fonts are rendering nicely. The IDE is stable and feature complete and seems to be a little less clunky than eclipse. So if your looking for a new Linux php IDE give Netbeans a go.</p>
]]></content:encoded>
			<wfw:commentRss>http://aprium.co/ubuntu-netbeans-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving from Drupal 6 to WordPress 3.1</title>
		<link>http://aprium.co/moving-from-drupal-6-to-wordpress-3-1/</link>
		<comments>http://aprium.co/moving-from-drupal-6-to-wordpress-3-1/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 10:13:31 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Drupal]]></category>

		<guid isPermaLink="false">http://aprium.dev/?p=187</guid>
		<description><![CDATA[I thought it was about time I updated my site as it was running as a Drupal 6 install. I wanted to concentrate on the blogging aspect of the site and thought that WordPress might be closer to what I needed from a CMS. So here is how to convert a drupal site to wordpress. [...]]]></description>
			<content:encoded><![CDATA[<p>I thought it was about time I updated my site as it was running as a Drupal 6 install. I wanted to concentrate on the blogging aspect of the site and thought that WordPress might be closer to what I needed from a CMS.</p>
<p>So here is how to convert a drupal site to wordpress.</p>
<p>1) Back up the database.</p>
<p>2) Install a fresh version of wordpress onto the same mysql server as the drupal database with the database name of &#8220;wordpress&#8221;.</p>
<p>3) Open a mysql client and make your drupal database the currently selected database.</p>
<p>4) Paste the following and execute.</p>
<pre class="brush: sql">

TRUNCATE TABLE wordpress.wp_comments;
TRUNCATE TABLE wordpress.wp_links;
TRUNCATE TABLE wordpress.wp_postmeta;
TRUNCATE TABLE wordpress.wp_posts;
TRUNCATE TABLE wordpress.wp_term_relationships;
TRUNCATE TABLE wordpress.wp_term_taxonomy;
TRUNCATE TABLE wordpress.wp_terms;

INSERT INTO wordpress.wp_terms (term_id, `name`, slug, term_group)
SELECT
 d.tid, d.name, REPLACE(LOWER(d.name), ' ', '-'), 0
FROM term_data d
INNER JOIN term_hierarchy h
 USING(tid)
;

INSERT INTO wordpress.wp_term_taxonomy (term_id, taxonomy, description, parent)
SELECT
 d.tid `term_id`,
 'category' `taxonomy`,
 d.description `description`,
 h.parent `parent`
FROM term_data d
INNER JOIN term_hierarchy h
 USING(tid)
;

INSERT INTO
    wordpress.wp_posts (id, post_date, post_content, post_title,
    post_excerpt, post_name, post_modified)
SELECT DISTINCT
    n.nid, FROM_UNIXTIME(created), body, n.title,
    teaser,
    REPLACE(REPLACE(REPLACE(REPLACE(LOWER(n.title),' ', '-'),'.', '-'),',', '-'),'+', '-'),
    FROM_UNIXTIME(changed)
FROM node n, node_revisions r
WHERE n.vid = r.vid and n.type = 'blog'
;

INSERT INTO wordpress.wp_term_relationships (object_id, term_taxonomy_id)
SELECT nid, tid FROM term_node;

;

UPDATE wordpress.wp_term_taxonomy tt
SET `count` = (
 SELECT COUNT(tr.object_id)
 FROM wordpress.wp_term_relationships tr
 WHERE tr.term_taxonomy_id = tt.term_taxonomy_id
);

INSERT INTO wordpress.wp_comments (comment_post_ID, comment_date, comment_content, comment_parent, comment_author, comment_author_email, comment_author_url, comment_approved)
SELECT nid, FROM_UNIXTIME(timestamp), comment, thread, name, mail, homepage, status FROM comments;

UPDATE wordpress.wp_posts SET `comment_count` = (SELECT COUNT(`comment_post_id`) FROM wordpress.`wp_comments` WHERE `wp_posts`.`id` = `wp_comments`.`comment_post_id`);

UPDATE wordpress.wp_posts SET post_content = REPLACE(post_content, '', '');

UPDATE wordpress.wp_posts SET post_content = REPLACE(post_content, '"/sites/default/files/', '"/sites/default/files');
</pre>
<p>5) You then just need to copy all your files from the drupal /sites/default/files to /sites/default/files</p>
<p>This worked exceptionally well for my site and because its just a sql script it runs quickly. I got the script originally from this link and have only edited it together and changed the database names. http://www.smileyouroncamera.co.uk/2011/09/30/migrating-drupal-based-site-to-wordpress.</p>
]]></content:encoded>
			<wfw:commentRss>http://aprium.co/moving-from-drupal-6-to-wordpress-3-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Consilium Employee Benefits</title>
		<link>http://aprium.co/consilium-employee-benefits/</link>
		<comments>http://aprium.co/consilium-employee-benefits/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 00:59:28 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://aprium.dev/?p=175</guid>
		<description><![CDATA[Consilium Employee Benefits as an organisation is committed to excellence. This philosophy is central to every aspect of our operation. Visit]]></description>
			<content:encoded><![CDATA[<p>Consilium Employee Benefits as an organisation is committed to excellence. This philosophy is central to every aspect of our operation.</p>
<div>
<a href="http://www.consiliumeb.co.uk"  class="save-button" title="Visit" target="_blank">Visit</a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://aprium.co/consilium-employee-benefits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TheLittleBoxOffice</title>
		<link>http://aprium.co/thelittleboxoffice/</link>
		<comments>http://aprium.co/thelittleboxoffice/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 00:56:15 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://aprium.dev/?p=171</guid>
		<description><![CDATA[The Little Box Office offers an affordable, simple, fast and secure software solution for companies looking to offer ticket bookings to their customers online, over the telephone or over the counter. Visit]]></description>
			<content:encoded><![CDATA[<p>The Little Box Office offers an affordable, simple, fast and secure software solution for companies looking to offer ticket bookings to their customers online, over the telephone or over the counter.</p>
<div>
<a href="http://www.thelittleboxoffice.co" class="save-button" title="Visit" target="_blank">Visit</a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://aprium.co/thelittleboxoffice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FutureBook</title>
		<link>http://aprium.co/futurebook/</link>
		<comments>http://aprium.co/futurebook/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 00:52:46 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://aprium.dev/?p=168</guid>
		<description><![CDATA[The book is not dead, but the printed world is changing. There is a huge amount going on under the wire, from book videos to social networking sites just about books. There is nothing to suggest that the vibrancy and talent that has transformed publishing in the last thirty years will not continue to underpin [...]]]></description>
			<content:encoded><![CDATA[<p>The book is not dead, but the printed world is changing. There is a huge amount going on under the wire, from book videos to social networking sites just about books. There is nothing to suggest that the vibrancy and talent that has transformed publishing in the last<br />
thirty years will not continue to underpin it for the next decades: and we want to reflect that.</p>
<p>So here we are, part community forum, part sounding board. It is a place where anyone from industry insiders to digital enthusiasts can report, learn, debate and investigate the future of the book.</p>
<p>Welcome to the conversation.</p>
<div>
<a href="http://www.futurebook.net" class="save-button" title="Visit" target="_blank">Visit</a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://aprium.co/futurebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TheBookseller</title>
		<link>http://aprium.co/thebookseller/</link>
		<comments>http://aprium.co/thebookseller/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 00:31:11 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Portfolio]]></category>

		<guid isPermaLink="false">http://aprium.dev/?p=155</guid>
		<description><![CDATA[Founded in 1997, the latest version of theBookseller.com was launched in January 2007.The website provides daily news and comment about the book business, starting at 8am with the latest digest of press reports about the publishing sector and financial updates from the City. Regular news updates from The Bookseller&#8217;s news desk follow throughout the day. The [...]]]></description>
			<content:encoded><![CDATA[<p>Founded in 1997, the latest version of theBookseller.com was launched in January 2007.The website provides daily news and comment about the book business, starting at 8am with the latest digest of press reports about the publishing sector and financial updates from the City. Regular news updates from The Bookseller&#8217;s news desk follow throughout the day.</p>
<p>The site also includes opinion, blogs, author profiles and features about the book business, as well as an extensive and searchable archive of previously published content.</p>
<p>TheBookseller.com makes extensive use of the authoritative Nielsen BookScan data, bringing subscribers the Official UK Top 50 plus more detailed charts updated daily.</p>
<p>The site also includes the most comprehensive database of publishing jobs available online in the UK.</p>
<div>
<a href="http://www.thebookseller.com" class="save-button" title="Visit" target="_blank">Visit</a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://aprium.co/thebookseller/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeIgniter Hack Form_Validation Callbacks</title>
		<link>http://aprium.co/codeigniter-hack-form_validation-callbacks/</link>
		<comments>http://aprium.co/codeigniter-hack-form_validation-callbacks/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 17:47:14 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<p>When im writting a Codeigniter 2 application I prefer to have most of my code in the libraries and leave the controller as blank as possible. This allows me to reuse code like forms in other sections of the site. eg you want the login for to be in 2 different places. However Codeigniter's Form_valiation class does not allow for custom validation callbacks in a library. The only way to fix this is to hack the Form_validation class. I have created a modification that allows you to call a validation callback from any class. </p>]]></description>
			<content:encoded><![CDATA[<p><a style="margin-right: 10px;" href="http://aprium.dev/wp-content/uploads/2011/09/ci_logo_flame1.jpg" rel="prettyPhoto[104]"><img class="size-full wp-image-139 alignright" title="ci_logo_flame" src="http://aprium.dev/wp-content/uploads/2011/09/ci_logo_flame1.jpg" alt="" width="150" height="164" /></a>When im writting a Codeigniter 2 application I prefer to have most of my code in the libraries and leave the controller as blank as possible. This allows me to reuse code like forms in other sections of the site. eg you want the login for to be in 2 different places. However Codeigniter&#8217;s Form_valiation class does not allow for custom validation callbacks in a library. The only way to fix this is to hack the Form_validation class. I have created a modification that allows you to call a validation callback from any class.</p>
<p>This hack starts at line 585 of the /System/Libraries/Form_validation.php.</p>
<pre class="brush: php">			// Call the function that corresponds to the rule
			if ($callback === TRUE)
			{
				// custom start //
				$role_comp = explode('-&gt;', $rule);
				$class = $role_comp[0];
				$method = $role_comp[1];

				if ( ! method_exists($class, $method))
				{
					continue;
				}

				// Run the function and grab the result
				$result = $this-&gt;CI-&gt;$class-&gt;$method($postdata, $param);
				// custom end //</pre>
<p>You use it with the normal callback_ but then add in the class name -&gt; then your callback name.</p>
<pre class="brush: php">$this-&gt;form_validation-&gt;set_rules('email', 'Email', 'callback_libusers-&gt;check_email_status');</pre>
]]></content:encoded>
			<wfw:commentRss>http://aprium.co/codeigniter-hack-form_validation-callbacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Best Espresso Colour Theme</title>
		<link>http://aprium.co/best-espresso-colour-theme/</link>
		<comments>http://aprium.co/best-espresso-colour-theme/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 13:26:58 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Espresso]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[My editor of choice is the Espresso IDE and I recently found an awesome colour theme called <a href="http://onecrayon.com/products/quiet-light/">quiet light over at one crayon</a>. Check it out.

<img src="http://aprium.co/sites/default/files/php.png"/>
]]></description>
			<content:encoded><![CDATA[<p>My editor of choice is the Espresso IDE and I recently found an awesome colour theme called <a href="http://onecrayon.com/products/quiet-light/">quiet light over at one crayon</a>. Check it out.</p>
<p><img src="http://aprium.co/wp-content/uploads/php.png"/></p>
]]></content:encoded>
			<wfw:commentRss>http://aprium.co/best-espresso-colour-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting a Codeigniter Query Source</title>
		<link>http://aprium.co/getting-a-codeigniter-query-source/</link>
		<comments>http://aprium.co/getting-a-codeigniter-query-source/#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<p>Using CodeIgniter's framework for query binding is great but can make it hard to debug problems in your SQL statement. The solutions I have come up with is to use the compile_binds function. This will output your SQL statement after the parameters have been cleaned and added.</p>

<pre class="brush: php">
var_dump($this->db->compile_binds($sql, array($param1, $param2)));
</pre>]]></description>
			<content:encoded><![CDATA[<p>Using CodeIgniter&#8217;s framework for query binding is great but can make it hard to debug problems in your SQL statement. The solutions I have come up with is to use the compile_binds function. This will output your SQL statement after the parameters have been cleaned and added.</p>
<pre class="brush: php">
var_dump($this->db->compile_binds($sql, array($param1, $param2)));
</pre>
]]></content:encoded>
			<wfw:commentRss>http://aprium.co/getting-a-codeigniter-query-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CodeIgniter Extending Form_Validation</title>
		<link>http://aprium.co/codeigniter-extending-form_validation/</link>
		<comments>http://aprium.co/codeigniter-extending-form_validation/#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<p>You can add generic validation functions to codeigniter by extending the Form_Validation. You do this by creating a file called /application/library/MY_Form_Validation.php. </p>
<p>
If you load the Form_Validation library it will pick-up this class and use it instead. Because it extends the original class CI_Form_validation you still have access to all the normal functions. 
</p>
<p>
Here is an example that adds 2 validation functions:
</p>]]></description>
			<content:encoded><![CDATA[<p>You can add generic validation functions to codeigniter by extending the Form_Validation. You do this by creating a file called /application/library/MY_Form_Validation.php. </p>
<p>
If you load the Form_Validation library it will pick-up this class and use it instead. Because it extends the original class CI_Form_validation you still have access to all the normal functions.
</p>
<p>
Here is an example that adds 2 validation functions:
</p>
<pre class="brush: php">
<?php

class MY_Form_Validation extends CI_Form_validation {

	public function greater_or_equal($str, $min)
	{
		if ( ! is_numeric($str))
		{
			return FALSE;
		}

		if ( ! isset($_POST[$min]))
		{
			return FALSE;
		}

		if(! is_numeric($min)) {
			if (! is_numeric($_POST[$min])) {
				return FALSE;
			}
			else {
				$min = $_POST[$min];
			}
		}

		$out = ($str >= $min);

		if ($out == false) {
			$this->set_message('greater_or_equal', 'The %s field must be greater or equal to the %s');
		}

		return $out;
	}

	public function less_or_equal($str, $max)
	{
		if ( ! is_numeric($str))
		{
			return FALSE;
		}

		if ( ! isset($_POST[$max]))
		{
			return FALSE;
		}

		if(! is_numeric($max)) {
			if (! is_numeric($_POST[$max])) {
				return FALSE;
			}
			else {
				$max = $_POST[$max];
			}
		}

		$out = ($str <= $min);

		if ($out == false) {
			$this->set_message('greater_or_equal', 'The %s field must be greater or equal to the %s');
		}

		return $out;
	}
}
</pre>
<p>You can use it like this:</p>
<pre class="brush: php">
$this->form_validation->set_rules('max', 'maximum', 'numeric|greater_or_equal[min]');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://aprium.co/codeigniter-extending-form_validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

