<?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>Rikcat Industries &#187; Code Samples</title>
	<atom:link href="http://www.rikcatindustries.com/category/code-samples/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rikcatindustries.com</link>
	<description>The Portfolio of Rik Catlow</description>
	<lastBuildDate>Sat, 28 Feb 2009 04:08:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Comma-Separated Categories in WordPress</title>
		<link>http://www.rikcatindustries.com/2007/08/31/comma-separated-categories-in-wordpress/</link>
		<comments>http://www.rikcatindustries.com/2007/08/31/comma-separated-categories-in-wordpress/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 20:00:37 +0000</pubDate>
		<dc:creator>Rik Catlow</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[categories]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.rikcatindustries.com/2007/08/31/comma-separated-categories-in-wordpress/</guid>
		<description><![CDATA[Recently I worked on a project in WordPress that was going to have a lot of categories and I wanted to display the categories comma delimited. After fooling with WordPress&#8217;s wp_list_categories function to list categories, I realized that it only allowed you to display categories as a list or delimited by a &#60;br&#62;. So after [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I worked on a project in <a href="http://www.wordpress.org/" target="_blank">WordPress</a> that was going to have a lot of categories and I wanted to display the categories comma delimited.  After fooling with WordPress&#8217;s  <a href="http://codex.wordpress.org/Template_Tags/wp_list_categories" target="_blank">wp_list_categories</a> function to list categories, I realized that it only allowed you to display categories as a list or delimited by a &lt;br&gt;. So after looking around on Google to no avail, I decided to whip up a function that allows for different delimiters. The function is fairly simple with one argument for the string of the delimiter. <span id="more-21"></span></p>
<p><a href="http://www.rikcatindustries.com/ri/wp-content/themes/ri/downloads/delimited_cat_23.zip" title="Download Delimited Categories Code" class="blk_button">&darr;&nbsp; Works with WordPress 2.3</a><br /> <br />
<a href="http://www.rikcatindustries.com/ri/wp-content/themes/ri/downloads/delimited_cat.zip" title="Download Delimited Categories Code" class="blk_button">&darr;&nbsp;  Works with WordPress 2.0 > 2.2</a></p>
<h3>Calling the Function</h3>
<p>In my theme folder I have a file called functions.php that gets loaded when the theme is loaded. If your theme doesn&#8217;t have one you can create one. Copy and paste this function into the functions.php file. Now all you have to do is call the function in the theme template where you want your category links to show up.</p>
<pre class="code"><code>
&lt;?php echo delimited_cat();&nbsp;?&gt;
</code></pre>
<p>You can also pass the function an argument and change the default &#8220;, &#8221; delimiter to anything you like. The example below would delimit by a pipe with spaces on both sides.</p>
<pre class="code"><code>
&lt;?php echo delimited_cat(' | ');&nbsp;?&gt;
</code></pre>
<p>Uses this code at your own risk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rikcatindustries.com/2007/08/31/comma-separated-categories-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Customizable Twitter Badge in PHP5</title>
		<link>http://www.rikcatindustries.com/2007/05/13/customizable-twitter-badge-in-php5/</link>
		<comments>http://www.rikcatindustries.com/2007/05/13/customizable-twitter-badge-in-php5/#comments</comments>
		<pubDate>Sun, 13 May 2007 19:35:02 +0000</pubDate>
		<dc:creator>Rik Catlow</dc:creator>
				<category><![CDATA[Code Samples]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://rikcatindustries.com/2007/05/13/customizable-twitter-badge-in-php5/</guid>
		<description><![CDATA[What&#8217;s Twitter? A global community of friends and strangers answering one simple question: What are you doing? Answer on your phone, IM, or right here on the web! I wrote a script that uses the Twitter API to build a customizable twitter status badge. I&#8217;m pretty much a novice PHP programmer and this is the [...]]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s <a href="http://www.twitter.com" target="_blank" title="Twitter">Twitter</a>? A global community of friends and strangers answering one simple question: What are you doing? Answer on your phone, IM, or right here on the web!</p>
<p>I wrote a script that uses the <a href="http://twitter.com/help/api" target="_blank" title="Twitter API">Twitter API</a> to build a customizable twitter status badge. I&#8217;m pretty much a novice PHP programmer and this is the first piece of code I&#8217;m releasing. It should <span id="more-10"></span>work fine on any PHP5 server. The script uses cURL to authenticate and grab the XML file from Twitter and then the XML is parsed using PHP5&#8242;s SimpleXML.</p>
<p>Enjoy Rik!</p>
<h3>Requirements:</h3>
<p>PHP5  (*** Will Not Work in PHP4 ***)<br />
Twitter Account</p>
<h3>Directions:</h3>
<p>Edit the badge_config.php file, supply your twitter username, twitter password, and how many status items you would like to show up. I think the Twitter API only allows a maximum of 20 items, but I could be wrong. Upload all files to your server running PHP5, then in a web browser goto your_folder_name/badge_template.php. If it showed up your good to go.</p>
<h3>Demo:</h3>
<p><a href="http://dropzone.rikcat.com/software/twitter/badge_template.php" class="blk_button" title="Demo of Twitter Badge" >&darr;&nbsp; My Twitter Badge</a></p>
<h3>Download:</h3>
<p><a href="http://dropzone.rikcat.com/software/twitter/twitterbadge.zip" title="Download Twitter Badge" class="blk_button">&darr;&nbsp; twitterbadge.zip</a><br /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rikcatindustries.com/2007/05/13/customizable-twitter-badge-in-php5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
