<?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>Scott Yang's Playground &#187; Playground</title>
	<atom:link href="http://scott.yang.id.au/tag/playground/feed/" rel="self" type="application/rss+xml" />
	<link>http://scott.yang.id.au</link>
	<description>Faith, Technology and Randomness in Life, According to Scott</description>
	<lastBuildDate>Thu, 09 Feb 2012 09:01:12 +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>New Theme</title>
		<link>http://scott.yang.id.au/2006/07/new-theme/</link>
		<comments>http://scott.yang.id.au/2006/07/new-theme/#comments</comments>
		<pubDate>Wed, 05 Jul 2006 04:37:00 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Playground]]></category>
		<category><![CDATA[Webmastery]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/07/new-theme/</guid>
		<description><![CDATA[I have updated Playground to a new WordPress theme. It&#8217;s pretty much derived from the old theme, 100% hand coded. These are the things I want from a new theme. Simple one column layout. White background, dark gray fonts, and nothing fancy. Bigger text font. Probably better for those who do not have 20-20 eye [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://scott.yang.id.au/file/images/playground-v2.png" alt="Playground v2" width="300" height="208" class="floaty" style="border:1px solid #888"/> I have updated Playground to a new WordPress theme. It&#8217;s pretty much derived from the old theme, 100% hand coded. These are the things I want from a new theme.</p>
<ul>
<li><strong>Simple one column layout</strong>. White background, dark gray fonts, and nothing <em>fancy</em>.</li>
<li><strong>Bigger text font</strong>. Probably better for those who do not have 20-20 eye sight, but it also looks better with a wide one column layout with no sidebar.</li>
<li><strong>Fixed 728px column</strong>. That&#8217;s about 50 pixels wider than the old theme, so I can fit a 728&#215;90 leaderboard across the top :)</li>
<li><strong>Breadcrumb at top</strong>. I find them helpful for navigation, also tells the visitors where they are.</li>
<li><strong>Extended footer</strong>. All the guts on the sidebar (<em>actually I did not even have a sidebar before!</em>) are now moved to multiple columns in the footer.</li>
</ul>
<p>Everything else pretty much retained from the old theme &#8212; quickies on the home page, gravatar integration, etc. I am still tuning the layouts and fixing bugs, especially those browser incompatibilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/07/new-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AdSense Preview for Firefox</title>
		<link>http://scott.yang.id.au/2006/03/adsense-preview-for-firefox/</link>
		<comments>http://scott.yang.id.au/2006/03/adsense-preview-for-firefox/#comments</comments>
		<pubDate>Mon, 20 Mar 2006 06:39:56 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[AdSense]]></category>
		<category><![CDATA[Playground]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/03/adsense-preview-for-firefox/</guid>
		<description><![CDATA[AdSense Preview Tool for Firefox. It basically just creates a pop up window showing what ads would appear on the web page you are looking at, if Google AdSense is used. Very useful for deciding whether you should put AdSense on your website. However it does not have localisation preview like the &#8220;official&#8221; preview tool, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.yellowpipe.com/yis/tools/adsense-preview/">AdSense Preview Tool</a> for Firefox. It basically just creates a pop up window showing what ads would appear on the web page you are looking at, if Google AdSense is used. Very useful for deciding whether you should put AdSense on your website. However it does not have localisation preview like the &#8220;official&#8221; preview tool, so I cannot see what the US readers have seen.</p>
<p>Another interesting use is, using this preview tool to see how Google categorises your website. On my index page, I got:</p>
<ul>
<li>Free Bible Study Course (who are United Church of God?)</li>
<li>Apostolic Sermon Outlines (pentecostal sermons, yik!)</li>
<li>Martin Luther King Jr. (biography software)</li>
<li>Voice of the Martyrs (VoM Australia &#8212; do they advertise as well?)</li>
<li>Flying Colors (get rich quick via property scheme)</li>
<li>Free Bible Software (enter Jesus survey and win $300, what?!)</li>
</ul>
<p>Seems to be Christianity-biased, although less than a quarter of my posts are about church and Christianity. Still, more than half of those ads are <em>dodgy</em>, and now I feel sorry for those who have actually clicked on them.</p>
<p><b>Update</b>: I actually <a href="http://scott.yang.id.au/2003/10/googles-contextual-advertise/">wondered the same thing</a> two and half years ago!</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/03/adsense-preview-for-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domain Transferred to IntaServe</title>
		<link>http://scott.yang.id.au/2006/02/domain-transferred-to-intaserve/</link>
		<comments>http://scott.yang.id.au/2006/02/domain-transferred-to-intaserve/#comments</comments>
		<pubDate>Fri, 24 Feb 2006 14:01:40 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Domain]]></category>
		<category><![CDATA[Playground]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/domain-transferred-to-intaserve/</guid>
		<description><![CDATA[After my article on Bargain Blog about the cheapest .au registrar, I decided to transfer my yang.id.au domain from NameScout, whom I registered with since July 2002, to IntaServe, because it is (a) $2/year cheaper (b) having an Australian contact number. However, the transfer didn&#8217;t proceed that smoothly. Transfer Saga 2 Feb: Order went in [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://scott.yang.id.au/file/images/intaserve.gif" alt="IntaServe" class="floaty"/> After my article on Bargain Blog about <a href="http://blog.ozbargain.com.au/2006/intaserve-cheapest-au/">the cheapest .au registrar</a>, I decided to transfer my <strong>yang.id.au</strong> domain from <a href="http://www.namescout.com.au/">NameScout</a>, whom I registered with <a href="http://scott.yang.id.au/2002/07/update-quickies/">since July 2002</a>, to <a href="http://www.intaserve.com/">IntaServe</a>, because it is (a) $2/year cheaper (b) having an Australian contact number.</p>
<p>However, the transfer didn&#8217;t proceed that smoothly.</p>
<h3 id="toc-transfer-saga">Transfer Saga</h3>
<p><strong>2 Feb</strong>: Order went in after I fill out their on-line renewal form, and straight away I received a confirmation email. So far so good.</p>
<p><strong>3 Feb</strong>: IntaServe&#8217;s support emailed me to ask me to forward them my domain password, as it should have been sent to the email address that I have registered with NameScout. Except &#8212; doing a WHOIS reveals that domain owner email is the obfuscated/randomly generated NameScout email address that is not even reachable! Thanks to the super secure &#8220;privacy-protection&#8221; feature. IntaServe&#8217;s support did made a remark saying &#8220;NameScout&#8221; and &#8220;Enom&#8221; are known to be difficult to transfer. Oh well.</p>
<p>Alright. I&#8217;ve unlocked the domain, and unchecked the privacy &#8220;feature&#8221;. Doing a WHOIS still reveals old email, and IntaServe still cannot get the domain password over to me. So being lazy, I think I&#8217;ll just wait and see whether WHOIS gets updated.</p>
<p>A few days passed &#8212; and I almost forgot about it&#8230;</p>
<p><strong>14 Feb</strong>: IntaServe sent me another email reminding me about the domain password. I then checked WHOIS, and its information has finally successfully updated to my real email address. Replied IntaServe about the update, and pretty much straight away the domain password landed in my inbox, which I need to forward to them to initialise the transfer. All good from now.</p>
<p><strong>16 Feb</strong>: WHOIS now showing transfer pending. It&#8217;s not as fast and as easy as .com/.net/.org transfers, but at least it is moving.</p>
<p><strong>18 Feb</strong>: All done now. Registrar for my domain now shows &#8220;IntaServe&#8221; under WHOIS. They sent me an email telling me that all domain related information will be retained untouched, i.e. my contact information, DNS, etc. That&#8217;s good. Basically I don&#8217;t have to do anything and the service continues as usual.</p>
<p>Well, it is quite a bit of drama to try to save $2 a year, but at the same time I prefer to pay to someone whose office is in Sydney than in Barbados.</p>
<p>Would I recommend IntaServe? Hmm, maybe not. <em>You pay peanuts, and you get monkeys</em>.</p>
<p>I am not saying that their service is not good &#8212; in fact thanks to TT from IntaServe handling my case to have my domain transferred. And once domain is registered, there is hopefully nothing much you need to have service for.</p>
<p>Until I try to manage my domain.</p>
<h3 id="toc-intaserve-domain-management">IntaServe Domain Management</h3>
<p>Basically, I was presented with the raw WHOIS management page when I need to change details about my domain. I need to login with my domain name and the domain password (instead of an IntaServe account ID), and then there is the control panel &#8212; a single page where you need to manually type in space deliminated NS, registrant handle, etc.</p>
<p>For example if I want to update my address, I will need to create a new contact handle with my new address, because my old handle, created by NameScout, never came with a password &#8212; all hidden by NameScout&#8217;s management interface. After my handle is created, I then need to paste that ID into domain&#8217;s management page.</p>
<p>And I still haven&#8217;t figure out how to change my renewal instruction. Support email sent &#8212; still waiting for replies.</p>
<p>With a great price and Sydney-based contact, IntaServe can be a good registrar for bargain hunters &#8212; only if they can have a good management software. Since they are new, I am hoping that they will eventually upgrade their software to be more user friendly.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/02/domain-transferred-to-intaserve/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Robots.txt Stuff up</title>
		<link>http://scott.yang.id.au/2006/01/robotstxt-stuff-up/</link>
		<comments>http://scott.yang.id.au/2006/01/robotstxt-stuff-up/#comments</comments>
		<pubDate>Fri, 13 Jan 2006 23:53:29 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Playground]]></category>
		<category><![CDATA[Webmastery]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2006/01/robotstxt-stuff-up/</guid>
		<description><![CDATA[Stupid thing I did this week: In the process of moving Bargain Blog back to my own home server, I somehow rsync&#8217;ed my entire design/test site, including the robots.txt, which contains deadly commands to forbid all bots/spiders! No wonder for the last few days my AdSense ads on that site are totally irrelevant, and CTR [...]]]></description>
			<content:encoded><![CDATA[<p>Stupid thing I did this week:</p>
<p>In the process of moving <a href="http://blog.ozbargain.com.au/">Bargain Blog</a> back to <a href="http://scott.yang.id.au/2006/01/moving-back-and-forth/">my own home server</a>, I somehow rsync&#8217;ed my entire design/test site, <strong>including the <code>robots.txt</code></strong>, which contains deadly commands to forbid all bots/spiders!</p>
<p style="text-align:center"><img src="http://scott.yang.id.au/file/images/user-agent-stuff-up.jpg" alt="Stuffed up my robots.txt"/></p>
<p>No wonder for the last few days my AdSense ads on that site are totally irrelevant, and CTR plumbs all the way below 1% &#8212; Google wants to help but can&#8217;t! Now I have fixed the file, and please come back media partner bots!</p>
<p>Btw, I use <a href="http://www.cis.upenn.edu/~bcpierce/unison/">Unison</a> to synchronise content between my design sites and actual sites. Not as sophisticated as Glenn&#8217;s <a href="http://blog.slaven.net.au/archives/2006/01/13/subversion-in-all-its-coolness/">Subversion solution</a> as I don&#8217;t really care about version control, but it does a much better job than rsync because it has (1) two-way synchronisation (2) comprehensive configuration options, which should have easily solve my stupidity.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2006/01/robotstxt-stuff-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Issue with New Blogs</title>
		<link>http://scott.yang.id.au/2005/09/issue-with-new-blogs/</link>
		<comments>http://scott.yang.id.au/2005/09/issue-with-new-blogs/#comments</comments>
		<pubDate>Sat, 17 Sep 2005 01:31:02 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Playground]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/09/issue-with-new-blogs/</guid>
		<description><![CDATA[Almost two weeks ago I launched my new programming/Internet blogsite. It does not make me write more &#8212; actually due to my current schedules I actually wrote less. All it did was splitting up the content, so that my programming and Internet related posts get filed elsewhere. Good idea, as I have originally thought, and [...]]]></description>
			<content:encoded><![CDATA[<p>Almost two weeks ago I launched <a href="http://scott.yang.id.au/2005/09/new-blog-fucodercom/">my new programming/Internet blogsite</a>. It does not make me write more &#8212; actually due to my current schedules I actually wrote less. All it did was splitting up the content, so that my programming and Internet related posts get filed elsewhere.</p>
<p>Good idea, as I have originally thought, and as some commenters have also suggested. However, there are also some issues that I have discovered this week.</p>
<p>I think the biggest problem is &#8220;traffic&#8221;. Being honest, many bloggers do not really write for the sake of writing, but they also write, seeking the satisfaction that their work can be read by many. How do you get traffic? Besides good content to start with, your site linked by other relevant sites, optimised and well structured, before it can be favoured by search engines.</p>
<p>My Playground site has been on the net for 3-4 years, and sometimes even I myself was surprised why certain keywords on SE would bring visitors to my site. For example, searching for <a href="http://www.google.com.au/search?hl=en&amp;q=ipod%20nano&amp;meta=cr%3DcountryAU">iPod Nano</a> in Google Australia would see my very brief post sitting there on the first page (and resulting <strong>60%</strong> of my AdSense earning last week).</p>
<p>It was initially just a quickie post &#8212; one paragraph, no real content, but somehow drew visitors who were thinking of buying the latest gadget from Apple and then clicked on the ads. See how useless content in a relatively-popular site can be escalated in terms of importance?! I have no complain about that.</p>
<p>On the other hand, my <a href="http://fucoder.com/2005/08/feedparser-atom-10-patch/">feedparser Atom 1.0 patch</a> on my new site, while considered more useful, can hardly be located on the search engines. I know quite a few people actually searched for it, and Uche Ogbuji from XML.com actually <a href="http://www.xml.com/pub/a/2005/09/14/processing-atom-in-python.html?page=3">made his own feedparser hack to get it working for Atom 1.0</a> (and thanks to <a href="http://plasmasturm.org/">Aristotle</a> for plugging me in many places).</p>
<p>What can I say?! Playground has PR 5, but FuCoder has no PR at all.</p>
<p>I wonder how many other &#8220;treasures&#8221; can hardly be located due to bad PageRank on the site.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/09/issue-with-new-blogs/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New Blog &#8212; FuCoder.com</title>
		<link>http://scott.yang.id.au/2005/09/new-blog-fucodercom/</link>
		<comments>http://scott.yang.id.au/2005/09/new-blog-fucodercom/#comments</comments>
		<pubDate>Tue, 06 Sep 2005 04:20:41 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Playground]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/?p=1152</guid>
		<description><![CDATA[There have been basically two types of &#8220;readers&#8221; on this blog. One is either my family, friends, church friends or other strangers who are interested in part of my daily life, my Christian opinions, and my occasional rant over things that do not really matter. They got bored reading posts with too many tech jargons, [...]]]></description>
			<content:encoded><![CDATA[<p>There have been basically two types of &#8220;readers&#8221; on this blog.</p>
<p> One is either my family, friends, church friends or other strangers who are  interested in part of my daily life, my Christian opinions, and my occasional rant over things that do not really matter. They got bored reading posts with too many tech jargons, and they&#8217;ll usually skip an entry if occurrence of words like &#8220;WordPress&#8221;, &#8220;Python&#8221; or &#8220;Google&#8221; exceeds their fairly minimal threshold.</p>
<p>The other is the complete opposite. They usually landed here in the first place via a search engine, looking for WordPress plugins, Javascript hacks or code pieces, and then they stayed reading other craps I wrote. They have absolutely no interest in who this &#8220;Scott Yang&#8221; guy is, the belief he has, or other things he does besides programming.</p>
<p>I know it is not that polarised, and some people ought to jump up and down now yelling &#8220;I am neither!&#8221; or &#8220;I am both!&#8221; Well, consider yourself a minority and move on :)</p>
<p>That was the whole point behind this new site that I am setting up. Let me introduce you my new blogsite: <a href="http://fucoder.com/">FuCoder.com</a>.</p>
<p style="text-align:center"><img src="http://scott.yang.id.au/file/images/fucoder.jpg" alt="FuCoder.com" style="padding:5px;border:1px solid #888;"/></p>
<p>From now one, I will be blogging more tech-oriented material on FuCoder.com, sparing some of you guys from tech buzz word overload. I shall gradually move all my coding projects that I have previously posted here over to the new site. So if you are only interested in my tech opinions and programming bits &#8212; head over there now and there won&#8217;t be a need to come back here.</p>
<p>And with &#8220;Playground&#8221;, it will be geared more towards my life, church, ministry, current affairs, &#8220;quickies&#8221; and other miscellaneous stuff. You still will not mistaken the geekiness in me, but most technology discussions will be moved to that other site.</p>
<p>I have actually acquired the domain <a href="http://blog.ozbargain.com.au/2005/cheap-com-domain-from-godaddy/#comment-4">2 months ago</a> with the intention of creating a tech blog. &#8220;Coder&#8221;, because I intended to have more programming/development related entries. &#8220;Fu&#8221; is taken from the context of &#8220;Kung-Fu&#8221;. Referring to the explanation on <a href="http://en.wikipedia.org/wiki/Fu">Wikipedia</a>:</p>
<blockquote><p>
<strong>Fu</strong> is a suffix coined from the popular Western usage of kung fu, and used to denote particular &#8220;mastery&#8221; of a subject, such as anime fu, cooking fu, math fu, etc. Ironically, in this sense fu is closer to the original Chinese meaning of kung fu (功夫) than the popular Western usage of the word kung fu is.
</p></blockquote>
<p>I was looking at &#8220;CodeFu&#8221;, but too bad domains under popular TLDs have all been taken, so I picked up &#8220;FuCoder.com&#8221;. Originally I was going to use <a href="http://drupal.org/">Drupal</a>, but was overwhelmed by how much I need to customise to get a personal blogsite going. So at the end I basically gave up, and ported my half-designed template to <a href="http://wordpress.org/">WordPress</a>.</p>
<p>The little logo at the top-left hand corner is indeed the original Kung-Fu game released by Nintendo in 1985, which represents the geek aspect of my new blogsite. All images are prepared by <a href="http://www.gimp.org/">Gimp</a> running under either Windows XP or Mac OS X. There are still IE-peek-a-boo issues with some pages, but I think I won&#8217;t bother :) Those who are interested in reading a tech blog won&#8217;t be surfing with Internet Explorer anyway.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/09/new-blog-fucodercom/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Bargain Blog</title>
		<link>http://scott.yang.id.au/2005/07/bargain-blog/</link>
		<comments>http://scott.yang.id.au/2005/07/bargain-blog/#comments</comments>
		<pubDate>Tue, 05 Jul 2005 12:22:24 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Playground]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/07/bargain-blog/</guid>
		<description><![CDATA[I have been thinking about doing it for a while &#8211; a blog that lists all the cheap deals that we have discovered during the week, a blog that might save us a few pennies &#8211; a bargain blog. There are actually quite a few bargain blogs or hot deal listings out there on the [...]]]></description>
			<content:encoded><![CDATA[<p>I have been thinking about doing it for a while &#8211; a blog that lists all the cheap deals that we have discovered during the week, a blog that might save us a few pennies &#8211; a <strong>bargain blog</strong>. There are actually quite a few bargain blogs or hot deal listings out there on the Internet, but so far I have not visited one that is Australian-focused, as most listings are only beneficial to the Americans. I think a bargain blog would also help cheap students (or MTS) on a budget, or someone as cheap as students (i.e. Vivian and me).</p>
<p>So here you are, in a very basic form:</p>
<blockquote><p><a href="http://blog.ozbargain.com.au/">The Bargain Blog</a></p></blockquote>
<p>I know the site is no where near being completed, and there ain&#8217;t enough bargains either, but I have added a link so everyone can submit a bargain you have found. I am hoping to get Vivian to start blogging there as well, but I would also like to invite interested bloggers if you like to write for it.</p>
<p>Future product reviews will also be moved to that site.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/07/bargain-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Added AdSense (Part II)</title>
		<link>http://scott.yang.id.au/2005/07/added-adsense-part-ii/</link>
		<comments>http://scott.yang.id.au/2005/07/added-adsense-part-ii/#comments</comments>
		<pubDate>Mon, 04 Jul 2005 01:25:19 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[AdSense]]></category>
		<category><![CDATA[Playground]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/07/added-adsense-part-ii/</guid>
		<description><![CDATA[Last week I looked at the option of adding sponsored links via AdSense to this site. So far I am getting around 5 bucks from the clicks. Not too bad I guess, but at the same time it is far from covering my Internet bandwidth. An interesting exercise nevertheless, as it was my very first [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I looked at the option of <a href="http://scott.yang.id.au/2005/06/added-adsense/">adding sponsored links via AdSense</a> to this site. So far I am getting around 5 bucks from the clicks. Not too bad I guess, but at the same time it is far from covering my Internet bandwidth. An interesting exercise nevertheless, as it was my very first attempt on milking some cash from an Internet website.</p>
<p>I read Nicole Simon&#8217;s article on <a href="http://www.problogger.net/">ProBlogger</a> this morning, and he <a href="http://www.problogger.net/archives/2005/07/04/ads-you-can-show-them-later/">looked at the option of separating your daily readers and visitors</a>, when you display your ads. I happen to have quite a few daily readers who track me through services like <a href="http://bloglines.com/">Bloglines</a> and FOCUSer.net&#8217;s <a href="http://focuser.net/update/">recent updates</a>, and I like to hide ads for them. At the same time, I am also getting a few hundred visitors landed here via Google, Yahoo!, MSN Search and others, searching for some particular information &#8211; these are the people I especially like to target the ads with.</p>
<p>So Simon&#8217;s solution is &#8211; only show ads to the blog posts that are a few days old. A great idea! A few minutes of PHP hacking, here&#8217;s a list of rules that governs whether AdSense will be shown:</p>
<ul>
<li>Post is at least 7 days old &amp; not in some specific categories.</p>
<li>Referrer is either Google, Yahoo! or MSN Search.</li>
</ul>
<p>I am now showing ads in two places &#8211; at the end of blog entry, and at the top of the index page. I have PHP/WordPress code that looks like this:</p>
<pre class="code">
  &lt;?php if (show_ads()) { ?&gt;
  &lt;script type="text/javascript"&gt;&lt;!--
  google_ad_client = ...
  //--&gt;&lt;/script&gt;
  &lt;script type="text/javascript"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt;
  &lt;/script&gt;
  &lt;?php } ?&gt;
</pre>
<p>And my PHP function that checks whether ads needs to be shown:</p>
<pre class="code">
&lt;?php
function show_ads() {
    global $posts;
    $referer = $_SERVER['HTTP_REFERER'];
    if (isset($referer)) {
        if (preg_match('/^http:\/\/(www)?\.?google.*/i', $referer) ||
            preg_match('/^http:\/\/search\.yahoo.*/i', $referer) ||
            preg_match('/^http:\/\/search\.msn.*/i', $referer))
        {
            return true;
        }
    }
    if (is_single()) {
        $t = $posts[0]-&gt;post_date;
        $t = mktime(substr($t, 11, 2), substr($t, 14, 2), substr($t, 17, 2),
                    substr($t, 5, 2), substr($t, 8, 2), substr($t, 0, 4));
        if ((time() - $t) &gt; 604800) {
            if (!in_category(21) &amp;&amp; !in_category(3) &amp;&amp;
                !in_category(40) &amp;&amp; !in_category(14))
            {
                return true;
            }
        }
    }

    return false;
}
?&gt;
</pre>
<p>It checked against 4 different categories (mainly christianity-related) and will not show ads if someone browses these blog posts. I know I should have made it into a plugin, but was too lazy to do so and the code is really very site-specific. I am just putting them here hoping it <em>might</em> be useful for some.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/07/added-adsense-part-ii/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Simple MySQL backup</title>
		<link>http://scott.yang.id.au/2005/06/simple-mysql-backup/</link>
		<comments>http://scott.yang.id.au/2005/06/simple-mysql-backup/#comments</comments>
		<pubDate>Wed, 29 Jun 2005 07:41:00 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Playground]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/?p=1093</guid>
		<description><![CDATA[Donncha shared his simple MySQL backup script that backs up individual WordPress tables into separate .sql.gz files, and keeps a week worth of them just in case something horrible happens. This is exactly what I did this morning! Write a simple Bash script that loops through 20+ databases, and create .sql.gz files per database. I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.linux.ie/xeer/2005/06/28/simple-mysql-backup/">Donncha shared his simple MySQL backup script</a> that backs up individual WordPress tables into separate <code>.sql.gz</code> files, and keeps a week worth of them <em>just in case</em> something horrible happens.</p>
<p>This is exactly what I did this morning! Write a simple Bash script that loops through 20+ databases, and create <code>.sql.gz</code> files <em>per database</em>. I did this to <strong>exclude</strong> some of the databases that I do not intend to backup and they used up quite a bit of space. I did not try the &#8220;weekly&#8221; thing, as I already have my own weekly incremental backups running.</p>
<pre lang="sh" class="code">
for db in `echo "SHOW DATABASES;" | mysql -s`
do
  case "$db" in
    cache|pmadb|spamlog|test|other DB I don't intend to backup)
      ;;
    *)
      mysqldump --add-drop-table -qc "$db" | \
        gzip -c &gt; "$HOME/archive/mysql/$db.sql.gz"
      ;;
  esac
done
</pre>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/06/simple-mysql-backup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Added AdSense</title>
		<link>http://scott.yang.id.au/2005/06/added-adsense/</link>
		<comments>http://scott.yang.id.au/2005/06/added-adsense/#comments</comments>
		<pubDate>Wed, 29 Jun 2005 01:40:11 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[AdSense]]></category>
		<category><![CDATA[Playground]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/?p=1092</guid>
		<description><![CDATA[You know. Managing and providing hosting to two to three dozen websites out of your own pocket can be a costly exercise. I have been quite reluctant to do so for a while, for the fear of &#8216;tainting&#8217; this blog. But I see that the dark side is greater, more powerful and more seductive, and [...]]]></description>
			<content:encoded><![CDATA[<p>You know. Managing and providing hosting to two to three dozen websites out of your own pocket can be a costly exercise. I have been quite reluctant to do so for a while, for the fear of &#8216;tainting&#8217; this blog. But I see that the dark side is greater, more powerful and more seductive, and have finally decided to surrender myself to the new overlord, the mighty big G. An <a href="https://www.google.com/adsense/">AdSense</a> account I have acquired, and banner ads you shall see.</p>
<p><del>What you need to do now, is keep on clicking on the ads below until I am filthy rich. Bwahahahah!!! (<em>click, click, click</em>)</del><ins>Which of course should not be stated anywhere on this website as it is against Google AdSense&#8217;s TOS&#8230;</ins></p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/06/added-adsense/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Latest Comments</title>
		<link>http://scott.yang.id.au/2005/06/latest-comments/</link>
		<comments>http://scott.yang.id.au/2005/06/latest-comments/#comments</comments>
		<pubDate>Sat, 18 Jun 2005 13:03:33 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Playground]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/06/latest-comments/</guid>
		<description><![CDATA[As Bruce Schneier has suggested, I have also added a latest comments section on Scott Yang&#8217;s Playground, so I can keep track the most recent contributors to this blogsite, and remember which ones I need to reply. I don&#8217;t get as many visitors as Mr. Schneier&#8217;s security news site, so I will not embarrass myself [...]]]></description>
			<content:encoded><![CDATA[<p>As Bruce Schneier <a href="http://www.schneier.com/blog/archives/2005/05/100_latest_blog.html">has suggested</a>, I have also added a <a href="http://scott.yang.id.au/comment/">latest comments</a> section on Scott Yang&#8217;s Playground, so I can keep track the most recent contributors to this blogsite, and remember which ones I need to reply. I don&#8217;t get as many visitors as Mr. Schneier&#8217;s security news site, so I will not embarrass myself and show only the latest 30 comments.</p>
<p>I am also running a cron job to close comments for posts that are more than 90 days old. That totally defeats the purpose of the blog &#8211; you are supposed to comment on the <em>latest</em> of Scott&#8217;s gibbering. Unless you are a spambot, of course.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/06/latest-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What I have been doing&#8230;</title>
		<link>http://scott.yang.id.au/2005/05/what-i-have-been-doing/</link>
		<comments>http://scott.yang.id.au/2005/05/what-i-have-been-doing/#comments</comments>
		<pubDate>Wed, 25 May 2005 00:35:43 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Playground]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/05/what-i-have-been-doing/</guid>
		<description><![CDATA[Just updates on some of my current &#8220;projects&#8221; that have kept me very much occupied. WordPress migration on FOCUSer.net. FOCUSer blog community has been running MovableType 2.x for the last 2 and half years. The code base is very much out dated and not supported, i.e. security issues will never be fixed. Spawning off a [...]]]></description>
			<content:encoded><![CDATA[<p>Just updates on some of my current &#8220;projects&#8221; that have kept me very much occupied.</p>
<ul>
<li>
<p><b>WordPress migration on <a href="http://focuser.net/">FOCUSer.net</a></b>. FOCUSer blog community has been running <a href="http://www.sixapart.com/movabletype/">MovableType</a> 2.x for the last 2 and half years. The code base is very much out dated and not supported, i.e. security issues will never be fixed. Spawning off a process to run CGI scripts is also getting slower and slower, as my box gets more loaded (Hint: anyone has a spare 1+ Ghz box that would like to donate to me?). So at the end I decided to migrate existing blogsites to <a href="http://wordpress.org/">WordPress</a>. I am using Gentoo&#8217;s <code>webapp-config</code> to manage all installations, so hopefully future upgrades will be straight-forward.</p>
<p>Notice was <a href="http://focuser.net/archives/003771.php">posted</a> a few days ago, and now I have already migrated 7 busiest sites. So far so good, but it seems many users are really confused with extra complication associated with WordPress, and using an FTP to upload files.</p>
<p><b>Todo</b>: Set up WebDAV. Write tutorial on downloading/changing themes using FTP or WebDAV. Migrate the rest of the community. Migrate the main FOCUSer.net to WordPress.</p>
</li>
<li>
<p><b>FOCUSer blog aggregator</b>. One issue of moving people to WordPress is, since WP is not capable of multiple-blog on a single instance, it is difficult and inefficient to write a real time &#8220;recent update&#8221; page like <a href="http://focuser.net/archives/000694.php">what I had</a> with the old MT blogs. One solution I had is writing a customised <a href="http://en.wikipedia.org/wiki/News_aggregator">feed aggregator</a>. This aggregator will collect all the blogs belonging to members/ex-members of FOCUS, download their entries in a regular interval, and re-organise them into one single page. It would then make it possible to track blogs not only hosted here, but also elsewhere (Blogspot, Xanga, etc).</p>
<p>Initially I was planning to use <a href="http://bloglines.com/">Bloglines</a> to do all the hard work for me &#8211; registering a new user, subscribe all the FOCUS blogs, and then publicly export the blogrolls for all to see. However, it does not allow you to have one single page with entries from all blogs mixed together in chronological order. I then decided to write something of my own.</p>
<p>Nothing is too difficult with Python&#8217;s <a href="http://feedparser.org/">universal feed parser</a>. It is easy to download the feed, and populate them into database. Although to be able to &#8220;precisely&#8221; mix entries together from all blogs, I need to ensure the issued date/time from all blogging platforms are compatible with each other. Getting timezone, DST, etc right.</p>
<p>Code for fetching and populating the database is almost complete. I now just need to set up a cron job to have it done hourly, and a web interface to display the result.</p>
<p><b>Todo</b>: Complete the aggregator. ETA by the end of this week.</p>
</li>
<li>
<p><b>New FOCUS website</b>. This is a long overdue project. I think I started sometime in the second half of last year, working on a new website that is more information centred than community-centred. I want our church website to be simple and clear to other who are looking at visiting our church, and don&#8217;t want to be bombarded with information that might not represent the church as a whole. I intended to separate the &#8220;community&#8221; from our official front-page.</p>
<p>So I started with our existing pages (mostly on Wiki), and tried to find a suitable CMS for it. I tried <a href="http://textpattern.net/">TextPattern</a>. I love it about its simplicity and great original ideas, but was also frustrated with its limitations and lack of updates. Then I tried to use <a href="http://wordpress.org/">WordPress</a> &#8211; something that I am already familiar with. I think I should just leave WP as a blogging tool, and not anything else &#8211; as it is really limiting as a CMS without extensive extra coding (even though some people think that it is capable as a full-blown CMS).</p>
<p>Finally, I am settling on <a href="http://drupal.org/">Drupal</a>, a very modular PHP powered CMS system that is also very easy to develop as well. I might write a bit more about Drupal later. It is really a fun platform to play with.</p>
<p><b>Todo</b>: Get some updated content for the church website. Get some updated photos as well. Learn a bit more about Drupal. Actually implement the site. ETA &#8211; hopefully by the end of this year (if you guys are lucky).</p>
</li>
<li>
<p><b>FOCUS Shop</b>. Joshua asked me about selling the Sunday talks in MP3 format. Vivian and I still have some T-shirts and Bibles to sell. It all somehow came down to an idea of setting up some kind of &#8220;on-line store&#8221;, with categories and products, to sell and generate more revenue to fund the ministry. So it also got me an opportunity to put setting up an e-commerce site into practise.</p>
<p>I then looked at a few different open source packages. My main requirement is having categories and products, different delivery methods, different payment methods, etc. PayPal support is crucial, as it handles credit card purchases for me relatively cheaply, and it is trivial to setup. Yeah. I love PayPal.</p>
<p>So I started at <a href="http://www.oscommerce.com/">osCommerce</a> and its derivative <a href="http://www.zen-cart.com/">Zen-Cart</a>. Very powerful. Very sophisticated. Very feature-rich. However, way too complicated as well for an e-commerce first-timer. The HTML template system in the current osCommerce and Zen-Cart is mediocre, which makes customisation a very difficult job. I can imagine upgrading such sites would be a nightmare. I spent one night crawling over the code, and still cannot understand how exactly everything works &#8211; then I gave up.</p>
<p>I also looked at <a href="http://www.phpshop.org/">phpShop</a>. Much simpler interface, but it does not even support PayPal out of the box. So I dumped it without a second thought.</p>
<p>Then I discovered that there is actually an <a href="http://drupal.org/project/ecommerce">e-commerce module</a> for <a href="http://drupal.org/">Drupal</a>. It combined the flexibility of node-system of Drupal with products and shopping carts, plus a payment module that supports PayPal. Moreover, it allows regular site users to create &#8220;auction&#8221; items so other users can bid and purchase &#8211; perfect for a community site where lots of overseas students who want to sell their belongings before heading back home.</p>
<p>I might write more about Drupal e-commerce when the site is completed.</p>
<p><b>Todo</b>: Implement the shop. Import the products. Arrange all issues with Josh. ETA July.</p>
</li>
</ul>
<p>Due to my procrastinating nature, take the above ETA&#8217;s with a grain of salt.</p>
<hr class="divider" />
<p>These were what I have been doing. Not what I <strong>should be doing</strong>. Need to read through Isaiah again to prepare for Bible studies starting in 2 weeks&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/05/what-i-have-been-doing/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>New Plugins Installed</title>
		<link>http://scott.yang.id.au/2005/05/new-plugins-installed/</link>
		<comments>http://scott.yang.id.au/2005/05/new-plugins-installed/#comments</comments>
		<pubDate>Sun, 22 May 2005 11:11:16 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Gravatar]]></category>
		<category><![CDATA[Playground]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/05/new-plugins-installed/</guid>
		<description><![CDATA[I have recently installed two WordPress plugins to slightly enhance the visual of comments. Gravatars &#8211; uses the globally recognised avatar to display a 48&#215;48 image next to each comment to identify its poster. IP to Nation &#8211; displays a little country flag next to the comment poster&#8217;s name, guessed from its incoming IP address. [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently installed two WordPress plugins to slightly enhance the visual of comments.</></p>
<ul>
<li><a href="http://wp-plugins.net/index.php?id=204">Gravatars</a> &#8211; uses the <a href="http://gravatar.com/">globally recognised avatar</a> to display a 48&#215;48 image next to each comment to identify its poster.</li>
<li><a href="http://wp-plugins.net/index.php?id=95">IP to Nation</a> &#8211; displays a little country flag next to the comment poster&#8217;s name, guessed from its incoming IP address. <a href="http://skyflying.org/wp/index.php/archives/2005/03/26/209/">ROC Taiwan flag updated</a>.</li>
</ul>
<p>So far so good. If you want to have your image displayed next to your comments, please sign up <a href="http://gravatar.com/">Gravatar.com</a> there.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/05/new-plugins-installed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Upgraded to WP 1.5</title>
		<link>http://scott.yang.id.au/2005/03/upgraded-to-wp-15/</link>
		<comments>http://scott.yang.id.au/2005/03/upgraded-to-wp-15/#comments</comments>
		<pubDate>Mon, 07 Mar 2005 03:50:17 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Playground]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2005/03/upgraded-to-wp-15/</guid>
		<description><![CDATA[Finally, I&#8217;ve upgraded this site to WordPress 1.5 &#8220;Strayhorn&#8221;. Not as straightforward as I initially thought, as there were too many custom hacks from my previous install. I&#8217;ve also changed the theme slightly to get rid of the sidebar completely, replacing with a navigation bar at the top. None of my plugins is working yet, [...]]]></description>
			<content:encoded><![CDATA[<p>Finally, I&#8217;ve upgraded this site to <a href="http://wordpress.org/">WordPress</a> 1.5 &#8220;Strayhorn&#8221;. Not as straightforward as I initially thought, as there were too many custom hacks from my previous install. I&#8217;ve also changed the theme slightly to get rid of the sidebar completely, replacing with a navigation bar at the top.</p>
<p>None of my plugins is working yet, and I can imagine that many places are still broken. I am too physically ill to get the upgrade done in one go, so I guess I&#8217;ll gradually patch it up throughout the week.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2005/03/upgraded-to-wp-15/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Re-Styled</title>
		<link>http://scott.yang.id.au/2004/10/re-styled/</link>
		<comments>http://scott.yang.id.au/2004/10/re-styled/#comments</comments>
		<pubDate>Wed, 27 Oct 2004 23:26:54 +0000</pubDate>
		<dc:creator>scotty</dc:creator>
				<category><![CDATA[Playground]]></category>

		<guid isPermaLink="false">http://scott.yang.id.au/2004/10/re-styled/</guid>
		<description><![CDATA[Looks like I&#8217;ve done it again &#8211; Playground has been re-styled. Instead of making it a real eye pleaser, I&#8217;ve decided to make it simpler. White background everywhere. Minimal borders around the canvases. No decorating pictures. Bland. Maybe I&#8217;ll do away with this whole CSS thingy in the next iteration of Playground redesign.]]></description>
			<content:encoded><![CDATA[<p>Looks like I&#8217;ve done it again &#8211; <em>Playground has been re-styled</em>. Instead of making it a real eye pleaser, I&#8217;ve decided to make it <em>simpler</em>. White background everywhere. Minimal borders around the canvases. No decorating pictures. Bland.</p>
<p>Maybe I&#8217;ll do away with this whole CSS thingy in the next iteration of Playground redesign.</p>
]]></content:encoded>
			<wfw:commentRss>http://scott.yang.id.au/2004/10/re-styled/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

