<?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>iGeek &#187; Code</title>
	<atom:link href="http://www.igeek.co.za/category/technology/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igeek.co.za</link>
	<description>A Capetonian geek living the life</description>
	<lastBuildDate>Wed, 18 Jan 2012 08:37:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<atom:link rel='hub' href='http://www.igeek.co.za/?pushpress=hub'/>
		<item>
		<title>GitHub For Mac Released</title>
		<link>http://www.igeek.co.za/2011/06/23/github-mac-released/</link>
		<comments>http://www.igeek.co.za/2011/06/23/github-mac-released/#comments</comments>
		<pubDate>Thu, 23 Jun 2011 06:47:45 +0000</pubDate>
		<dc:creator>Gerhard</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Client]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Repository]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.igeek.co.za/?p=2585</guid>
		<description><![CDATA[If you are into coding and own a Mac then this post is for you. GitHub, the web-based project source hosting service has announced an official client for Mac users. GitHub users normally has to make use of command line tools to update and commit to repositories, but the company has now released an official [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-2586" title="GitHub For Mac Released" src="http://www.igeek.co.za/wp-content/uploads/2011/06/github_for_mac-300x110.png" alt="GitHub For Mac Released" width="300" height="110" />If you are into coding and own a Mac then this post is for you. <strong>GitHub</strong>, the web-based project source hosting service has announced an official <strong>client for Mac users</strong>.</p>
<p>GitHub users normally has to make use of command line tools to update and commit to repositories, but the company has now released an official Mac client for GitHub with a complete GUI.</p>
<p><strong>GitHub for Mac</strong> will allow you to manage all your repositories from an easy to use GUI, allowing you to view switch between branches, view commit history, see the diff between certain commits and allow you to perform operations on it.</p>
<p>For more information on GitHub for Mac and to see some screenshots see the <a title="GitHub for Mac Announced" href="https://github.com/blog/878-announcing-github-for-mac" target="_blank">official post on GitHub</a> or go <a title="Download GitHub For Mac" href="http://mac.github.com/" target="_blank">download GitHub for Mac for free here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igeek.co.za/2011/06/23/github-mac-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forrst WP WordPress Plugin</title>
		<link>http://www.igeek.co.za/2010/09/29/forrst-wp-wordpress-plugin/</link>
		<comments>http://www.igeek.co.za/2010/09/29/forrst-wp-wordpress-plugin/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 09:57:55 +0000</pubDate>
		<dc:creator>Gerhard</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Forrst]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Widget]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.igeek.co.za/?p=1756</guid>
		<description><![CDATA[Forrst is a new online community where developers and designers can share inspiring code, links and screenshots. Think of it as a social network for developers and designers out there. Forrst is currently only available on invite and I am lucky enough to be part of this great community, checking in daily to see what [...]]]></description>
			<content:encoded><![CDATA[<p>Forrst is a new online community where developers and designers can share inspiring code, links and screenshots. Think of it as a social network for developers and designers out there.</p>
<p><a title="Forrst A place for Designers and Developers to share inspiring code, screenshots and links with their peers" href="http://www.forrst.com">Forrst</a> is currently only available on invite and I am lucky enough to be part of this great community, checking in daily to see what interesting things like-minded peers are up to.</p>
<p>Forrst recently released a, lets call it API, with limited functionality where you can look up user info and posts for specific users. It got me thinking seeing as I am such a big fan of <a title="WordPress Plugins, Themes, Widgets and news" href="http://www.igeek.co.za/tag/WordPress" target="_blank">WordPress</a>, why not have a nice widget where you can showcase your latest Forrest Post and this is where <strong>Forrst WP</strong> was born.</p>
<p>Forrst WP is a <strong>WordPress</strong> plugin that enables you to place a WordPress <strong>Widget</strong> on your site showing your the latest Forrst Posts for the user you specified. Forrst WP currently has limited functionality seeing that the Forrst API is very restricted at the moment only allowing you to look up posts and user information for specific users.</p>
<p style="text-align: left;"><a href="http://www.igeek.co.za/wp-content/uploads/2010/09/Forrst_WordPress_Widget.png"><img class="aligncenter size-full wp-image-1759" title="Forrst WordPress Widget Plugin" src="http://www.igeek.co.za/wp-content/uploads/2010/09/Forrst_WordPress_Widget.png" alt="Forrst WordPress Widget Plugin" width="500" height="270" /></a>To use Forrst WP, simply download the file below, extract and upload it to your WordPress plugins directory. In you WordPress dashboard under the Plugins menu, activate Forrst WP and then head over to your Widgets and simply drag the Forrst Widget to where you&#8217;d like it and enter the options as desired.</p>
<p style="text-align: left;"><a href="http://www.igeek.co.za/wp-content/uploads/2010/09/forrst-wp.zip">Download Forrst WP v1.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.igeek.co.za/2010/09/29/forrst-wp-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP South African ID Number Validation</title>
		<link>http://www.igeek.co.za/2010/08/27/php-south-african-id-number-validation/</link>
		<comments>http://www.igeek.co.za/2010/08/27/php-south-african-id-number-validation/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 10:22:20 +0000</pubDate>
		<dc:creator>Gerhard</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[ID Number]]></category>
		<category><![CDATA[Luhn Check]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[South Africa]]></category>

		<guid isPermaLink="false">http://www.igeek.co.za/?p=1607</guid>
		<description><![CDATA[It&#8217;s not often that I post some code here on iGeek, which is a pitty because coding is a real passion of mine specially PHP, but sometimes you just write something you need to share with your fellow enthusiasts. Here is a function I wrote in PHP that validates South African ID Numbers based on [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s not often that I post some <a title="Programming, Coding, PHP, Functions, Routines" href="http://www.igeek.co.za/category/technology/code/" target="_blank">code</a> here on iGeek, which is a pitty because coding is a real passion of mine specially PHP, but sometimes you just write something you need to share with your fellow enthusiasts.</p>
<p>Here is a function I wrote in PHP that validates South African ID Numbers based on <a title="Luhn Check Algorithm" href="http://en.wikipedia.org/wiki/Luhn_algorithm" target="_blank">Luhn Check</a>:</p>
<pre>
function ValidateSAIDNumber($idnr) {
	$d = -1;
	$a = 0;
	for($i=0;$i<6;$i++)
		$a += substr($idnr,$i*2,1);
	for($i=0;$i<6;$i++)
		$b = $b * 10 + substr($idnr,(2*$i)+1,1);
	$b *= 2;
	$c = 0;

	while($b > 0) {
		$c += $b % 10;
		$b = $b / 10;
	}
	$c += $a;
	$d = 10 - ($c % 10);
	if($d == 10)
		$d = 0;
	if($d == substr($idnr,strlen($idnr)-1,1))
		return true;
	else
		return false;
}
</pre>
<p>To use simply call ValidateSAIDNumber(IDNR) where IDNR is the South African ID Number and it will either return true if its a valid number or false if its not.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igeek.co.za/2010/08/27/php-south-african-id-number-validation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>HTML5: Are you as Web Developer ready?</title>
		<link>http://www.igeek.co.za/2010/05/10/html5-are-you-as-web-developer-ready/</link>
		<comments>http://www.igeek.co.za/2010/05/10/html5-are-you-as-web-developer-ready/#comments</comments>
		<pubDate>Mon, 10 May 2010 07:54:36 +0000</pubDate>
		<dc:creator>Gerhard</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[HTML 5]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Developer]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.igeek.co.za/?p=1203</guid>
		<description><![CDATA[It is without a doubt that HTML5 is the future of the web. With almost all the major web browsers already starting to support HTML5 what has you as Web Developer done to become familiar with HTML5? With HTML5 allot can be done using only HTML and Javascript code where previously Flash or Silverlight was [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-1204" title="HTML5 Are you as Web Developer ready?" src="http://www.igeek.co.za/wp-content/uploads/2010/05/html5-300x240.jpg" alt="HTML5 Are you as Web Developer ready?" width="210" height="168" />It is without a doubt that HTML5 is the future of the web. With almost all the major web browsers already starting to support HTML5 what has you as <a title="Need a Web Developer?" href="http://www.igeek.co.za/about/" target="_blank">Web Developer</a> done to become familiar with HTML5?</p>
<p>With HTML5 allot can be done using only HTML and Javascript code where previously Flash or Silverlight was needed to accomplish the same task. Things like video and audio playback can be done natively with HTML5 without the need for any third party application. Developing 2D and 3D games also just became allot easier. With the new HTML5 canvas developers can now do 2D and 3D graphics with just a few simple lines of Javascript code.</p>
<p>The question is what have you as Web Developer done to become more familiar with the new HTML5 capabilities? Have you started reading up on it and tried your hand at some examples?</p>
<p>Most mobile phones out there today does not support Flash or Silverlight, even the new iPad which I would say was designed to be a web device does not support these third party applications, but one thing they do support is HTML5. This is why I would say it is so important for Web Developers to start experimenting with HTML5.</p>
<p>I took the weekend to do some tests and familiarise myself with HTML5 and I must say I am impressed. I will be doing some basic tutorials during the next couple of days to showcase the capabilities of HTML5 and just how easy it really is.</p>
<p>Are you HTML5 ready?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igeek.co.za/2010/05/10/html5-are-you-as-web-developer-ready/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter counts down to the OAuthcalypse</title>
		<link>http://www.igeek.co.za/2010/04/25/twitter-counts-down-to-the-oauthcalypse/</link>
		<comments>http://www.igeek.co.za/2010/04/25/twitter-counts-down-to-the-oauthcalypse/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 17:31:33 +0000</pubDate>
		<dc:creator>Gerhard</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[Basic Authentication]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.igeek.co.za/?p=1114</guid>
		<description><![CDATA[Every Twitter developer has been made aware that this day may come, and now the date has been set for the termination of basic authentication on the Twitter API. Twitter is to terminate support for basic authentication on the 30th of June 2010, from that day any applications that makes use of the Twitter basic [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-1115 alignleft" title="Twitter to kill Basic Authentication, switch to OAuth" src="http://www.igeek.co.za/wp-content/uploads/2010/04/oauth-icon-150x150.png" alt="Twitter to kill Basic Authentication, switch to OAuth" width="150" height="150" />Every Twitter developer has been made aware that this day may come, and now the date has been set for the termination of basic authentication on the Twitter API.</p>
<p><a title="Follow me on Twitter" href="http://twitter.com/diekloon" target="_blank">Twitter</a> is to terminate support for basic authentication on the 30th of June 2010, from that day any applications that makes use of the Twitter basic authentication method to log users into the service won&#8217;t work anymore.</p>
<p>Good news is that there is an alternative method and is much safer way to use your Twitter credential to access services. It&#8217;s called OAuth and it does not require users to enter any of their credentials, the service will just redirect you to the Twitter service once and ask if you give permission to the application to access your service.</p>
<p>Facebook also recently introduced their brand new Graph API that is basically equivalent to Twitter&#8217;s API in the sense that it also makes use of RESTfull calls and uses OAuth for authentication.</p>
<p>If your Twitter application is still using basic authentication to retrieve data it&#8217;s time to switch over to OAuth as you only have 9 weeks left before your application won&#8217;t function anymore. Please note that this only applies to the RESTfull API and not the streaming API. Check out the count down timer <a title="Countdown to Twitter Basic Auth removal" href="http://www.countdowntooauth.com/" target="_blank">here</a>.</p>
<p>For more on how to use OAuth for your Twitter applications visit the <a title="Enable OAuth for your Twitter Application" href="http://developer.twitter.com/pages/auth" target="_blank">Twitter Developers Authentication page</a>.</p>
<p>I made <a title="TweSMS Twitter to SMS notifications" href="http://www.twesms.com" target="_blank">TweSMS</a> use OAuth from the start, is your application OAuth ready?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igeek.co.za/2010/04/25/twitter-counts-down-to-the-oauthcalypse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress goes real-time with PubSubHubbub</title>
		<link>http://www.igeek.co.za/2010/03/03/wordpress-goes-real-time-with-pubsubhubbub/</link>
		<comments>http://www.igeek.co.za/2010/03/03/wordpress-goes-real-time-with-pubsubhubbub/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 18:24:28 +0000</pubDate>
		<dc:creator>Gerhard</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Blog Aggregators]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[Blogs]]></category>
		<category><![CDATA[PubSubHubbub]]></category>
		<category><![CDATA[PuSH]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.igeek.co.za/?p=860</guid>
		<description><![CDATA[WordPress just released the wonderful news that every self hosted WordPress site out there is about to get more real-time thanks to some new behind the scenes developments. WordPress announced on its official blog that it has turned on support for PubSubHubbub, yeah that&#8217;s a mouth full, a move that will get RSS content of [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-861" title="WordPress goes real-time with PubSubHubbub" src="http://www.igeek.co.za/wp-content/uploads/2010/03/wordpress-150x150.jpg" alt="WordPress goes real-time with PubSubHubbub" width="150" height="150" />WordPress just released the wonderful news that every self hosted WordPress site out there is about to get more real-time thanks to some new behind the scenes developments.</p>
<p>WordPress <a title="Rub a dub dub in the PubSubHubbub" href="http://en.blog.wordpress.com/2010/03/03/rub-a-dub-dub-in-the-pubsubhubbub/" target="_blank">announced on its official blog</a> that it has turned on support for PubSubHubbub, yeah that&#8217;s a mouth full, a move that will get RSS content of WordPress blogs to RSS readers like Google Reader or Bloglines in real-time.</p>
<p>How RSS feeds current works is readers poll the feed every few minutes checking if there is new content available, how it will work with PubSubHubbub is that the WordPress blogs will now push the feeds to the respective RSS readers as new content is posted.</p>
<p>Just today I wrote an <a title="MyScoop, Afrigator, Amatomu: The South African Blog Aggregators" href="http://www.igeek.co.za/2010/03/03/myscoop-afrigator-amatomu-the-sa-blog-aggregators/" target="_blank">article on the South African blog aggregators</a>, this now opens up a hole new field for them as well. Blog aggregators like MyScoop and Afrigator will now have the ability to get your content in real time without you needing to log into the aggregator and ping your blogs. Real-time aggregation, I would like to hear if the local blog aggregators will make use of this service.</p>
<p>Here is a nice demo of PuSH (PubSubHubbub) in what WordPress call a &#8220;cheesy video&#8221;, for even more info on the PuSH protocol you can head over to the <a title="PubSubHubbub Project Page" href="http://code.google.com/p/pubsubhubbub/" target="_blank">PuSH project page</a>.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/B5kHx0rGkec&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en_GB&amp;feature=player_embedded&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/B5kHx0rGkec&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en_GB&amp;feature=player_embedded&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.igeek.co.za/2010/03/03/wordpress-goes-real-time-with-pubsubhubbub/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>PHP5 json_decode bug</title>
		<link>http://www.igeek.co.za/2010/01/26/php5-json_decode-bug/</link>
		<comments>http://www.igeek.co.za/2010/01/26/php5-json_decode-bug/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 09:40:20 +0000</pubDate>
		<dc:creator>Gerhard</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[json_decode]]></category>
		<category><![CDATA[PHP5]]></category>

		<guid isPermaLink="false">http://www.igeek.co.za/?p=702</guid>
		<description><![CDATA[With my latest project TweSMS I decided to go the json route with the twitter API. Now if you have worked with the twitter API before you would know that twitter has some serious big id values thus it was important to store these values in big int fields in the database. I first discovered [...]]]></description>
			<content:encoded><![CDATA[<p>With my latest project <a href="http://www.igeek.co.za/2010/01/26/twesms-gets-new-features/">TweSMS</a> I decided to go the json route with the twitter API. Now if you have worked with the twitter API before you would know that twitter has some serious big id values thus it was important to store these values in big int fields in the database.</p>
<p>I first discovered the bug when I had to get mention ids from twitter and saw that every time I get the same id returned, the id returned was 2147483647 the maximum value a 32 bit integer can store. After some investigation I found that the php5 json_decode function converted big int values to a normal 32bit integer. With the help of some regex I soon came up with a fix for this, the fix is to convert the integer to a string.</p>
<blockquote><p>function jsonIntToStr($json){<br />
$pattern = &#8220;/\&#8221;id\&#8221;:([0-9]+),/&#8221;;<br />
$replace = &#8220;\&#8221;id\&#8221;:\&#8221;$1\&#8221;,&#8221;;<br />
$new_json = preg_replace($pattern, $replace, $json);<br />
return $new_json;<br />
}</p></blockquote>
<p>To use this replace id with the json fields you are trying to convert to string and call it like this json_decode(jsonIntToStr($jsonstring))</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igeek.co.za/2010/01/26/php5-json_decode-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Maps coming to Cape Town</title>
		<link>http://www.igeek.co.za/2009/10/28/google-maps-coming-to-cape-town/</link>
		<comments>http://www.igeek.co.za/2009/10/28/google-maps-coming-to-cape-town/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 06:24:48 +0000</pubDate>
		<dc:creator>Gerhard</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Cape Town]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Promotions]]></category>
		<category><![CDATA[Basic Knowledge]]></category>
		<category><![CDATA[Business Product]]></category>
		<category><![CDATA[Computer Science Students]]></category>
		<category><![CDATA[Css Xml]]></category>
		<category><![CDATA[Driving Directions]]></category>
		<category><![CDATA[Geographical Data]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Javascript Techniques]]></category>
		<category><![CDATA[launch]]></category>
		<category><![CDATA[Local Business Listings]]></category>
		<category><![CDATA[Maps Africa]]></category>
		<category><![CDATA[Maps South Africa]]></category>
		<category><![CDATA[Oppertunity]]></category>
		<category><![CDATA[Place Markers]]></category>
		<category><![CDATA[Rsvp]]></category>
		<category><![CDATA[South Africa Cape Town]]></category>
		<category><![CDATA[Town Speakers]]></category>
		<category><![CDATA[Uct]]></category>
		<category><![CDATA[Web Masters]]></category>

		<guid isPermaLink="false">http://www.igeek.co.za/?p=490</guid>
		<description><![CDATA[Google organises the world&#8217;s information and makes it accessible to all. Information also comes in the shape of geographical data, local business listings and user generated maps, and for this reason Google would like to invite you to the Google Maps South Africa launch. Google is now giving Capetonians the oppertunity to take part in [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-491" title="Google Maps Cape Town" src="http://www.igeek.co.za/wp-content/uploads/2009/10/google-300x211.jpg" alt="Google Maps Cape Town" width="300" height="211" /></p>
<p><a title="Google Maps South Africa Launch" href="http://www.google.com" target="_blank">Google</a> organises the world&#8217;s information and makes it accessible to all.  Information also comes in the shape of geographical data, local business listings and user generated maps, and for this reason Google would like to invite you to the <a title="Google Maps South Africa" href="http://maps.google.com" target="_blank">Google Maps</a> South Africa launch.</p>
<p>Google is now giving Capetonians the oppertunity to take part in the launch of Google Maps in South Africa, on <strong>Friday the 30th of October at UCT in Cape Town</strong>.</p>
<p>Speakers will include Jarda Bengl, Business Product Manager, Google.</p>
<p>The talk will cover Introduction to development with the Google Maps API.<br />
They&#8217;ll show some examples of great implementations, then cover the basics of how to add a map to your site  including Javascript techniques to create maps, place markers, handle clicks, geocode addresses, add driving directions and how to work with Street View.</p>
<p>Just note that basic knowledge of <a title="Express Hypotext Marker Literature" href="http://en.wikipedia.org/wiki/XHTML" target="_blank">XHTML</a>, <a title="Cascading Style Sheets" href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" target="_blank">CSS</a>, <a title="Extensible Markup Language" href="http://en.wikipedia.org/wiki/XML" target="_blank">XML</a> and <a title="JavaScript is an object-oriented scripting language used to enable programmatic access to objects within both the client application and other applications" href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">Javascript</a> is required.</p>
<p>Everybody is welcome from Developers and Web Masters who are new to Google Maps API, Computer Science Students.</p>
<p>To ensure you place is booked for the Google Maps South Africa, Cape Town launch just leave a comment and I&#8217;ll send through the rsvp email address.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igeek.co.za/2009/10/28/google-maps-coming-to-cape-town/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to mirror Wikipedia</title>
		<link>http://www.igeek.co.za/2009/10/16/how-to-mirror-wikipedia/</link>
		<comments>http://www.igeek.co.za/2009/10/16/how-to-mirror-wikipedia/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 10:15:22 +0000</pubDate>
		<dc:creator>Gerhard</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Apache Mysql]]></category>
		<category><![CDATA[Basic Knowledge]]></category>
		<category><![CDATA[Database Dump]]></category>
		<category><![CDATA[Extensive Research]]></category>
		<category><![CDATA[Internet Connection]]></category>
		<category><![CDATA[Local Network]]></category>
		<category><![CDATA[Localhost]]></category>
		<category><![CDATA[Lookout]]></category>
		<category><![CDATA[Mediawiki]]></category>
		<category><![CDATA[Mirror]]></category>
		<category><![CDATA[Mirror Wikipedia]]></category>
		<category><![CDATA[Mv]]></category>
		<category><![CDATA[Mysql Server]]></category>
		<category><![CDATA[Mysql Set]]></category>
		<category><![CDATA[Network Speeds]]></category>
		<category><![CDATA[Privileges]]></category>
		<category><![CDATA[Root Password]]></category>
		<category><![CDATA[Running]]></category>
		<category><![CDATA[Server Mysql]]></category>
		<category><![CDATA[Tar Xf]]></category>
		<category><![CDATA[Wikipedia]]></category>

		<guid isPermaLink="false">http://www.igeek.co.za/?p=476</guid>
		<description><![CDATA[Being part of CTWUG we are alway on the lookout for new services to run on our network that could prove usefull to the users of the CTWUG network. The latest idea we got was to provide users with a local copy of the Wikipedia website, this would enable CTWUG users to view wikipedia content [...]]]></description>
			<content:encoded><![CDATA[<p>Being part of <a title="CTWUG Cape Town Wireless User Group" href="http://www.ctwug.za.net/" target="_blank">CTWUG</a> we are alway on the lookout for new services to run on our network that could prove usefull to the users of the CTWUG network.</p>
<p>The latest idea we got was to provide users with a local copy of the <a title="Wikipedia - The Free encyclopedia anyone can edit" href="http://www.wikipedia.org" target="_blank">Wikipedia</a> website, this would enable CTWUG users to view wikipedia content at local network speeds without having an internet connection.</p>
<p>After extensive research I came across <a title="How to mirror wikipedia" href="http://modzer0.cs.uaf.edu/~dev2c/wiki/How_to_mirror_Wikipedia" target="_blank">this nice tutorial</a> on how to run your own copy of Wikipedia from a database dump of the real Wikipedia website. Who whould have thought that Wikipedia would offer a montly database dump of their Website for users to download, good news is that they do.</p>
<p>I&#8217;ll provide the steps for you to follow to set up your own Wikipedia mirror, please note basic knowledge of linux, bash, apache and mysql is required. The steps is for installing the mirror on a <strong>Ubuntu</strong> machine.</p>
<p>So here is the steps for setting up your own Wikipedia mirror from their database dump.</p>
<ol>
<li>Install LAMP: Linux Apache MySQL PHP
<pre>apt-get update
apt-get install apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql phpmyadmin</pre>
</li>
<li>Setup MySQL: You need to set your mysql root password
<pre>$ mysql
mysql&gt; USE mysql;
mysql&gt; UPDATE user SET Password=PASSWORD(’new-password’) WHERE user=’root’;
mysql&gt; FLUSH PRIVILEGES;</pre>
<p>You also need to create a database for your incoming Wikipedia. Go to <a title="http://localhost/" rel="nofollow" href="http://localhost/">http://localhost/</a> and click on phpmyadmin. Log in using your new root password. Under <em>Create new database</em>, enter <code>wikidb</code> and click Create. On the new page, click on Privileges, add the new user <code>wikiuser</code> and click <code>check all</code>, then <code>Go</code>.</li>
<li>Download the MediaWiki software: This is the software wikipedia is running on. Go to the <a title="http://www.mediawiki.org/wiki/Download" rel="nofollow" href="http://www.mediawiki.org/wiki/Download">MediaWiki download page</a>. On the right, download the .tar.gz file.
<pre>wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz</pre>
<p>Decompress it and move it to /var/www/</p>
<pre>tar xf mediawiki-1.15.1.tar.gz
mv mediawiki-1.15.1.tar.gz wikipedia
sudo mv wikipedia /var/www/</pre>
<p>I am installing it under the directory wikipedia.<br />
Change the file permissions of the config directory</p>
<pre>cd /var/www/wikipedia/
chmod a+x config/</pre>
<p>Now navigate to http://localhost/wikipedia/ From here, the only things you need to put in are</p>
<ul>
<li>Site name (I chose WikiMirror)</li>
<li>WikiSysop&#8217;s password (The administrator password)</li>
<li>DB password</li>
</ul>
<p>Now you need to move LocalSettings.php out of config.</p>
<pre>mv config/LocalSettings.php</pre>
<p>Now you can go to http://localhost/wikipedia/ and you should see your virgin MediaWiki install!</li>
<li> Get Wikipedia&#8217;s database dumpYou can get the latest version of Wikipedia&#8217;s database dump by subscribing to http://download.wikimedia.org/enwiki/latest/enwiki-latest-pages-articles.xml.bz2-rss.xml the latest file I got was http://download.wikimedia.org/enwiki/20091009/enwiki-20091009-pages-articles.xml.bz2
<pre>wget http://download.wikimedia.org/enwiki/20091009/enwiki-20091009-pages-articles.xml.bz2</pre>
<p>The file is 5.2GB so it should take a while to download.<br />
After downloading decompress the file</p>
<pre>tar xf enwiki-20091009-pages-articles.xml.bz2</pre>
<p>The uncompressed size is almost 20 GB so be sure you have enough disk space available.<br />
Now for the lenghty part of the process, you need to import the file into your mysql database.<br />
Download <a href="http://meta.wikimedia.org/wiki/Data_dumps/mwimport">mwimport.sh</a> and save it and run it like this</p>
<pre>cat enwiki-&lt;date&gt;.xml | mwimport | mysql -f -u &lt;admin name&gt; -p &lt;database name&gt;</pre>
<p>This process should take a few hours to complete, from 7-12 hours depending on your HDD speed and processor.</li>
</ol>
<p>That should be all, if all went well your will have a complete working copy of wikipedia on your local machine. CTWUG members can look forward to this service very soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igeek.co.za/2009/10/16/how-to-mirror-wikipedia/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>WordPress change author comment background</title>
		<link>http://www.igeek.co.za/2009/10/09/wordpress-change-author-comment-background/</link>
		<comments>http://www.igeek.co.za/2009/10/09/wordpress-change-author-comment-background/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 06:23:37 +0000</pubDate>
		<dc:creator>Gerhard</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Author Background]]></category>
		<category><![CDATA[Background Color]]></category>
		<category><![CDATA[Background Colour]]></category>
		<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Comment]]></category>
		<category><![CDATA[Comments Section]]></category>
		<category><![CDATA[Css File]]></category>
		<category><![CDATA[Hex Value]]></category>
		<category><![CDATA[Li Class]]></category>
		<category><![CDATA[Lt]]></category>
		<category><![CDATA[Php Echo]]></category>
		<category><![CDATA[Style Css]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.igeek.co.za/?p=467</guid>
		<description><![CDATA[Lately I have noticed that when I leave comments sometimes the readers leaving comments aswell has no idea that I am the author of the post. This made me realise that I had to find a way of showing that I am the author of the posts in the comments section. After some consideration I [...]]]></description>
			<content:encoded><![CDATA[<p>Lately I have noticed that when I leave comments sometimes the readers leaving comments aswell has no idea that I am the author of the post. This made me realise that I had to find a way of showing that I am the author of the posts in the comments section.</p>
<p>After some consideration I decided on just changing the background colour of my comments, I&#8217;ve seen many other blogs using this approach and it seems to work well and looks nice and clean.</p>
<p>Here is how I did it:</p>
<p>Open up comments.php and find</p>
<blockquote><p>&lt;li class=&#8221;&lt;?php echo $oddcomment; ?&gt;&#8221; id=&#8221;comment-&lt;?php comment_ID() ?&gt;&#8221;&gt;</p></blockquote>
<p>Replace it with</p>
<blockquote><p>&lt;li class=&#8221;&lt;?php if (1 == $comment-&gt;user_id) $oddcomment = &#8220;authorcomment&#8221;;</p>
<p>echo $oddcomment; ?&gt;&#8221; id=&#8221;comment-&lt;?php comment_ID() ?&gt;&#8221;&gt;</p></blockquote>
<p>After that add the following to you style.css file</p>
<blockquote><p>.authorcomment {<br />
background-color: #B3FFCC !important;<br />
}</p></blockquote>
<p>And that is it, all the comments made by admin will now be displayed with a background colour. If you would like to change the background colour just modify the hex value you put in the style.css file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.igeek.co.za/2009/10/09/wordpress-change-author-comment-background/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

