<?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>dyadica.net &#187; TPT</title>
	<atom:link href="http://blog.dyadica.net/archives/tags/tpt/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.dyadica.net</link>
	<description>Fun and Games in the Dyadic Sea</description>
	<lastBuildDate>Wed, 21 Jul 2010 14:04:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Paper Trail 0.4</title>
		<link>http://blog.dyadica.net/archives/paper-trail-04</link>
		<comments>http://blog.dyadica.net/archives/paper-trail-04#comments</comments>
		<pubDate>Sun, 11 Nov 2007 16:42:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[get_post_meta()]]></category>
		<category><![CDATA[papertrail]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[site development]]></category>
		<category><![CDATA[TPT]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.dyadica.net/archives/paper-trail-04</guid>
		<description><![CDATA[I have added a little extra functionality to the old Paper Trail script to allow for a pages parents child pages to be shown if required as in earlier versions. This is very useful if ...]]></description>
			<content:encoded><![CDATA[<p>I have added a little extra functionality to the old <a title="link to the paper trail project page" href="/pages/projects/the-paper-trail">Paper Trail</a> script to allow for a pages parents child pages to be shown if required as in earlier versions. This is very useful if you have a collection of articles under a single banner such as the <a title="link to dyadica.net tile based games tutorials in flash" href="/pages/tutorials/tile-based-games">TBG</a> tutorials here at this site. The code is as follows:</p>
<p>&lt;?php if (function_exists(&#8216;pollChildren&#8217;)) {</p>
<p>if ( get_post_meta($post-&gt;ID, &#8220;poll-dad&#8221;, true) == &#8220;TRUE&#8221; ) {</p>
<p>$post = $posts[0];<br />
$dad = $post-&gt;post_parent;<br />
$name = str_replace(&#8220;/&#8221;.$post-&gt;post_name,&#8221;",$_SERVER['REQUEST_URI']);</p>
<p>$nDad = $wpdb-&gt;get_results(&#8220;SELECT ID, post_title, post_name FROM wp_posts WHERE ID=&#8221;.$dad);</p>
<p>echo &#8220;&lt;div class=&#8217;post-head&#8217;&gt;&#8221;.$nDad[0]-&gt;post_title.&#8221; chapters&lt;/div&gt;&#8221;;</p>
<p>echo &#8220;&lt;ul class=&#8217;paper-trail-child&#8217;&gt;&#8221;;<br />
pollChildren($dad, $wpdb, $name );<br />
echo &#8220;&lt;/ul&gt;&#8221;;<br />
}</p>
<p>} ?&gt;</p>
<p>As you can see I am utilizing the  <a title="link to wordpress get_post_meta()" href="http://codex.wordpress.org/Using_Custom_Fields">get_post_meta()</a> command to trigger the code. This means that I can call the function as and when required on any page that I assign the key &#8220;poll-dad&#8221; simple eh. For more information and additional usages for  get_post_meta()  command have a look  at the  <a title="link to adding an intro to wordpress pages" href="/archives/adding-an-intro-to-wordpress-pages">adding an intro to wordpress pages</a> post.<span id="more-300"></span></p>
<p>I have purposely kept  this output separate from the main Paper Trail  body as on occasion I  think that I might like to have this facility without having to run Paper Trail itself. You will notice from the code that I have also migrated the existing code fully to function calls.</p>
<p>I will divulge more details on this when and if I get chance to write things up, however it should be pretty obvious to all those savvy folks out there though (use the wordpress functions.php).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dyadica.net/archives/paper-trail-04/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
