<?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>HiddenTao</title>
	<atom:link href="http://www.hiddentao.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hiddentao.com</link>
	<description>software, websites, mobile, technology</description>
	<lastBuildDate>Mon, 30 Aug 2010 21:08:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>A bulk stock updater module for Ubercart</title>
		<link>http://www.hiddentao.com/archives/2010/08/29/a-bulk-stock-updater-module-for-ubercart/</link>
		<comments>http://www.hiddentao.com/archives/2010/08/29/a-bulk-stock-updater-module-for-ubercart/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 18:44:31 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Ubercart]]></category>

		<guid isPermaLink="false">http://www.hiddentao.com/?p=968</guid>
		<description><![CDATA[On a recent Drupal project I was asked to build an interface whereby administrators could easily bulk-edit the stock levels for all their Ubercart products. I had a look on the web for something which already did this. I found Multiple stock edit &#8211; which only really worked with Ubercart 1.x and Drupal 5 (not [...]]]></description>
			<content:encoded><![CDATA[<p>On a recent Drupal project I was asked to build an interface whereby administrators could easily bulk-edit the stock levels for all their <a href="http://www.ubercart.org/" class="link-external">Ubercart</a> products. I had a look on the web for something which already did this. I found <a href="http://www.ubercart.org/contrib/5411" class="link-external">Multiple stock edit</a> &#8211; which only really worked with Ubercart 1.x and Drupal 5 (not to mention that it used the standard Drupal form submission mechanism, thus making it difficult to quickly bulk-edit large numbers of items). <a href="http://www.ubercart.org/contrib/12428" class="link-external">Stock and Price updater</a> only worked by importing CSV files. And <a href="http://drupal.org/project/views_bulk_operations" class="link-external">Views Bulk Operations</a> would only let you set the stock level to the same value across a range of products. 
<span id="more-968"></span></p>

<p>So I decided to build <a href="http://drupal.org/project/uc_bulk_stock_updater" class="link-external">Bulk Stock Updater</a>. It not only allows you to bulk-edit the stock levels for your entire product catalogue but uses AJAX for the editing process, thus allowing you to quickly change the values across multiple items without having to wait for page reloads. You can view your product catalogue one page at a time (the number of items per page being configurable via a variable) or you can view all the items on a single page. In the single-page view there is a Javascript-powered filter field which you can use to filter the list down to only show the items you want to edit.</p>

<p>I think there is scope for extending this module to allow bulk-editing of prices and perhaps other product attributes too. The AJAX-powered updating really does speed things up compared to normal form submissions.</p>

<p>Finally, I&#8217;m especially pleased as it&#8217;s my first published module on Drupal.org <img src='http://www.hiddentao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/archives/2010/08/29/a-bulk-stock-updater-module-for-ubercart/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A simple pager script for Drupal</title>
		<link>http://www.hiddentao.com/archives/2010/08/24/a-simple-pager-script-for-drupal/</link>
		<comments>http://www.hiddentao.com/archives/2010/08/24/a-simple-pager-script-for-drupal/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 16:14:55 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Pager]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.hiddentao.com/?p=938</guid>
		<description><![CDATA[Today I found myself needing to render pager links in Drupal 6 for a list of items. By pager I mean the links you usually see at the bottom of the page which indicate what page you&#8217;re currently on, what pages comes before and after and where you are in the grand context of the [...]]]></description>
			<content:encoded><![CDATA[<p>Today I found myself needing to render pager links in <a href="http://drupal.org/" class="link-external">Drupal 6</a> for a list of items. By <em>pager</em> I mean the links you usually see at the bottom of the page which indicate what page you&#8217;re currently on, what pages comes before and after and where you are in the grand context of the total number of pages available (example: <a href="http://drupal.org/search/apachesolr_search/e" class="link-external">http://drupal.org/search/apachesolr_search/e</a>). 
<span id="more-938"></span></p>

<p>Drupal has built-in pager generation methods (<a href="http://api.drupal.org/api/function/theme_pager/6" class="link-external">theme_pager</a>) but these either require you to have loaded the data to be paged from the local Drupal database or require you to shoe-horn the data you wish to page into Drupal&#8217;s pager global variables. I needed something simpler which would work with any data but which would still generate output similar to what Drupal&#8217;s pager functions generate.</p>

<p>After a bit of work I had something which did the job:</p>

<div class='sniplrcode'><ol class="php" style="font-family:monospace;"><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">/**</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* Return themed pager using same markup and CSS classes as the standard Drupal pager.</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;*</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* @param &nbsp;$total_pages total no. of pages.</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* @param &nbsp;$current_page the current page being viewed (1 lt;= $current_page lt;= $total_pages).</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* @param &nbsp;$num_pages_to_show no. of pages links for, excluding first, next, previous and last links .</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* @param &nbsp;$base_url the base URL for paging links. Each paging link will be at $base_url?page=lt;page_numgt;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* @return themed paging links; empty string if there is only one page in total.</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;*/</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> garland_simple_pager_links<span style="color: #009900;">&#40;</span><span style="color: #000088;">$total_pages</span><span style="color: #339933;">,</span> <span style="color: #000088;">$current_page</span><span style="color: #339933;">,</span> <span style="color: #000088;">$num_pages_to_show</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base_url</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; static <span style="color: #000088;">$buttons</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/empty" class="link-external"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$buttons</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$buttons</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;first&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;text&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;amp;laquo; first&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&#8216;link_tooltip&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;Go to first page&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;prev&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;text&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;amp;lsaquo; previous&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&#8216;link_tooltip&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;Go to previous page&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;next&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;text&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;next amp;rsaquo;&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&#8216;link_tooltip&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;Go to next page&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;last&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;text&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;last amp;raquo;&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&#8216;link_tooltip&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;Go to last page&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;current&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;class&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;current&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;ellipsis&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;text&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;&#8230;&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #666666; font-style: italic;">// show nothing if only one page</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> gt<span style="color: #339933;">;=</span> <span style="color: #000088;">$total_pages</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&#8221;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #666666; font-style: italic;">// remove all query params from the base URL</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #000088;">$base_url</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/ltrim" class="link-external"><span style="color: #990000;">ltrim</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&#8216;/&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #666666; font-style: italic;">// the first page in current set of pages</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #000088;">$pager_first</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$current_page</span> <span style="color: #339933;">-</span> <a href="http://www.php.net/intval" class="link-external"><span style="color: #990000;">intval</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$num_pages_to_show</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #666666; font-style: italic;">// the last page in current set of pages</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #000088;">$pager_last</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$current_page</span> <span style="color: #339933;">+</span> <a href="http://www.php.net/intval" class="link-external"><span style="color: #990000;">intval</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$num_pages_to_show</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #666666; font-style: italic;">// normalize</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> gt<span style="color: #339933;">;</span> <span style="color: #000088;">$pager_first</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$pager_last</span> <span style="color: #339933;">+=</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$pager_first</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$pager_first</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$total_pages</span> lt<span style="color: #339933;">;</span> <span style="color: #000088;">$pager_last</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$pager_first</span> <span style="color: #339933;">-=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$pager_last</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$total_pages</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> gt<span style="color: #339933;">;</span> <span style="color: #000088;">$pager_first</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$pager_first</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$pager_last</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$total_pages</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #666666; font-style: italic;">// show &#8216;prev&#8217; button</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> lt<span style="color: #339933;">;</span> <span style="color: #000088;">$current_page</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// show &#8216;first&#8217; button</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> lt<span style="color: #339933;">;</span> <span style="color: #000088;">$pager_first</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;class&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;pager-first&#8217;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;data&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> theme<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;simple-pager-link&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$buttons</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;first&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;class&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;pager-previous&#8217;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;data&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> theme<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;simple-pager-link&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$current_page</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$buttons</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;prev&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// show ellipsis</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span> lt<span style="color: #339933;">;</span> <span style="color: #000088;">$pager_first</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;class&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;pager-ellipsis&#8217;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;data&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> theme<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;simple-pager-link&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&#8216;&#8230;&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$buttons</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;ellipsis&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #666666; font-style: italic;">// page links</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #000088;">$pager_first</span><span style="color: #339933;">;</span> <span style="color: #000088;">$ilt</span><span style="color: #339933;">;=</span><span style="color: #000088;">$pager_last</span><span style="color: #339933;">;</span> <span style="color: #339933;">++</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$current_page</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;class&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;pager-current&#8217;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;data&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> theme<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;simple-pager-link&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$i</span><span style="color: #339933;">,</span> <span style="color: #000088;">$buttons</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;current&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;class&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;pager-item&#8217;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;data&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> theme<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;simple-pager-link&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$i</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;text&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&#8216;link_tooltip&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> t<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;Goto page @d&#8217;</span><span style="color: #339933;">,</span><a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;@d&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #666666; font-style: italic;">// show &#8216;next&#8217; button</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$total_pages</span> gt<span style="color: #339933;">;</span> <span style="color: #000088;">$current_page</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// show ellipsis</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$total_pages</span> gt<span style="color: #339933;">;</span> <span style="color: #000088;">$pager_last</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;class&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;pager-ellipsis&#8217;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;data&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> theme<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;simple-pager-link&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&#8216;&#8230;&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$buttons</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;ellipsis&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;class&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;pager-next&#8217;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;data&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> theme<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;simple-pager-link&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$current_page</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$buttons</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;next&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #666666; font-style: italic;">// show &#8216;last&#8217; button</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$total_pages</span> gt<span style="color: #339933;">;</span> <span style="color: #000088;">$pager_last</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$items</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;class&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;pager-last&#8217;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;data&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> theme<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;simple-pager-link&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$total_pages</span><span style="color: #339933;">,</span> <span style="color: #000088;">$buttons</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;last&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">return</span> theme<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;item_list&#8217;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$items</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&#8216;ul&#8217;</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;class&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;pager&#8217;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">/**</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* Return a themed pager link.</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;*</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* @param &nbsp;$base_url the base URL to add the paging query param to.</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* @param &nbsp;$page the number of the page to link to.</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* @param &nbsp;$button_attributes array(&#8216;link_tooltip&#8217; =gt;, &#8216;text&#8217; =gt; &#8216;class&#8217; =gt;).</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* If &#8216;link_tooltip&#8217; is ommitted then the text is returned witout a wrapping anchor. If &#8216;text&#8217; is ommitted then</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* $page is used as the link text.</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;*</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* @return themed pager link.</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;* @see garland_pager_link()</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009933; font-style: italic;">&nbsp;*/</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> garland_simple_pager_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$page</span><span style="color: #339933;">,</span> <span style="color: #000088;">$button_attributes</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/isset" class="link-external"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$button_attributes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;text&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$button_attributes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;text&#8217;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$page</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #000088;">$attributes</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;title&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset" class="link-external"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$button_attributes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;link_tooltip&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$button_attributes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;link_tooltip&#8217;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">&#8221;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset" class="link-external"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$button_attributes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;class&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #000088;">$attributes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;class&#8217;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$button_attributes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;class&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset" class="link-external"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$button_attributes</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&#8216;link_tooltip&#8217;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&#8216;lt;a href=quot;&#8217;</span><span style="color: #339933;">.</span> check_url<span style="color: #009900;">&#40;</span>url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$base_url</span><span style="color: #339933;">,</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;query&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&#8216;page&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$page</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&#8216;quot;&#8217;</span><span style="color: #339933;">.</span> drupal_attributes<span style="color: #009900;">&#40;</span><span style="color: #000088;">$attributes</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&#8216;gt;&#8217;</span><span style="color: #339933;">.</span> <span style="color: #000088;">$text</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">&#8216;lt;/agt;&#8217;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$text</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">// Amend you theme&#8217;s theme() method accordingly, as I&#8217;ve done below for Garland:</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp;</div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">function</span> garland_theme<span style="color: #009900;">&#40;</span><span style="color: #000088;">$existing</span><span style="color: #339933;">,</span> <span style="color: #000088;">$type</span><span style="color: #339933;">,</span> <span style="color: #000088;">$theme</span><span style="color: #339933;">,</span> <span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">&#8216;simple-pager-links&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;arguments&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;function&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;garland_simple_pager_links&#8217;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #0000ff;">&#8216;simple-pager-link&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;arguments&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <a href="http://www.php.net/array" class="link-external"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">NULL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&#8216;function&#8217;</span> <span style="color: #339933;">=</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">&#8216;garland_simple_pager_link&#8217;</span><span style="color: #339933;">,</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; &nbsp; <span style="color: #009900;">&#41;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></li>
<li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #009900;">&#125;</span></div></li>
</ol></div>

<p>The only hook you need to know is <strong>simple-pager-links</strong>. You pass it to the total number of pages in your result set, the current page number (should be between <code>1</code> and the total number of pages), and the number of page links to show either side of the current page&#8217;s item when rendering the pager links. Note that the pager does not need to know about how many data items you wish to show on each page or even what data you plan to show. The generated page links are of the form <code>http://&lt;domain.com&gt;/&lt;path&gt;?page=&lt;page_number&gt;</code>.</p>

<p>Example usage:</p>

<p><pre>
// total no. of pages = 20
// current page = 5
// no. of page links to show = 5
// base_url = http://domain.com/directory
$pager_html = theme('simple-pager-links', 20, 5, 5, 'http://domain.com/directory');
</pre></p>

<p>This would produce a pager like the following:</p>

<div id="pager" style="background-color: #ddd; padding: 2px;"></div>

<script type="text/javascript">
pager_render_links(20,5,5);

function pager_render_links(total_pages, current_page, num_page_links)
{
    if (1 > total_pages)
        return;

    var buttons = new Object;
    buttons["first"] = new Object;  buttons["first"]["text"] = "&laquo; first"; buttons["first"]["link_tooltip"] = "Go to first page";
    buttons["last"] = new Object;   buttons["last"]["text"] = "last &raquo;";   buttons["last"]["link_tooltip"] = "Go to last page";
    buttons["next"] = new Object;   buttons["next"]["text"] = "next &raquo;";   buttons["next"]["link_tooltip"] = "Go to next page";
    buttons["prev"] = new Object;   buttons["prev"]["text"] = "&laquo; previous";   buttons["prev"]["link_tooltip"] = "Go to previous page";
    buttons["current"] = new Object;    buttons["current"]["class"] = "current";
    
    var pager_first = current_page - Math.floor(num_page_links / 2);
    var pager_last = current_page + Math.floor(num_page_links / 2);

    // normalize
    if (1 > pager_first)
    {
        pager_last += (1 - pager_first);
        pager_first = 1;
    }
    if (total_pages < pager_last) {
        pager_first -= (pager_last - total_pages);
        if (1 > pager_first)
            pager_first = 1;
        pager_last = total_pages;
    }   
    
    var items = '<ul style="display:block;list-style:none;">';
    
    // show 'prev' button
    if (1 < current_page) {
        // show 'first' button
        if (1 < pager_first) {
            items += pager_construct_page_link("pager-first", total_pages, 1, num_page_links, buttons["first"]);
        }
        items += pager_construct_page_link("pager-previous", total_pages, current_page-1, num_page_links, buttons["prev"]);
        // show ellipsis
        if (1 < pager_first) {
            items += pager_construct_text('...', 'pager-ellipsis'); 
        }
    }
    
    // page links
    for (var i=pager_first; i<=pager_last; ++i) {
        if (i == current_page) {
            items += pager_construct_text('<strong>' + current_page + '</strong>', 'pager-current');
        } else {
            var bt = new Object; bt["text"] = "" + i; bt["link_tooltip"] = "Goto page " + i;
            items += pager_construct_page_link("pager-item", total_pages, i, num_page_links, bt);
        }
    }
    
    // show 'next' button
    if (total_pages > current_page) {
        // show ellipsis
        if (total_pages > pager_last) {
            items += pager_construct_text('...', 'pager-ellipsis'); 
        }
        items += pager_construct_page_link("pager-next", total_pages, current_page+1, num_page_links, buttons["next"]);
        // show 'last' button
        if (total_pages > pager_last) {
            items += pager_construct_page_link("pager-last", total_pages, total_pages, num_page_links, buttons["last"]);
        }
    }
    
    items += "</ul>";
    
    document.getElementById("pager").innerHTML = items;
}

function pager_construct_page_link(li_class, total_pages, current_page, num_page_links, button)
{
    var text = current_page;
    if (undefined != button["text"])
        text = button["text"];
        
    var tooltip = '';
    if (undefined != button["link_tooltip"])
        tooltip = button["link_tooltip"];

    return '<li style="display:inline-block;padding:0 10px;" class="' + li_class + '"><a href="#" ' + 
            'onclick="pager_render_links(' + total_pages + ',' + current_page + ',' + num_page_links + '); return false;"' + 
            ' title="' + tooltip + '">' + text + '</a></li>';
}
function pager_construct_text(text, li_class)
{
    return '<li style="display:inline-block;padding:0 10px;" class="' + li_class + '">' + text + '</li>';
}
</script>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/archives/2010/08/24/a-simple-pager-script-for-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My first Android Market app purchasing experience</title>
		<link>http://www.hiddentao.com/archives/2010/08/20/my-first-android-market-app-purchasing-experience/</link>
		<comments>http://www.hiddentao.com/archives/2010/08/20/my-first-android-market-app-purchasing-experience/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 21:10:48 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Drums]]></category>
		<category><![CDATA[Google Checkout]]></category>

		<guid isPermaLink="false">http://www.hiddentao.com/?p=947</guid>
		<description><![CDATA[Today I decided to make my first purchase on the Android Market. Up until now I&#8217;ve been downloading and using free apps. Then recently I came across KJ Sawka&#8217;s DrumBanger for the iPhone and decided that I definitely needed to get in on that action on my HTC Hero. The closest thing I could find [...]]]></description>
			<content:encoded><![CDATA[<p>Today I decided to make my first purchase on the <a href="http://www.android.com/market/" class="link-external">Android Market</a>. Up until now I&#8217;ve been downloading and using free apps. Then recently I came across <a href="http://www.youtube.com/watch?v=c9SqPKgLSI4" class="link-external">KJ Sawka&#8217;s DrumBanger</a> for the iPhone and decided that I definitely needed to get in on that action on my HTC Hero. The closest thing I could find (atleast I think it&#8217;s similar) is the <a href="http://www.nikotwenty.com/" class="link-external">Electrum Drum Machine</a>. It&#8217;s been getting great user reviews in the Market and at $4 and between 10-50,000 downloads I figured it had to be somewhat decent. So the next bit was to pay for the app and get hold of it on my phone. And this is where things got interesting&#8230;
<span id="more-947"></span></p>

<p>I hit the the &#8216;Buy&#8217; button on the app&#8217;s page in the Android Market. I was taken to a screen where I had to fill in my credit card details; so far so good. I filled everything in and hit the submit button. After a bit of network traffice (I could tell from the indicator at the top) I got a <em>&#8220;Server error&#8221;</em> message asking me to retry, cancel or return to the main screen. I retried a number of times but to no avail &#8211; the same error kept coming back at me. In frustration I turned to my desktop and logged into my Gmail account (the same one my phone uses) and tried signing up Google Checkout that way. This time I was able to submit my credit card details just fine. I got back on the phone and hit the &#8216;Buy&#8217; button again. It picked up my card details from my Google Checkout account and took me straight to the confirmation page. I confirmed the payment and it informed that my download would begin soon and that the notification would appear in the top bar.</p>

<p>I got the notification and went to a detailed view of the download. But nothing was downloading. The progress bar was showing a fuzzy animation but the only text I could see was <em>&#8220;Authorizing credit card&#8230;&#8221;</em>. So I checked my Google Checkout account from my desktop and saw that the order had gone through. Even as I started writing this blog entry (20 minutes from initial payment) it was still stuck at this authorization phase. Eventually my phone informed me that my download had been &#8220;unsuccessful&#8221;. So I went back into the app page and clicked <em>Install</em>. This time the download started working. Hooray!</p>

<p>A quick search on the web (using Google Search &#8211; a product of theirs that actually works well) I can see that other people have experienced <a href="http://www.google.com/support/forum/p/Android+Market/thread?tid=768ff3029eb670cf&amp;hl=en" class="link-external">these</a> <a href="http://www.google.co.uk/support/forum/p/Android+Market/thread?tid=1ce459553b1bc8a7&amp;hl=en" class="link-external">problems</a> too. From reading the comments posted up by other people it seems that this is a fundamentally badly run payment system. People have tried factory-resetting their phones, using different credit cards, using new Google Accounts and what-not. And apparently it did eventually work for some although the time between making the payment and actually getting the download varied from a few minutes to a few hours, all the while showing the &#8220;Authorizing credit card&#8230;&#8221; message. What&#8217;s more, numerous people rang up their bank only to find that although Google Checkout said the order had gone through their credit card hadn&#8217;t actually been charged. Bizarre!</p>

<p>From what I&#8217;ve heard about the iPhone purchase process, it&#8217;s far less painful and more reliable. What I really don&#8217;t understand is why Google don&#8217;t invest more in bringing Google Checkout to a higher level of quality and service. All the current evidence points to the conclusion that enabling a paid-for app market in Android really isn&#8217;t a priority for them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/archives/2010/08/20/my-first-android-market-app-purchasing-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git + Windows Vista + Eclipse</title>
		<link>http://www.hiddentao.com/archives/2010/08/12/git-windows-vista-eclipse/</link>
		<comments>http://www.hiddentao.com/archives/2010/08/12/git-windows-vista-eclipse/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 10:53:04 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.hiddentao.com/?p=921</guid>
		<description><![CDATA[I&#8217;ve recently begun using Git for some of my software projects. I&#8217;ve also started storing my repository on GitHub, a great way of sharing open source code with other developers. Git was originally developed for use on *nix systems &#8211; Windows support came a little bit later and many of the Git GUI tools have [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently begun using <a href="http://git-scm.com/" class="link-external">Git</a> for some of my software projects. I&#8217;ve also started storing my repository on <a href="http://github.com/hiddentao" class="link-external">GitHub</a>, a great way of sharing open source code with other developers. Git was originally developed for use on *nix systems &#8211; Windows support came a little bit later and many of the Git GUI tools have yet to reach an equivalent level of maturity to the SVN tools out there (such as <a href="http://tortoisesvn.tigris.org/" class="link-external">TortoiseSVN</a>). Nevertheless, I needed to Git working on Vista laptop and this post talks about the setup I&#8217;m using to get everything working.
<span id="more-921"></span>
Before I could really start using Git effectively I had to understand how it was different from the centralised version control systems (e.g. SVN) I had used in the past. A <a href="http://www.eecs.harvard.edu/~cduan/technical/git/" class="link-external">great article by Charles Duan</a> explains the fundamental concept behind Git &#8211; it&#8217;s about manipulating _commit trees_. And once I started using Git I found myself lacking in understanding when it came to _remotes_ &#8211; so I had found another article to explain <a href="http://consttype.blogspot.com/2008/10/git-how-remotes-work.html" class="link-external">how merging from remote branches works</a> in Git. Now I was ready to setup my tooling.</p>

<p>Initially I grabbed <a href="http://www.eclipse.org/egit/" class="link-external">EGit</a> for Eclipse Helios. This is a Git client implementation built on top of <a href="http://www.jgit.org/" class="link-external">JGit</a>, and is written in pure Java. I found that it works exceptionally well at cloning repositories and performing &#8216;pulls&#8217;. But when it comes to &#8216;push&#8217;-ing code back to the remote branch it requires you to configure the push reference and URL in your <code>.git/config</code> file (atleast at the time of writing this). With the other tools this isn&#8217;t necessary but EGit sems to require it for now. Note that this isn&#8217;t such a bad thing as it encourages you to learn how to write branch specs!</p>

<p>I then tried the tools that came with the Git distribution for Windows. These work great. There&#8217;s a Git Bash shell which provides a Cygwin-like shell in which you can run all the Git commands. There&#8217;s also a bare-bones Git GUI which allows you to clone a repository, commit changes and push commits up to the remote branch. Bot of these tools have Explorer integration which is good. The GUI uses the Git command-line tools to perform its operations and it makes it quicker to see the change diffs for your local changes.</p>

<p>The only thinking lacking in Git GUI is a nice Git commit history view though. This is where <a href="http://sourceforge.net/projects/gitextensions/" class="link-external">Git Extensions</a> comes in. This provides a nice GUI which also has Explorer integration. It also uses the Git command-line tools to perform its operations and it provides you atleast all the commands the standard Git GUI  does, plus more. Git Extensions also has decent commit history view which makes it easy to see where and when branches have been merged and forked. My only gripe with it is that the Git Push doesn&#8217;t always work for remote repository URL which is in the form:</p>

<p><pre>
ssh://user@domain/project.git
</pre></p>

<p>The standard Git GUI works great for this URL. However, if you&#8217;re just pushing to Github (which relies on SSH key authentication) then Git Extensions will work great for you. By the way, for SVN users who are used to using <code>svn+ssh://</code> there is no equivalent in Git &#8211; just use <code>ssh://</code> instead.</p>

<p>One final tip: when you clone a remote repository onto your Windows machine, edit <code>.git/config</code> and ensure the <code>filemode</code> setting is set to <code>false</code>. Otherwise when you come to make your first commit you&#8217;ll find it including a whole bunch of files which you didn&#8217;t even touch purely because their file permissions have changed (I didn&#8217;t even realise Git stored file permissions!). In fact, here is the <code>.git/config</code> file for my <a href="http://github.com/hiddentao/patterns2" class="link-external">Drupal Patterns fork</a>:</p>

<p><pre>
[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[remote "origin"]
    fetch = +refs/heads/<em>:refs/remotes/origin/</em>
    url = git@github.com:hiddentao/patterns2.git
</pre></p>

<p><strong>Update 1:</strong> I found a <a href="http://cheat.errtheblog.com/s/git" class="link-external">Git cheat sheet</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/archives/2010/08/12/git-windows-vista-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Three Words now on Facebook and your website</title>
		<link>http://www.hiddentao.com/archives/2010/05/17/my-three-words-now-on-facebook-and-your-website/</link>
		<comments>http://www.hiddentao.com/archives/2010/05/17/my-three-words-now-on-facebook-and-your-website/#comments</comments>
		<pubDate>Mon, 17 May 2010 14:25:02 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[MyThreeWords]]></category>
		<category><![CDATA[Widget]]></category>

		<guid isPermaLink="false">http://www.hiddentao.com/?p=897</guid>
		<description><![CDATA[Remember My Three Words? Over the last month or so we&#8217;ve been busy adding lots more to it. You can now get it on Facebook at http://apps.facebook.com/mythreewords/. And you can share your favourite stories on Facebook itself and invite your friends to play with you. But the coolest new thing is the little widget (see [...]]]></description>
			<content:encoded><![CDATA[<p>Remember <a href="http://www.hiddentao.com/archives/2010/03/31/my-three-words/" class="liinternal">My Three Words</a>? Over the last month or so we&#8217;ve been busy adding lots more to it.</p>

<p>You can now get it on Facebook at <a href="http://apps.facebook.com/mythreewords/" class="link-external">http://apps.facebook.com/mythreewords/</a>. And you can share your favourite stories on Facebook itself and invite your friends to play with you.</p>

<p>But the coolest new thing is the little widget (see below) which can be embedded on your website. <span id="more-897"></span>So your visitors will get to see what crazy story is being concocted right now on <a href="http://mythreewords.com/" class="link-external">My Three Words</a>. To embed the widget onto a webpage simply insert the following line of code within the <code>&lt;body&gt;&lt;/body&gt;</code> tags where you want the widget to show up:</p>

<pre><code>&lt;script type="text/javascript" src="http://mythreewords.com/widget"&gt;&lt;/script&gt;
</code></pre>

<p>The widget is contained within a <code>&lt;div&gt;</code> element with the class <code>m3w-widget</code>. It re-uses the styles from the My Three Words homepage. The above <code>&lt;script&gt;</code> loads some Javascript which in turn loads jQuery, output the HTML and loads the widget-specific Javascript which will be responsible for fetching new data from the My Three Words server. <a href="http://en.wikipedia.org/wiki/JSON" rel="nofollow" class="liwikipedia">JSONP</a> is used to work around the &#8216;Same Origin&#8217; policy.</p>

<p>The widget:</p>

<script type="text/javascript" src="http://mythreewords.com/widget"></script>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/archives/2010/05/17/my-three-words-now-on-facebook-and-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The 14 spiritual laws of success</title>
		<link>http://www.hiddentao.com/archives/2010/04/27/the-14-spiritual-laws-of-success/</link>
		<comments>http://www.hiddentao.com/archives/2010/04/27/the-14-spiritual-laws-of-success/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 09:31:04 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Success]]></category>
		<category><![CDATA[Vedanta]]></category>

		<guid isPermaLink="false">http://www.hiddentao.com/?p=823</guid>
		<description><![CDATA[Last weekend I attended a retreat with Chinmya Mission UK, a non-profit organisation which promotes the Advaita Vedanta philosophies. I got to meet one of their teachers &#8211; Swami Swaroopananda. He was a jolly fellow, always with a smile on his face and very accomodating to our questions. The topic of the weekend was &#8220;The [...]]]></description>
			<content:encoded><![CDATA[<p>Last weekend I attended a retreat with <a href="http://www.chinmayauk.org/" class="link-external">Chinmya Mission UK</a>, a non-profit organisation which promotes the <a href="http://en.wikipedia.org/wiki/Vedanta#Advaita_Vedanta" rel="nofollow" class="liwikipedia">Advaita Vedanta</a> philosophies. I got to meet one of their teachers &#8211; <a href="http://www.chinmayauk.org/Our%20Leaders/Swami%20Swaroopananda.htm" class="link-external">Swami Swaroopananda</a>. He was a jolly fellow, always with a smile on his face and very accomodating to our questions. The topic of the weekend was <strong>&#8220;The 14 Spiritual laws of success&#8221;</strong> and Swami-ji (what people call him out of respect) gave us a number of inspiring lectures covering this topic, littered throughout with funny observations and anecdotes from his own life. I found it to be an inspirational weekend and decided to write up my notes in this blog post. So without further adue&#8230;
<span id="more-823"></span></p>

<h2>Defining success</h2>

<p>Before we can work out how to be successful we need to properly define success. And different people have different ideas of what it means to be successful so our definition must be general enough yet still be precise and applicable to everyone. So,</p>

<p><em>Success = getting what you want, by the right means, resulting in fulfillment.</em></p>

<p>The <em>getting what you want</em> part is obvious. The <em>right means</em> is stating that you achieve the success in a way in which you are not cheating yourself (e.g. by lying, stealing, etc.). The <em>fulfillment</em> part states that what you want (and get) must fulfill you. It&#8217;s linked to the <em>right means</em> (e.g. achieve success through honest, hard work) but also asks you to first work out what true fulfillment is to you. For example, if more money is your goal then is it just having the money which matters? or is it something deeper such as the feeling you give yourself by having the money? or is it even deeper such as just being happy? Fulfillment can be thought of as a deeper sense of gratification so a fulfilling achievement gives you the feeling of happiness for longer and at a deeper level than an unfulfilling achievement.</p>

<p>In addition to the above, Swami-ji mentions that most of the time, success depends not only your own level of confidence in yourself, but also on the confidence other people have in you &#8211; because you will need other peoples&#8217; help in order to achieve success.</p>

<h2>1: Law of Eternity</h2>

<p>The law of eternity states that your are eternal. Energy is eternal &#8211; it never gets created or destroyed, it only changes form. Because matter equals a form of energy it is also eternal in that sense. So when you die the matter which makes up your body gets converted into a different form.</p>

<p>But the eternity spoken of here goes deeper than this. At no point in your life do you ever feel old. Yes, your mind acknowledges that you are old and perhaps in certain situations you feel like an &#8220;oldie&#8221;. But when you are simply thinking in your mind there is sense of <em>me</em> there &#8211; this core identity of who you are &#8211; which never really changes in your own mind. From your childhood this <em>me</em> feeling has remained unchanged. Swami-ji argues that this <em>me</em> is the real, eternal you and that the only reason you do not sense this eternity yourself is because you are not yet <a href="http://en.wikipedia.org/wiki/Self-realisation" rel="nofollow" class="liwikipedia">self-realised</a>. You cannot intellectually arrive at the realisation that your true essence is eternal, you can only come to know it as a deep truth, i.e. one day the penny will drop (strange, huh?).</p>

<p>So given that on the deepest level the <em>me</em> is eternal you have no reason to fear anything in this world. You are fearless. And this is different to courage. Courage can be thought of as acting in spite of your fear. An extremely courageous person can reach a point where fear becomes irrelevant to them because they know they will be able to overcome it. But the idea of fearlessness proposed here allows you to prevent any fear occuring in the first place through knowing that you are eternal. You are no longer afraid of death. You know you can handle anything life throws at you. You no longer need to compete with other people in this world to live happily.</p>

<p>Now you may disagree with the above idea of this inner <em>me</em> feeling and its sense of eternity and that&#8217;s ok. The important point to remember is to be fearless as much as you can. For those who do believe in the above idea of eternity and self-realisation it should be apparent that mastering this law of success will result in not needing any other law of success &#8211; in that respect it&#8217;s the most important one.</p>

<h2>2: Law of Change</h2>

<p>According to the first law the inner <em>me</em> is changeless. The flip side to that is that everything else that is not the inner <em>me</em> is changing, all the time. Your personality, your body, the objects around you, the world, other peoples&#8217; personalities and bodies. Everything. It&#8217;s all changing. And thus you can always change your feeling of unfulfillment into fulfillment. If time&#8217;s are bad right now, don&#8217;t worry, they can change for the better. It time&#8217;s are good then hang on, they&#8217;re going to get even better <img src='http://www.hiddentao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>To take advantage of change you must be an adaptable person. If you&#8217;re adaptable you will see opportunities even in difficult times (e.g. recession). You will never be without hope.</p>

<h2>3: Law of Time</h2>

<p>Every moment is an opportunity. Time is the one thing you can never get back. Therefore time is your most precious asset. The only time you every really have is Now. The past has already gone by, and the future is not yet written. So if you want to do something, say something or be something then the time to take action is now, without delay.</p>

<p>There is a right time for everything. A right time to eat, sleep, wake up, etc. It doesn&#8217;t really matter what time you goto bed but you should wake up at dawn. You should get enough sleep each night. You should try and eat at the same times each day. Never skip breakfast. Work when you must work, don&#8217;t procrastinate. If you study successful people you will notice that nearly all of them have a disciplined routine.</p>

<p>Swami-ji opined that India&#8217;s inability to achieve it&#8217;s maximum potential so far as has been due to the lack of respect for time in the Indian attitude. He&#8217;s probably right about that one.</p>

<p>Time also relates to patience and perseverance. You&#8217;ve got to stick things through to the end. Even when things aren&#8217;t working out don&#8217;t give up. Sometimes you may spend a lot of time working on a problem only to have made little progress. Though you may be feel that you haven&#8217;t achieved much and are tempted to give up, stop and realise that the time you spent working on the problem only made you more knowledgable and capable in dealing with that problem and you may actually be closer to a breakthrough than you realise.</p>

<h2>4: Law of Integrity</h2>

<p>Having integrity means your <em>mind</em> and <em>intellect</em> are in alignment with each other. Your mind consists of your thoughts and emotions. Your intellect is the logical, reasoning part of your brain which knows right from wrong (atleast from your own subjective point of view). Every time you tell a lie your mind is disobeying your intellect. Over time this leads to your intellect taking a &#8220;back seat&#8221; when it comes to everything you do. You may think that you can tell a white lie once and then be truthful from then on but you don&#8217;t realise that you are actually training yourself to tell more lies in future. And when you tell a lie or act dishonestly you are not only cheating other people, you are also cheating yourself. Swami-ji&#8217;s words:</p>

<blockquote>
  <p>&#8220;Truth is that which exists and therefore cannot be denied. A lie is successful only in so far as it is able to appear as the truth. Even the mafia are only successful because they are honest amongst themselves. Because only truth brings unity. But speaking the truth is not enough. If you don&#8217;t also live upto your convictions your words and actions will lack real power.&#8221;</p>
</blockquote>

<p>When you are being dishonest you have opposing thoughts in your head. This leads to slower decision making. When you are being honest your mind and intellect are integrated, which leads to quicker, more spontaneous decision making. People tend to follow the latter type of person as a leader. Building your integrity will thus help build the confidence other people have in you.</p>

<p>Finally, your mind and intellect must be aligned if you are to progress in meditation. In other words your mind must be at peace with itself. Another reason why integrity is important.</p>

<h2>5: Law of Courtesy</h2>

<p>How you present the truth to others is an important factor in your success. And how you do this depends on your character. It is necessary for other to people to trust and like you in order to achieve success. Therefore speak the truth. But only if it is for the well-being of the other person. And be polite and courteous when you speak it &#8211; don&#8217;t be brash.</p>

<p>On a related note, an action by itself is not necessarily hurtful. It is the intention behind the action which is important.</p>

<h2>6: Law of Dynamism</h2>

<p>By dynamism in this context we mean strength and power. You <strong>always</strong> have the energy when you do something you enjoy. In order to achieve success you nead a goal which inspires you. In fact, you need a goal you <strong>love</strong>. Greed, anger and fear can certainly give you strength and power but only for a short while. Only love and inspiration can give you the stamina to keep going for longer. Love leads to dedication and commitment which in turn lead to physical strength, emotional strength and intellectual determination.</p>

<p>Note that it is important to articulate your desire as a goal. This is key to achieving it.</p>

<h2>7: Law of Conservation</h2>

<p>In a nutshell, produce more than you consume. Live within your means, live in moderation. This means to spend your resources intelligently and not excessively. By &#8216;resources&#8217; Swami-ji don&#8217;t just mean money but everything else too &#8211; time, food, water, natural resources, the environment, etc.</p>

<p>It is also important to rest your mind and body since they are also resources in a sense. If all your energy is spent on sense pleasures (e.g. TV, shopping, consuming) then your resources become liabilities instead of assets. Instead, re-investing your resources to produce more vitality &#8211; e.g. resting, saving money, protecting the environment &#8211; leads to them being assets rather than liabilities.</p>

<h2>8: Law of Forgiveness</h2>

<p>Learn to forgive yourself of past failures.</p>

<p>There are 3 channels through which we often waste our energy &#8211; past regrets, present over-excitement and future anxiety. And we tend to chain ourselves to past grievances rather than past successes. Thus we&#8217;re often not ready to do something new due to attachment to our past.</p>

<p>When we learn to forgive others we learn to forgive ourselves. And forgiving ourselves is one of the hardest things to do.</p>

<p>Forgiving someone who has hurt you is not a sign of weakness. Instead, it is strength because it shows you are refusing to retaliate even though you can.</p>

<h2>9: Law of Compassion</h2>

<p>If forgiveness frees you from the past then compassion &#8220;frees&#8221; you in the present. Compassion leads to empathy, sympathy and kindness. These qualities have their own strength and stamina which will help you weather crises better.</p>

<h2>10: Law of Acceptance</h2>

<p>Accept what you can&#8217;t change. Accept whatever life throws at you (even failure). Acceptance does not mean giving up &#8211; it means taking responsibility for the result no matter what. If you can do this then you will no longer worry about outcomes.</p>

<p>Accept this present moment as it is. There is no other moment, just Now.</p>

<h2>11: Law of Action &amp; Reaction</h2>

<p>Every action has a consequence/reaction. This implies that you are responsible for your success or lack thereof. Live your consequences and don&#8217;t cheat yourself. When you blame others for your failures it&#8217;s the same as saying that you are no longer responsible for your own life.</p>

<p>You get what you deserve for your efforts, not what you desire. The results may not always come in the form you expect, but they will come. No effort is wasted &#8211; you always gain from your experiences.</p>

<h2>12: Law of Existence</h2>

<p>As long as something exists it is not useless. Try and think of something which exists in this world which can have no possible use whatsoever &#8211; it&#8217;s impossible. Thus if a thing were to become useless it would become extinct.</p>

<p>There is something special in you as long as you exist. Therefore never give up on yourself.</p>

<h2>13: Law of Sharing</h2>

<p>It is important to share with others. When the people around you become prosperous, so do you. This implies that there is a natural synergy between your&#8217;s and others&#8217; successes. This is due to the underlying unity we have as human beings living together.</p>

<p>Nature&#8217;s ecosystem has evolved to be one of sharing. This is the only way to achieve long-term stability.</p>

<h2>14: Law of Grace</h2>

<p>Grace is the universe&#8217;s way of conspiring to give you what you want. To benefit from grace you must first put in your best effort (the first 13 laws) and be grateful for what you have.</p>

<h2>Final thoughts</h2>

<p>You may not agree with everything written above, and indeed I found myself disagreeing with Swami-ji on some things. But I was able to take away many useful ideas from what he said and hopefully it will be the same for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/archives/2010/04/27/the-14-spiritual-laws-of-success/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Three Words</title>
		<link>http://www.hiddentao.com/archives/2010/03/31/my-three-words/</link>
		<comments>http://www.hiddentao.com/archives/2010/03/31/my-three-words/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 09:53:34 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Comet]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[Miura]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MyThreeWords]]></category>

		<guid isPermaLink="false">http://www.hiddentao.com/?p=782</guid>
		<description><![CDATA[I&#8217;m currently doing some work for Miura, a digital design agency based in London. A month ago the creative director came up with a silly but fun idea: &#8220;how about a page where different people can come in and type in 3 words a time, building up a short story?&#8221;. I told him I could [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently doing some work for <a href="http://miura.gi/" class="link-external">Miura</a>, a digital design agency based in London. A month ago the creative director came up with a silly but fun idea: &#8220;how about a page where different people can come in and type in 3 words a time, building up a short story?&#8221;. I told him I could probably knock up a prototype within an hour though I didn&#8217;t think he&#8217;d want me to actually do it!
<span id="more-782"></span></p>

<p>So I wrote a cheap and nasty PHP script which stored the input in a local CSV file. Once the page loaded it would fetch the existing story data via AJAX (using <a href="http://jquery.org/" class="link-external">jQuery</a>) and the user would submit new data using a simple form at the bottom. We had a quick play around with this in the office and it was quite amusing. Because the AJAX fetch would run only once every 5 seconds you&#8217;d often finish inputting your 3 words to continue the story only to find that someone else had already beaten you to the punch. So the story ended up not making much sense but I think this actually made it funnier, especially given how quickly everything disintegrated into a discussion about pooh and other lowbrow stuff (tells you a lot about us, doesn&#8217;t it?).</p>

<p>After this successful &#8220;pre-alpha&#8221; in the office we decided to build it properly and make it public &#8211; <a href="http://mythreewords.com/" class="link-external">mythreewords.com</a>. Here&#8217;s how it works. The active story is always at the top. You can enter 3 words at a time, no more no less. And you can&#8217;t have URLs or HTML tags in your words. If you end your last word with a <code>?</code>, <code>.</code> or <code>!</code> then you complete the active story and it gets shifted below. A new story is begun with the first 3 words auto-generated by the system.</p>

<div class="img">
<img src="http://farm5.static.flickr.com/4004/4478710598_e72751dd5f_o.jpg" alt="Overview of MyThreeWords" />
</div>

<p>Completed stories have a button next to them which allows you to tweet them through your Twitter account (if you have one). Since tweets have a 140-character limit we truncate the story if necessary and insert a link back to the full version of the story using a short alias domain (<a href="http://m3w.in/" class="link-external">m3w.in</a>):</p>

<div class="img">
<img src="http://farm3.static.flickr.com/2746/4478084063_be8c1d8c2a_o.jpg" alt="Tweeting a MyThreeWords story" />
</div>

<p>For the public release I rewrote the original codebase using <a href="http://www.kohanaphp.com/" class="link-external">Kohana 3</a> for the 
framework and MySQL for storing the data. I investigated <a href="http://en.wikipedia.org/wiki/Comet_%28programming%29" rel="nofollow" class="liwikipedia">AJAX Comet</a> techniques and settled on using long-polling to simulate data push from the server to the client. This means is that as soon as someone else adds their three words all the other clients are almost immediately updated.</p>

<p>To further increase performance the system does not write anything to the database until the active story has been completed. Until that point everything is stored in a <a href="http://memcached.org/" class="link-external">memcached</a> instance running on the same machine. Once the active story is completed by a user it gets marked as such and a new active story gets created and cached. A cron script running every 60 seconds then processes all completed stories by inserting them into the database (and subsequently removing them from memcached).</p>

<p>I also had a go at providing notification when other users are typing. How it works: when the page loads it generates a unique id. When the user starts entering words into the input field an AJAX call is made to the server which this unique id. The server then stores all such submitted unique ids together in a an array in memcached. Changes to this array are pushed to all clients (using the Comet technique mentioned above) who then indicate how many users are currently typing:</p>

<div class="img">
<img src="http://farm5.static.flickr.com/4043/4478118047_f2be451f7e_o.png" alt="See when others are typing" />
</div>

<p>Only upto 5 unique ids are stored on the server so that the array search complexity never exceeds <a href="en.wikipedia.org/wiki/Big_O_notation" rel="nofollow" class="liinternal">O(5)</a> (clients show this as <em>4+ typing</em>). The array data is automatically cleared after 5 seconds of no change to avoid stale data. And clients don&#8217;t inform the server that they&#8217;re typing more frequently than once every 5 seconds.</p>

<p>If you want to understand the internal workings of the site better use <a href="https://addons.mozilla.org/en-US/firefox/addon/1843" class="link-external">Firebug</a> (or your preferred tool) to eavesdrop on the AJAX calls.</p>

<p>So that&#8217;s the sum total of the site for now. Implementing it was a lot of fun. I hope you enjoy it too <img src='http://www.hiddentao.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p><a href="http://mythreewords.com/" class="link-external">MyThreeWords.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/archives/2010/03/31/my-three-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting page tags to show on your WordPress pages</title>
		<link>http://www.hiddentao.com/archives/2010/03/24/getting-page-tags-to-show-on-your-pages/</link>
		<comments>http://www.hiddentao.com/archives/2010/03/24/getting-page-tags-to-show-on-your-pages/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 12:23:29 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Page Tagger]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.hiddentao.com/?p=771</guid>
		<description><![CDATA[A number of users of Page Tagger have emailed in asking how to get their page tags showing on their pages. So I thought I&#8217;d put up a short blog post on how to do this. Once you&#8217;ve happily tagged your pages using Page Tagger you need to edit your theme&#8217;s page.php template. This is [...]]]></description>
			<content:encoded><![CDATA[<p>A number of users of <a href="http://www.hiddentao.com/code/wordpress-page-tagger-plugin/" class="liinternal">Page Tagger</a> have emailed in asking how to get their page tags showing on their pages. So I thought I&#8217;d put up a short blog post on how to do this.</p>

<p>Once you&#8217;ve happily tagged your pages using Page Tagger you need to edit your theme&#8217;s <code>page.php</code> template. This is the <a href="http://codex.wordpress.org/Pages#What_Template_is_used_to_Display_a_Particular_Page.3F" class="liwp">template which gets used by WordPress</a> whenever you view a static page (as opposed to a blog post) on your site.
<span id="more-771"></span>
Inside this file you should have a section resembling <a href="http://codex.wordpress.org/The_Loop" class="liwp">&#8220;The Loop&#8221;</a>:</p>

<p><pre><code>&lt;? php if (have_posts()) : while (have_posts()) : the_post(); ? >
...
&lt;? php endwhile; endif; ? >
</code></pre></p>

<p>Inside this section you need to place a call to the <code>the_tags()</code> template method. This will output your page tags at that spot with some default formatting. Read the <a href="http://codex.wordpress.org/Template_Tags/the_tags" class="liwp">documentation for the_tags()</a> for information on changing how it works. You can also use alternative functions such as <code>get_the_tags()</code>or <code>get_the_tag_list()</code> to achieve a similar effect.</p>

<p>If for some reason your page tags still aren&#8217;t showing on your page then please get in touch as it maybe a bug in the Page Tagger plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/archives/2010/03/24/getting-page-tags-to-show-on-your-pages/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dropbox on removable media</title>
		<link>http://www.hiddentao.com/archives/2010/02/07/dropbox-on-removable-media/</link>
		<comments>http://www.hiddentao.com/archives/2010/02/07/dropbox-on-removable-media/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 14:11:09 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Dropbox]]></category>

		<guid isPermaLink="false">http://www.hiddentao.com/?p=760</guid>
		<description><![CDATA[I&#8217;ve been using Dropbox for a while now. For those who are unfamiliar with it it&#8217;s an application which makes it easy to share files online with anyone. Essentially, Dropbox creates a &#8220;My Dropbox&#8221; folder on your computer. This folder is automatically kept in sync with your Dropbox account online &#8211; thus, anything you put [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://www.dropbox.com/" class="link-external">Dropbox</a> for a while now. For those who are unfamiliar with it it&#8217;s an application which makes it easy to share files online with anyone. Essentially, Dropbox creates a &#8220;My Dropbox&#8221; folder on your computer. This folder is automatically kept in sync with your Dropbox account online &#8211; thus, anything you put into this folder gets automatically uploaded to your Dropbox online account. If you choose to share your Dropbox folder (or even just a specific file) with somebody else then the changes you make to the folder will show up in their local copy of it (they have to be signed up to Dropbox too) and vice versa. Dropbox simply sits in the background and synchronises the folder &#8211; the folder looks and works just like a normal filesystem folder.
<span id="more-760"></span></p>

<p>By default the Dropbox application starts automatically upon boot-up and and it expects the dropbox folder to be available to it all times while it&#8217;s running. The rationale behind this (I&#8217;m guessing) is that most users will want Dropbox to work seamlessly in the background without having to worry about having to manually start it or initiate the synchronisation. This is all great until you want to place your Dropbox local folder onto removable media such as your USB flash drive, so that you can have access to your stuff on-the-go. The Dropbox application won&#8217;t let you create your Dropbox folder on removable media. So what to do?</p>

<p>I did some investigation and came across <a href="http://wiki.dropbox.com/DropboxAddons/DropboxPortable" class="link-external">Dropbox Portable</a>, essentially an attempt at tricking the Dropbox installer in such a way that you can install the application as well as your Dropbox folder to a flash drive. This method didn&#8217;t work for me so I then looked for and came across an alternative. Here&#8217;s what you do:</p>

<ol>
<li>Install Dropbox as normal and then exit the application.</li>
<li>Move the Dropbox folder to your flash drive.</li>
<li>Create a <a href="http://en.wikipedia.org/wiki/Symbolic_link" rel="nofollow" class="liwikipedia">symbolic link</a> from the old location of the folder pointing to the new location of the folder on the flash drive.</li>
<li>Restart the application and it should be none the wiser.</li>
</ol>

<p>You can use symbolic linking on just about any operating system including the latest versions of Windows. For Windows XP you&#8217;ll need to use the <a href="http://technet.microsoft.com/en-us/sysinternals/bb896768.aspx" class="link-external">Junction</a> tool to create such a link. On Vista (and I&#8217;m guessing for Windows 7) you can use the built-in <code>mklink</code> command-line tool.</p>

<p><strong>Note:</strong> don&#8217;t symbolic link directly to the Dropbox folder itself. If you did this and then accidentally removed your flash drive whilst Dropbox was still running then it <em>might</em> assume that you&#8217;ve just emptied your Dropbox folder and would then proceed to delete your files stored online (remember, it tries to keep everything in sync). To avoid this problem create the symbolic link to the parent folder instead. So on my setup (Vista) my flash drive (G:) has the Dropbox folder at <code>G:\Dropbox\My Dropbox</code>. The symbolic link ist at <code>C:\Dropbox</code> and points to <code>G:\Dropbox</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/archives/2010/02/07/dropbox-on-removable-media/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3D demo</title>
		<link>http://www.hiddentao.com/archives/2010/01/20/3d-demo/</link>
		<comments>http://www.hiddentao.com/archives/2010/01/20/3d-demo/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 12:23:24 +0000</pubDate>
		<dc:creator>ram</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.hiddentao.com/?p=726</guid>
		<description><![CDATA[A while back I decided to write a simple 3D graphics engine in Java after being inspired by Daniel Tebbutt&#8217;s Bedlam solver. Essentially I wanted to show a cube like his but with the added ability to split it apart so that you could see how the pieces fit together. As I got going with [...]]]></description>
			<content:encoded><![CDATA[<p>A while back I decided to write a simple 3D graphics engine in Java after being inspired by <a href="http://danieltebbutt.com/bedlam.html" class="link-external">Daniel Tebbutt&#8217;s Bedlam solver</a>. Essentially I wanted to show a cube like his but with the added ability to split it apart so that you could see how the pieces fit together. As I got going with this I was enjoying it so much I put aside the puzzle algorithm and just started adding more 3D rendering features.</p>

<p>Fast forward many hours of coding and here is a simple demo (click the image to launch it):
<span id="more-726"></span></p>

<p><a href="#" class="imglink" title="Launch demo (requires Java 1.5+)" onclick="window.open('http://www.hiddentao.com/downloads/kai/applet.html','_blank','status=0,toolbar=0,location=0,menubar=0,scrollbars=0,directories=0,resizable=0,width=670,height=500')">
<img src="http://farm3.static.flickr.com/2770/4289736971_b0f35bc880.jpg" />
</a></p>

<p><em>The demo consists of 3 separate scenes. You can switch between by simply clicking in the window. Further mouse and keyboard controls are listed in the demo window itself. Debug output from the demo is viewable in the Java applet console</em></p>

<p><strong>Architecture</strong></p>

<p>I&#8217;ve tried to use good object-oriented programming as much as possible throughout. For example, each scene is represented as a hierarchical scenegraph and a <a href="http://en.wikipedia.org/wiki/Visitor_pattern" rel="nofollow" class="liwikipedia">Visitor</a> model to perform rendering. The renderer itself is obtained from a <a href="http://en.wikipedia.org/wiki/Factory_pattern" rel="nofollow" class="liwikipedia">Factory</a> which allows for different types of renderers (OpenGL, DirectX, Software, etc.). As is standard practice with scenegraphs, a matrix stack is used to allow for model-level transformations independent to world-level transformations.</p>

<p>At the moment the only available renderer is software-based. But the architecture allows for OpenGL or DirectX-based rendering to be added in future. I use the <code>Graphics2D.drawLine()</code> API call in Java to render the pixels. Everything else (e.g. z-buffer) is manually implemented. The engine supports wireframe-mode rendering and backface culling. There is a single source light in the scene whose direction can be modified (in the demo it&#8217;s always pointing forwards from the camera). The rasterizer currently uses flat shading &#8211; next would be to add <a href="http://en.wikipedia.org/wiki/Gouraud_shading" rel="nofollow" class="liwikipedia">Gouraud and Phong</a>, not to mention texturing.</p>

<p>3D rotation on world objects are performed using matrix multiplication. The camera is rotated using Quaternions since this made it simpler to use the <a href="http://www.devmaster.net/articles/viewing-systems/" class="link-external">UVN</a> camera model. The third scene in the demo above is animated; this is accomplished using a simple timer thread using which any number of events can be scheduled for execution at given time intervals.</p>

<p><strong>Performance</strong></p>

<p>When programming in Java it&#8217;s easy to not worry about memory usage and allocations since the garbage collector handles the freeing up of memory. But for graphics engines every allocation or garbage collection run will impact performance. So from the outset I&#8217;ve tried to pre-allocate memory where possible, by constructing temporary vectors and matrices for use during calculations later on. Thus, the vast majority of the matrix and vector multiplication which take place in the render loop don&#8217;t allocate any new memory when doing so.</p>

<p>However, when I finally started rendering things I found that the performance bottleneck was actually the rasterizer. The more polygons (triangles) that needed to be drawn and the larger they appeared on screen, the longer each frame took to render. Perhaps I can improve this by optimising the polygon order (e.g. render from farthest to nearest) and improving the raster algorithms. Eventually I want to switch to using OpenGL as the rendering system but since I&#8217;ve come so far with the software renderer it would be nice to see if I can improve it a bit more first.</p>

<p><strong>Download</strong></p>

<p>The engine code is licensed under the LGPL and is available <a href="http://www.hiddentao.com/code/3d-graphics/" class="liinternal">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hiddentao.com/archives/2010/01/20/3d-demo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
