<?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>Mark Leong Web Development &#38; Design</title>
	<atom:link href="http://www.mark-leong.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mark-leong.com</link>
	<description>Freelance Web Development &#38; Design</description>
	<lastBuildDate>Tue, 14 Feb 2012 18:34:57 +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>HTML Purifier</title>
		<link>http://www.mark-leong.com/html-purifier/</link>
		<comments>http://www.mark-leong.com/html-purifier/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 02:19:05 +0000</pubDate>
		<dc:creator>Mark Leong</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.mark-leong.com/?p=918</guid>
		<description><![CDATA[The problem I want to allow users to input HTML-formatted text, but I only want them to use certain tags and never any JavaScript. Sometimes users will copy and paste WYSIWYG formatted HTML, with it&#8217;s associated CSS classes and inline style rules &#8211; but I don&#8217;t want that to mess up my site design. A [...]]]></description>
			<content:encoded><![CDATA[<h2>The problem</h2>
<p>I want to allow users to input HTML-formatted text, but I only want them to use certain tags and never any JavaScript. Sometimes users will copy and paste WYSIWYG formatted HTML, with it&#8217;s associated CSS classes and inline style rules &#8211; but I don&#8217;t want that to mess up my site design.</p>
<p>A simplistic approach is to attempt to use regular expressions to filter out unwanted HTML tags, but this becomes tedious and is always fraught with risk because it is notoriously difficult to anticipate and catch all the possible permutations of HTML tags and their attributes.</p>
<p>A more successful approach is to use a psuedo markup language like bbCode or WikiText, but both of these require users to learn another markup language, which is likely to deter users from posting.</p>
<h2>Is there a better alternative?</h2>
<p>Yes there is! <a href="http://htmlpurifier.org/" rel="nofollow" target="_blank">HTML Purifier</a> is a standards-compliant HTML filter library written in PHP. HTML Purifier will not only remove all malicious code (better known as XSS) with a thoroughly audited, secure yet permissive whitelist, it will also make sure your documents are standards compliant, something only achievable with a comprehensive knowledge of W3C&#8217;s specifications.</p>
<p>HTML Purifier works by decomposing the whole document into tokens and removing non-whitelisted elements, checking the well-formedness and nesting of tags, and validating all attributes according to their RFCs.</p>
<h2>Why HTML Purifier</h2>
<p>I&#8217;ve used HTML Purifier because it</p>
<ul>
<li>uses a whitelist (e.g. allow only b, p, br, ul, ol and li tags)</li>
<li>outputs valid XHTML</li>
<li>protects againts XSS</li>
<li>can remove attibutes and classes from tags without removing the tags</li>
</ul>
<h2>Before and after</h2>
<p>An example of HTML that a user may enter:</p>
<pre name="code" class="html">
&lt;P style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;st1:Lorem w:st="on"&gt;&lt;st1:place w:st="on"&gt;&lt;B&gt;LOREM IPSUM&lt;/B&gt;&lt;/st1:place&gt;&lt;/st1:Lorem&gt;&lt;B&gt;LOREM IPSUM&lt;/B&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;st1:place w:st="on"&gt;&lt;st1:PlaceName w:st="on"&gt;Lorem&lt;/st1:PlaceName&gt; &lt;st1:PlaceType w:st="on"&gt;Ipsum&lt;/st1:PlaceType&gt;&lt;/st1:place&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque at augue vitae nisl sodales interdum. &lt;st1:City w:st="on"&gt;&lt;st1:place w:st="on"&gt;Lorem &lt;/st1:place&gt;&lt;/st1:City&gt; Pellentesque erat enim, ullamcorper eget vehicula feugiat, auctor non nunc. Quisque vel molestie eros. Cras erat nulla, faucibus eget pretium at, cursus eu enim. &lt;st1:place w:st="on"&gt;&lt;st1:PlaceType w:st="on"&gt;lorem&lt;/st1:PlaceType&gt; &lt;st1:PlaceType w:st="on"&gt;Ipsum&lt;/st1:PlaceType&gt;&lt;/st1:place&gt; Integer et eros lorem, eget pharetra justo. Maecenas accumsan eleifend leo, a ullamcorper justo venenatis ut. Vestibulum bibendum diam vel turpis lobortis bibendum.&lt;/P&gt;
&lt;P style="MARGIN: 0cm 0cm 0pt; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto" class=MsoNormal&gt;&lt;B&gt;Lorem / Ipsum&lt;/B&gt; &lt;/P&gt;
</pre>
<p>After it has been passed through the filter:</p>
<pre name="code" class="html">
&lt;p&gt;&lt;b&gt;LOREM IPSUM&lt;/b&gt;&lt;b&gt;LOREM IPSUM&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Lorem Ipsum Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque at augue vitae nisl sodales interdum. Lorem Pellentesque erat enim, ullamcorper eget vehicula feugiat, auctor non nunc. Quisque vel molestie eros. Cras erat nulla, faucibus eget pretium at, cursus eu enim. lorem Ipsum Integer et eros lorem, eget pharetra justo. Maecenas accumsan eleifend leo, a ullamcorper justo venenatis ut. Vestibulum bibendum diam vel turpis lobortis bibendum.&lt;/P&gt;
&lt;p&gt;&lt;b&gt;Lorem / Ipsum&lt;/b&gt;&lt;/p&gt;
</pre>
<p>This is the code used to achieve the before/after example:</p>
<pre name="code" class="php">
require_once '/path_to/HTMLPurifier/HTMLPurifier.auto.php';
$config = HTMLPurifier_Config::createDefault();
$config-&gt;set('HTML.AllowedElements', 'b,i,p,br,ul,ol,li');
$config-&gt;set('Attr.AllowedClasses', '');
$config-&gt;set('HTML.AllowedAttributes', '');
$config-&gt;set('AutoFormat.RemoveEmpty', true);
$purifier = new HTMLPurifier($config);

$remarks = 'the text to be filtered';
$remarks = preg_replace('/&lt;\?xml[^&gt;]+\/&gt;/im', '', $remarks);
$remarks_cleaned = $purifier-&gt;purify($remarks);
</pre>
<p>The only other line of code here doing work apart from the HTML Purifier is the regex to remove <code>&lt;?xml ... ?&gt;</code> namespace tags from MS Word.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mark-leong.com/html-purifier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yes 4G mobile broadband</title>
		<link>http://www.mark-leong.com/yes-4g-mobile-broadband/</link>
		<comments>http://www.mark-leong.com/yes-4g-mobile-broadband/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 17:37:36 +0000</pubDate>
		<dc:creator>Mark Leong</dc:creator>
				<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.mark-leong.com/?p=909</guid>
		<description><![CDATA[Yes, it is fast! This evening I had the privilege to try out Yes, YTL Communication&#8217;s new mobile broadband solution. Above is a screenshot of a speed test I did about midnight. As anyone who is used to Malaysian broadband can attest, clocking in a download speed of 10.5 Mbps is pretty good. Yes has [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.mark-leong.com/wp-content/uploads/2011/01/yes-speedtest.png" alt="" title="Yes speedtest" width="550" height="294" class="alignnone size-full wp-image-908" /></p>
<h3>Yes, it is fast!</h3>
<p>This evening I had the privilege to try out <strong>Yes</strong>, YTL Communication&#8217;s new mobile broadband solution. Above is a screenshot of a speed test I did about midnight. As anyone who is used to Malaysian broadband can attest, clocking in a download speed of 10.5 Mbps is pretty good.</p>
<p><strong>Yes</strong> has a simple pay-as-you-use price plan: 9 sen for a 1-minute call, 1 SMS, or 3 MB of data. Coverage of Peninsular Malaysia is <a href="http://www.soyacincau.com/2010/11/20/yes-4g-coverage-in-peninsular-malaysia/">said to be</a> at about 65%. </p>
<p>For more info, price plans, videos and coverage maps, see <a href="http://www.yes.my/">http://www.yes.my/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mark-leong.com/yes-4g-mobile-broadband/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gravatars: Globally recognized avatars</title>
		<link>http://www.mark-leong.com/gravatars-globally-recognized-avatars/</link>
		<comments>http://www.mark-leong.com/gravatars-globally-recognized-avatars/#comments</comments>
		<pubDate>Mon, 06 Dec 2010 08:39:41 +0000</pubDate>
		<dc:creator>Mark Leong</dc:creator>
				<category><![CDATA[Social media]]></category>

		<guid isPermaLink="false">http://www.mark-leong.com/?p=904</guid>
		<description><![CDATA[A what&#8230;? Most people have never heard of an online avatar, let alone a Gravatar, so let&#8217;s begin with some definitions. An online avatar is an image or icon used to represent you on the Internet, usually associated with some contribution you have made, such as a comment or a post on a forum. A [...]]]></description>
			<content:encoded><![CDATA[<h2>A what&#8230;?</h2>
<p>Most people have never heard of an online avatar, let alone a Gravatar, so let&#8217;s begin with some definitions. </p>
<p>An <strong>online avatar</strong> is an image or icon used to represent <em>you</em> on the Internet, usually associated with some contribution you have made, such as a comment or a post on a forum. </p>
<p>A <strong>Gravatar</strong> is an avatar that is hosted by a third-party (Gravatar.com), which is associated with your email address. When you contribute a comment or post on a website that supports Gravatars, such as a WordPress blog, it will check with Gravatar.com and display your avatar if you have an account with Gravatar.com.</p>
<p>From the Gravatar.com website:</p>
<blockquote><p>Your Gravatar is an image that follows you from site to site appearing beside your name when you do things like comment or post on a blog. Avatars help identify your posts on blogs and web forums, so why not on any site?</p></blockquote>
<h2>Why get a Gravatar?</h2>
<p><img src="http://www.mark-leong.com/wp-content/uploads/2010/12/mystery-man.jpeg" alt="" title="Mystery man" width="96" height="96" class="alignright size-full wp-image-905" /> You should sign up for a Gravatar so that on websites that support Gravatars, you will have a profile picture next to your comment or entry, instead of a generic icon, like the one on the right. On such websites, having a Gravatar helps distinguish your comments or posts from the others around it.</p>
<h2>Setting up a Gravatar</h2>
<ol>
<li>Prepare your image:
<ul>
<li>It must be square</li>
<li>It can be up to 512 pixels wide</li>
<li>It will be displayed at 80 pixels by 80 pixels by default</li>
</ul>
</li>
<li>Go to <a href="http://www.gravatar.com/">http://www.gravatar.com/</a> and click on the sign up button.</li>
<li>Check your email Inbox and follow the instructions in the email from Gravatar.com.</li>
<li>Upload your image.</li>
<li>Try out your new Gravatar by leaving a comment on this post!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.mark-leong.com/gravatars-globally-recognized-avatars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speaking on &#8220;How to set up an online blogshop&#8221;</title>
		<link>http://www.mark-leong.com/speaking-on-how-to-set-up-an-online-blogshop/</link>
		<comments>http://www.mark-leong.com/speaking-on-how-to-set-up-an-online-blogshop/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 18:00:27 +0000</pubDate>
		<dc:creator>Mark Leong</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.mark-leong.com/?p=901</guid>
		<description><![CDATA[A few weeks ago I had the privilege of joining the Emmagem.com team in conducting a workshop at an event co-organised by the New Straits Times (NST) and Gorgeous Geeks on how to start an online business. The event attracted just under 100 participants, one from as far away as Perlis! Thankfully my journey from [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.mark-leong.com/wp-content/uploads/2010/11/nst-01.jpg" alt="Workshop on &quot;How to set up an online blogshop&quot;" title="Workshop on &quot;How to set up an online blogshop&quot;" width="550" height="272" class="aligncenter size-full wp-image-902" /></p>
<p>A few weeks ago I had the privilege of joining the <a href="http://www.emmagem.com/">Emmagem.com</a> team in conducting a workshop at an event co-organised by the <a href="http://www.nst.com.my/">New Straits Times</a> (NST) and <a href="http://www.gorgeousgeeks.net/">Gorgeous Geeks</a> on how to start an online business. The event attracted just under 100 participants, one from as far away as Perlis! Thankfully my journey from home didn’t have to start as early as his, as the workshop was held at the NST office in Bangsar.</p>
<p>My session was on &#8220;How to set up an online blogshop&#8221;. I began by introducing online shops and blogshops, and then moved on to the main part of the session, walking the participant through how to set a blogshop up at zero cost. Then I gave an overview of upgrades and expansion options, before concluding with a discussion on longer term strategies for running a blogshop. (In case you’re wondering, a blogshop is an online shop that uses a blog engine as its Content Management System.)</p>
<p><img src="http://www.mark-leong.com/wp-content/uploads/2010/11/nst-02.jpg" alt="Workshop on &quot;How to set up an online blogshop&quot;" title="Workshop on &quot;How to set up an online blogshop&quot;" width="550" height="272" class="aligncenter size-full wp-image-903" /></p>
<p>The two-day event was part of the WOMEN NETPRENEUR 2010 (WNET2010) programme organised by Gorgeous Geeks, MDeC, the US Embassy, Warisan Global, Emmagem.com and NST. Other workshops that weekend covered topics including business strategy, product sourcing, marketing, eBay, PayPal and product photography.</p>
<p>I enjoyed facilitating my part of the workshop, especially in being able to help the participants get to grips with some new tools and technologies to help them develop their businesses. Many thanks to Emmagem.com, Gorgeous Geeks and NST for the opportunity to get involved!</p>
<p>Photo credits: <a href="http://www.facebook.com/womennetpreneur">Women Netpreneur</a> on Facebook.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mark-leong.com/speaking-on-how-to-set-up-an-online-blogshop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to register a Malaysian business online</title>
		<link>http://www.mark-leong.com/how-to-register-a-malaysian-business-online/</link>
		<comments>http://www.mark-leong.com/how-to-register-a-malaysian-business-online/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 14:21:31 +0000</pubDate>
		<dc:creator>Mark Leong</dc:creator>
				<category><![CDATA[Business]]></category>

		<guid isPermaLink="false">http://www.mark-leong.com/?p=896</guid>
		<description><![CDATA[Types of registration Suruhanjaya Syarikat Malaysia (The Companies Commission of Malaysia) offers two types of registration: business and company. Business registrations may be either sole proprietorships or partnerships. They are relatively easy to do yourself and cost below RM100. Company registration involves the formation of a new legal entity, either a Private Limited Company (Sdn [...]]]></description>
			<content:encoded><![CDATA[<h2>Types of registration</h2>
<p><strong>Suruhanjaya Syarikat Malaysia</strong> (The Companies Commission of Malaysia) offers two types of registration: business and company.</p>
<ul>
<li>Business registrations may be either sole proprietorships or partnerships. They are relatively easy to do yourself and cost below RM100.</li>
<li>Company registration involves the formation of a new legal entity, either a Private Limited Company (Sdn Bhd) or a Limited Company (Bhd). Registering a company is a lot more expensive and complicated.</li>
</ul>
<p>This write-up is on how to register a business online.</p>
<h2>Why should you register a business?</h2>
<blockquote><p>Pursuant to section 5A(1) of the Registration of Businesses Act 1956, the person responsible for a business has to, not later than 30 days from the date of the commencement of the business, apply to the Registrar to register that business.</p></blockquote>
<h2>Registering a business online</h2>
<h3>Government portal registration</h3>
<ol>
<li>Register at <a href="http://www.malaysia.gov.my/">http://www.malaysia.gov.my/</a> (registration link at top right of page)</li>
</ol>
<h3>SSM Subscriber Registration</h3>
<ol>
<li>Login at <a href="http://www.malaysia.gov.my/">http://www.malaysia.gov.my/</a></li>
<li>Go to <a href="http://www.ssm.com.my/en/eLodgement-services/">http://www.ssm.com.my/en/eLodgement-services/</a></li>
<li>Click on the link entitled <strong>SSM Subscriber Registration</strong></li>
<li>Follow the instructions to register</li>
<li>Complete payment of RM5</li>
</ol>
<h3>Name enquiry</h3>
<ol>
<li> Go to <a href="http://www.ssm.com.my/en/eLodgement-services/">http://www.ssm.com.my/en/eLodgement-services/</a></li>
<li>Click on the link entitled <strong>Application for Business Name Approval (ROB)</strong></li>
<li>Follow the instructions and submit the form</li>
<li>Wait for the confirmation email – repeat this section if your name is rejected</li>
</ol>
<h3>Business name registration</h3>
<ol>
<li> Copy the ROB approval number e.g. ROB12112010-xxxxxxxxxSB</li>
<li>Go to <a href="http://www.ssm.com.my/en/eLodgement-services/">http://www.ssm.com.my/en/eLodgement-services/</a></li>
<li>Click on the link entitled <strong>Online Registration of Business (ROB)</strong></li>
<li>Follow the instructions and submit the form</li>
<li>Complete the payment of RM30 (owner’s name) or RM60 (trade name)</li>
<li>Wait for the confirmation email</li>
</ol>
<h2>What to do if you something doesn’t work</h2>
<ul>
<li> If it is a problem with windows/tabs not loading, try turning off your pop-up blocker or switching to another web browser.</li>
<li>Use the contact form, email address or phone numbers listed on <a href="http://www.malaysia.gov.my/EN/Site/ContactUs/Pages/ContactUs.aspx">http://www.malaysia.gov.my/EN/Site/ContactUs/Pages/ContactUs.aspx</a></li>
</ul>
<h2>More info</h2>
<ul>
<li>The SSM guide on registering a business: <a href="http://www.ssm.com.my/en/docs/Procedure_Guidelines_for_Registration_of_a_Business.pdf" class="broken_link">http://www.ssm.com.my/en/docs/Procedure_Guidelines_for_Registration_of_a_Business.pdf</a> [PDF]</li>
<li>The SSM FAQ on business registration: <a href="http://www.ssm.com.my/en/faq/">http://www.ssm.com.my/en/faq/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.mark-leong.com/how-to-register-a-malaysian-business-online/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress hack: Force wp_list_pages() to print current_page_item class</title>
		<link>http://www.mark-leong.com/wordpress-hack-force-wp_list_pages-to-print-current_page_item-class/</link>
		<comments>http://www.mark-leong.com/wordpress-hack-force-wp_list_pages-to-print-current_page_item-class/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 10:26:15 +0000</pubDate>
		<dc:creator>Mark Leong</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.markyleong.com/?p=870</guid>
		<description><![CDATA[The wp_list_pages() function displays a list of WordPress pages as links and is often used to display navigation menus. When it prints the list of links, it adds a CSS class current_page_item to the list item tag of the current page. This allows custom styling to be applied to the link e.g. to highlight a [...]]]></description>
			<content:encoded><![CDATA[<p>The <code>wp_list_pages()</code> function displays a list of WordPress pages as links and is often used to display navigation menus. When it prints the list of links, it adds a CSS class <code>current_page_item</code> to the list item tag of the current page. This allows custom styling to be applied to the link e.g. to highlight a link to indicate the page that the visitor is on.</p>
<p><strong>The limitation with this is that it only works if you are viewing a page or an attachment, or are on the posts page (as set in Settings > Reading).</strong></p>
<p>I was working on an archive page for a custom taxonomy and wanted to have the <code>current_page_item</code> CSS class added to the list item of a particular link of my choice. After poking around a bit in the <code>wp_list_pages()</code> code listing, I discovered it’s possible to hack the <code>$wp_query</code> object to make <code>wp_list_pages()</code> do what I wanted it to.</p>
<p>Here’s how:</p>
<pre name="code" class="php">
// Get the ID of the link you want highlighted. Either:
// - hardcode it (as below)
// - or query the database to get it
$the_id = "1";

// Make a copy of the $wp_query object
$temp_query = clone $wp_query;

// Trick WordPress into thinking we're on a page with ID $the_id
$wp_query->is_page = 1;
$wp_query->queried_object_id = $the_id;

// Display pages
wp_list_pages("title_li=");

// Reset $wp_query
$wp_query = clone $temp_query;
</pre>
<p><strong>Notes:</strong></p>
<ul>
<li><code>$wp_query->is_page</code> needs to be set to <code>1</code> (true) because <code>wp_list_pages()</code> does not set a current page unless <code>is_page()</code> or <code>is_attachment()</code> or <code>$wp_query->is_posts_page</code> returns true.</li>
<li>If you only want this code to run when you are on certain page you can wrap it in an <code>if</code> statement that checks a WordPress <a href="http://codex.wordpress.org/Conditional_Tags">conditional tag</a>. In my case I only wanted to run this code when a taxonomy archive was being displayed so I used <code>is_tax()</code>.</li>
<li>See <a href="http://www.jenst.se/2008/03/17/wordpress-get-id-by-post-or-page-name/">http://www.jenst.se/2008/03/17/wordpress-get-id-by-post-or-page-name/</a> on how to query the database by post/page name to get an ID.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.mark-leong.com/wordpress-hack-force-wp_list_pages-to-print-current_page_item-class/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Website launched: Riverside Church</title>
		<link>http://www.mark-leong.com/website-launched-riverside-church/</link>
		<comments>http://www.mark-leong.com/website-launched-riverside-church/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 22:51:51 +0000</pubDate>
		<dc:creator>Mark Leong</dc:creator>
				<category><![CDATA[Website launch]]></category>

		<guid isPermaLink="false">http://www.markyleong.com/?p=869</guid>
		<description><![CDATA[Over the last few months, I&#8217;ve been working on a redesign of the website of my church in Birmingham, Riverside Church. Today the new website went live! Home page: Normal content page: Please let me know what you think by leaving a comment, thanks!]]></description>
			<content:encoded><![CDATA[<p>Over the last few months, I&#8217;ve been working on a redesign of the website of my church in Birmingham, <a href="http://www.riverside-church.org.uk/">Riverside Church</a>. Today the new website went live!</p>
<p><strong>Home page:</strong></p>
<p><a href="http://www.riverside-church.org.uk/"><img src="/wp-content/uploads/2010/07/riverside_church_01_thumb.png" alt="" width="480" height="361" class="alignnone size-full wp-image-867" /></a></p>
<p><strong>Normal content page:</strong></p>
<p><a href="http://www.riverside-church.org.uk/about/about-riverside/"><img src="/wp-content/uploads/2010/07/riverside_church_02_thumb.png" alt="" width="480" height="361" class="alignnone size-full wp-image-868" /></a></p>
<p>Please let me know what you think by leaving a comment, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mark-leong.com/website-launched-riverside-church/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set WordPress custom post types order in admin</title>
		<link>http://www.mark-leong.com/set-wordpress-custom-post-types-order-in-admin/</link>
		<comments>http://www.mark-leong.com/set-wordpress-custom-post-types-order-in-admin/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 17:51:14 +0000</pubDate>
		<dc:creator>Mark Leong</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.markyleong.com/?p=864</guid>
		<description><![CDATA[One of the long-awaited new features of WordPress 3.0 is custom post types. By default, custom posts with the post capability_type (as opposed to page, attachment, revision, or nav-menu-item) are listed newest to oldest in the WordPress backend. This makes sense if these are blog posts, but if they are some other content type (such [...]]]></description>
			<content:encoded><![CDATA[<p>One of the long-awaited new features of WordPress 3.0 is <a href="http://codex.wordpress.org/Custom_Post_Types">custom post types</a>.</p>
<p>By default, custom posts with the <em>post</em> <a href="http://codex.wordpress.org/Function_Reference/register_post_type">capability_type</a> (as opposed to page, attachment, revision, or nav-menu-item) are listed newest to oldest in the WordPress backend. This makes sense if these are blog posts, but if they are some other content type (such as quotes, movies, books or contacts) it is often desirable to have them listed alphabetically.</p>
<p>To achieve this, add the following code to your <strong>functions.php</strong> file, replacing <strong>POST_TYPE</strong> (line 7) with the name of the post type that you want to have listed alphabetically.</p>
<pre name="code" class="php">
function set_custom_post_types_admin_order($wp_query) {
  if (is_admin()) {

    // Get the post type from the query
    $post_type = $wp_query->query['post_type'];

    if ( $post_type == 'POST_TYPE') {

      // 'orderby' value can be any column name
      $wp_query->set('orderby', 'title');

      // 'order' value can be ASC or DESC
      $wp_query->set('order', 'ASC');
    }
  }
}
add_filter('pre_get_posts', 'set_custom_post_types_admin_order');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mark-leong.com/set-wordpress-custom-post-types-order-in-admin/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>New website launched: Kingsbridge Project</title>
		<link>http://www.mark-leong.com/new-website-launched-kingsbridge-project/</link>
		<comments>http://www.mark-leong.com/new-website-launched-kingsbridge-project/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 14:46:09 +0000</pubDate>
		<dc:creator>Mark Leong</dc:creator>
				<category><![CDATA[Website launch]]></category>

		<guid isPermaLink="false">http://markyleong.dreamhosters.com/?p=860</guid>
		<description><![CDATA[This week saw the launch of the Kingsbridge Project website that I&#8217;ve been working on with some friends from church. The Kingsbridge Project is a consortium of faith groups, social enterprises, sports bodies and public bodies dedicated to bringing together communities in South Birmingham through sport and community activity. The initiative is currently in its [...]]]></description>
			<content:encoded><![CDATA[<p>This week saw the launch of the <a href="http://www.kingsbridge-project.org/">Kingsbridge Project</a> website that I&#8217;ve been working on with some friends from church.</p>
<p><a href="http://www.kingsbridge-project.org/"><img src="/wp-content/uploads/2010/06/kingsbridge_project_thumb.png" alt="Kingsbridge Project" title="Kingsbridge Project" width="480" height="360" class="aligncenter size-full wp-image-862" /></a></p>
<p>The Kingsbridge Project is a consortium of faith groups, social enterprises, sports bodies and public bodies dedicated to bringing together communities in South Birmingham through sport and community activity. The initiative is currently in its early stages and the website is meant to serve its current needs of establishing a web presence and providing publicity. As a result I decided that instead of creating a custom design, I would use &#8216;PersonalPress&#8217;, a premium WordPress theme <a href="http://www.elegantthemes.com/">Elegant Themes</a>, so that I could get site off the ground as quickly as possible.</p>
<p>Please let me know what you think by leaving a comment, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mark-leong.com/new-website-launched-kingsbridge-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New website launched: The Malaysian Gym Directory</title>
		<link>http://www.mark-leong.com/new-website-launched-the-malaysian-gym-directory/</link>
		<comments>http://www.mark-leong.com/new-website-launched-the-malaysian-gym-directory/#comments</comments>
		<pubDate>Sat, 22 May 2010 09:10:53 +0000</pubDate>
		<dc:creator>Mark Leong</dc:creator>
				<category><![CDATA[Website launch]]></category>

		<guid isPermaLink="false">http://www.markyleong.com/?p=850</guid>
		<description><![CDATA[A few weeks ago I was searching online for gyms in Malaysia and found that there weren&#8217;t any dedicated gym directory websites. This got me thinking and the idea of setting up an online Malaysian gym directory was born. Yesterday the website went live &#8211; you can check it out here: http://www.malaysian-gyms.com. Please let me [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I was searching online for gyms in Malaysia and found that there weren&#8217;t any dedicated gym directory websites. This got me thinking and the idea of setting up an online Malaysian gym directory was born.</p>
<p>Yesterday the website went live &#8211; you can check it out here: <a href="http://www.malaysian-gyms.com">http://www.malaysian-gyms.com</a>.</p>
<p><a href="http://www.malaysian-gyms.com"><img src="/wp-content/uploads/2010/05/malaysian_gym_directory_thumb.png" alt="The Malaysian Gym Directory" title="The Malaysian Gym Directory" width="480" height="360" class="aligncenter size-full wp-image-858" /></a></p>
<p>Please let me know what you think by leaving a comment, thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mark-leong.com/new-website-launched-the-malaysian-gym-directory/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

