<?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>TechnoGeeks &#187; Programming</title>
	<atom:link href="http://techno-geeks.org/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://techno-geeks.org</link>
	<description>A fusion of technology, music, and geekyness.</description>
	<lastBuildDate>Fri, 30 Mar 2012 04:06:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Server Update: Migration to Debian, Polyglot Projects, and More!</title>
		<link>http://techno-geeks.org/2011/11/server-migration-debian-polyglot/</link>
		<comments>http://techno-geeks.org/2011/11/server-migration-debian-polyglot/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 02:42:51 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lua]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://techno-geeks.org/?p=716</guid>
		<description><![CDATA[I am proud to announce that TechnoGeeks now has it's own server in Atlanta, GA! I have officially migrated from Ubuntu to Debian in the process. I have finally scrubbed Ubuntu from my life for good!]]></description>
			<content:encoded><![CDATA[<p>I am proud to announce that TechnoGeeks now has it&#8217;s own server in Atlanta, GA! I have officially migrated from Ubuntu to Debian in the process. I have finally scrubbed Ubuntu from my life for good!</p>
<p><strong>Operating Systems of Choice</strong><br />
Server: Debian Squeeze<br />
Desktop: Arch Linux<br />
Phone: Android</p>
<p><a href="http://techno-geeks.org/wp-content/uploads/2011/11/logo.gif"><img src="http://techno-geeks.org/wp-content/uploads/2011/11/logo.gif" alt="" title="logo" width="275" height="52" class="alignnone size-full wp-image-721" /></a></p>
<p>I am starting to nerd out a lot more lately and will expand TechnoGeeks to be able to magically host several projects of mine. This includes web applications written in PHP, Ruby, and Lua! I started playing around with some of the <a href="http://www.keplerproject.org/">Kepler Project</a> frameworks (WSAPI, Xavante, and Orbit) and have a fully functioning Code Snippet library called Snippy. Orbit is ULTRA FAST but the documentation and code maintenance is VERY POOR. I really hope these guys clean things up as they have something really nice going here. More updates soon!</p>
<p><strong>Update 12/5/2011:</strong><br />
I have several new projects and services that are now up!</p>
<ul>
<li>Snippy: Lua MVC App (<a href="http://keplerproject.github.com/orbit/">Orbit</a>) for Code Snippets</li>
<li><a href="http://bittie.ca">Bittie</a>: A personal link shortener</li>
<li><a href="http://mina.apache.org/vysper/">Apache Vysper</a>: XMPP Service</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://techno-geeks.org/2011/11/server-migration-debian-polyglot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sputnik: An Extensible Wiki Engine in Lua</title>
		<link>http://techno-geeks.org/2011/01/sputnik-an-extensible-wiki-engine-in-lua/</link>
		<comments>http://techno-geeks.org/2011/01/sputnik-an-extensible-wiki-engine-in-lua/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 07:55:47 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Lua]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Sputnik]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://techno-geeks.org/?p=617</guid>
		<description><![CDATA[While learning Lua for WoW addons, I was lucky enough to discover a neat pure lua app called Sputnik. It is a wiki engine that can be extended to do just about anything you want it to do. For example, I have all of the data storing in git with a git plugin and changed [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://sputnik.freewisdom.org/en/"><img src="http://techno-geeks.org/wp-content/uploads/2011/01/sputnik-logo.png" alt="sputnik-logo" title="sputnik-logo" width="240" height="49" class="alignnone size-full wp-image-618" /></a><br/><br/></p>
<p>While learning Lua for WoW addons, I was lucky enough to discover a neat pure lua app called <a href="http://sputnik.freewisdom.org/en/">Sputnik</a>. It is a wiki engine that can be extended to do just about anything you want it to do. For example, I have all of the data storing in git with a git plugin and changed the default auth to hit MySQL instead of a flat file. The possibilities are endless and they have several example plugins for ideas (issue tracker, discussion posts. etc). </p>
<p>I hope one day to get good enough with Sputnik and lua to provide a Postgres auth plugin and a blog plugin as well. Yuri, the project maintainer is really good at answering people that need assistance on their <a href="http://lists.luaforge.net/mailman/listinfo/sputnik-list">mailing list</a>. It was there that I discovered they have a <a href="https://github.com/yuri/sputnik">git repo</a> and a new version: <a href="http://spu.tnik.org/en/Galaxy">Galaxy</a>.</p>
<p>The bottom line: this project is worth checking out and contributing to people so get to it!</p>
]]></content:encoded>
			<wfw:commentRss>http://techno-geeks.org/2011/01/sputnik-an-extensible-wiki-engine-in-lua/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Now Learning Lua!</title>
		<link>http://techno-geeks.org/2010/09/now-learning-lua/</link>
		<comments>http://techno-geeks.org/2010/09/now-learning-lua/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 10:57:51 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SysAdmin]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Addons]]></category>
		<category><![CDATA[Celistine]]></category>
		<category><![CDATA[Deeps]]></category>
		<category><![CDATA[Lua]]></category>
		<category><![CDATA[Mods]]></category>
		<category><![CDATA[World of Warcraft]]></category>
		<category><![CDATA[WoW]]></category>

		<guid isPermaLink="false">http://techno-geeks.org/?p=532</guid>
		<description><![CDATA[Lua For the Win! I recently have randomly become quite interested in Lua. The reasoning is due to the fact that I interact with two things on a daily basis that are configured and/or scripted in Lua: World of Warcraft and the Awesome window manager. I have had a blast over the weekend learning the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Lua For the Win!</strong><br />
I recently have randomly become quite interested in Lua. The reasoning is due to the fact that I interact with two things on a daily basis that are configured and/or scripted in Lua: World of Warcraft and the Awesome window manager. I have had a blast over the weekend learning the basics of the languages and WoW addons. You can find the entire first edition of a very nice guide to learning Lua on their <a href="http://www.lua.org/pil/">website</a>. In addition, I found the resources at <a href="http://www.wowprogramming.com">www.wowprogramming.com</a> to be quite helpful.</p>
<p>Some essentials:</p>
<ul>
<li><a href="http://www.wowinterface.com/downloads/info7366-WowLua.html">WowLua</a> &#8211; An addon that allows you to write and run Lua in game.</li>
<li><a href="http://www.codeplex.com/WarcraftAddOnStudio">Warcraft Addon Studio</a> &#8211; A Visual Studio (VB) like application to let you quickly build frames and export them to XML.</li>
</ul>
<p><strong>Celistine</strong><br />
The first mod I wrote was called Celistine, and was written to monitor my wife in game <img src='http://techno-geeks.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  It allowed her to whisper me for auto-invites to a group, monitors her range and informs me if she is far, and spams her with whispers if my health gets lower than 25%. </p>
<p><a href="http://techno-geeks.org/wp-content/uploads/2010/09/celistine.png"><img src="http://techno-geeks.org/wp-content/uploads/2010/09/celistine.png" alt="celistine" title="celistine" width="600" height="233" class="alignnone size-full wp-image-533" /></a></p>
<p><strong>Deeps</strong><br />
After that, I decided to modify an example I found in the book I am reading (<a href="http://wowprogramming.com/profile/book_edition">World of Warcraft Programming</a>) and create a simple frame that displays DPS and other facts as I am in combat. I decided to call it Deeps <img src='http://techno-geeks.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  See below for the screenshots, code, and feel free to <a href="http://techno-geeks.org/wp-content/uploads/2010/09/Deeps.zip">try it out yourself</a>.</p>
<p><a href="http://techno-geeks.org/wp-content/uploads/2010/09/deeps.png"><img src="http://techno-geeks.org/wp-content/uploads/2010/09/deeps.png" alt="deeps" title="deeps" width="242" height="47" class="alignnone size-full wp-image-534" /></a></p>
<p><a href="http://techno-geeks.org/wp-content/uploads/2010/09/deeps2.png"><img src="http://techno-geeks.org/wp-content/uploads/2010/09/deeps2.png" alt="deeps2" title="deeps2" width="411" height="73" class="alignnone size-full wp-image-535" /></a></p>
<pre class="brush: plain;">
-- Set up some local variables to track time and damage
local start_time = 0
local end_time = 0
local total_time = 0
local total_damage = 0
local average_dps = 0
local in_combat = false

function CombatTracker_OnLoad(frame)
	frame:RegisterEvent(&quot;COMBAT_LOG_EVENT_UNFILTERED&quot;)
	frame:RegisterEvent(&quot;PLAYER_REGEN_ENABLED&quot;)
	frame:RegisterEvent(&quot;PLAYER_REGEN_DISABLED&quot;)
	frame:RegisterForClicks(&quot;RightButtonUp&quot;)
	frame:RegisterForDrag(&quot;LeftButton&quot;)
end

function CombatTracker_OnEvent(frame, event, ...)

	if event == &quot;PLAYER_REGEN_ENABLED&quot; then
		-- This event is called when the player exits combat
		end_time = GetTime()
		total_time = end_time - start_time
		average_dps = total_damage / total_time
		CombatTracker_UpdateText()
		CombatTracker_ReportDPS()
		in_combat = false
	elseif event == &quot;PLAYER_REGEN_DISABLED&quot; then
		-- This event is called when we enter combat
		-- Reset the damage total and start the timer
		CombatTrackerFrameText:SetText(&quot;In Combat!&quot;)
		total_damage = 0
		start_time = GetTime()
		in_combat = true
	elseif event == &quot;COMBAT_LOG_EVENT_UNFILTERED&quot; and in_combat then
		local timestamp,log_event,source_guid,source_name,source_flags, dest_guid, dest_name, dest_flags, spell_id, spell_name, spell_school, amount = ...

		if string.match(log_event, &quot;_DAMAGE&quot;) then
			if source_name == UnitName(&quot;player&quot;) or source_name == UnitName(&quot;pet&quot;) then
				--ChatFrame1:AddMessage(source_name .. &quot; is doing teh hurt!&quot;)
				if amount ~= nil then
					total_damage = total_damage + amount
					end_time = GetTime()
					total_time = end_time - start_time
					average_dps = total_damage / total_time
					CombatTracker_UpdateText()
				end
			end
		end
	end
end

function CombatTracker_UpdateText()
	local status = string.format(&quot;%ds | %d dmg | %.2f dps&quot;, total_time, total_damage, average_dps)
	CombatTrackerFrameText:SetText(status)
end

function CombatTracker_ReportDPS()
	local msgformat = &quot;Dished out %d damage in %d seconds (%.2f dps).&quot;
	local msg = string.format(msgformat, total_damage, total_time, average_dps)
	if GetNumPartyMembers() &gt; 0 then
		SendChatMessage(msg, &quot;PARTY&quot;)
	else
		ChatFrame1:AddMessage(msg)
	end
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://techno-geeks.org/2010/09/now-learning-lua/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Startup Script for Rails with WEBrick</title>
		<link>http://techno-geeks.org/2010/04/startup-script-for-rails-with-webrick/</link>
		<comments>http://techno-geeks.org/2010/04/startup-script-for-rails-with-webrick/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 12:41:08 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[WEBrick]]></category>

		<guid isPermaLink="false">http://techno-geeks.org/?p=439</guid>
		<description><![CDATA[I finally started playing with rails again. I decided to play around and start the basics of a billing application. I was initially debating web app versus a desktop app (rails vs ruby-gtk). I wanted a reason to finally start using rails so I decided to make it a web app. I then realized I [...]]]></description>
			<content:encoded><![CDATA[<p>I finally started playing with rails again. I decided to play around and start the basics of a billing application. I was initially debating web app versus a desktop app (rails vs ruby-gtk). I wanted a reason to finally start using rails so I decided to make it a web app. I then realized I may be able to simulate a desktop app with rails. I pulled in the base ruby packages, manually compiled RubyGems and installed necessary gems, and decided to script a startup routine so I could create a launcher on my desktop. This solution is far from perfect but it manages to fulfill my needs. My &#8220;desktop rails app&#8221; uses the built in standalone webserver WEBrick and sqlite3 for its backend.</p>
<pre class="brush: bash;">
#!/bin/bash
cd /home/jesse/rails/billing

if [ ! -f tmp/pids/server.pid ]; then
	script/server -d
fi

while [ `netstat -tan | grep 0.0.0.0:3000 | wc -l` != 1 ]; do
	echo &quot;Server not started yet...&quot;
	sleep 1
done

google-chrome http://localhost:3000/customers &amp;
tail -f log/development.log

# Server can be killed with:
# kill -INT `cat tmp/pids/server.pid`
</pre>
<p>I then created a launcher simliar to this:</p>
<p><a href="http://techno-geeks.org/wp-content/uploads/2010/04/launcher.png"><img src="http://techno-geeks.org/wp-content/uploads/2010/04/launcher.png" alt="launcher" title="launcher" width="552" height="495" class="aligncenter size-full wp-image-440" /></a></p>
<p>When I double click on the icon the first time it pauses for about 5-6 seconds while WEBrick initializes and binds to port 3000. As soon as it detects the webserver listening, I launch google-chrome to the default view. Each time I click the icon there after, the webserver is already running so the google-chrome tab kicks off instantly. </p>
]]></content:encoded>
			<wfw:commentRss>http://techno-geeks.org/2010/04/startup-script-for-rails-with-webrick/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CakePHP eCommerce Done Right: Mocha Shopping Cart</title>
		<link>http://techno-geeks.org/2009/09/cakephp-ecommerce-done-right-mocha-shopping-cart/</link>
		<comments>http://techno-geeks.org/2009/09/cakephp-ecommerce-done-right-mocha-shopping-cart/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 19:57:12 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[mocha]]></category>

		<guid isPermaLink="false">http://techno-geeks.org/?p=262</guid>
		<description><![CDATA[A few months back I posted on CakePHP eCommerce and the lack of good solutions. Well that is now no longer the case. I would like to be one of the first people to introduce you to Mocha Shopping Cart. We have been working day and night (literally) to come up with a solution for [...]]]></description>
			<content:encoded><![CDATA[<p><div class="wp-caption alignleft" style="width: 171px"><a href="http://mochashoppingcart.com"><img alt="Mocha Shopping Cart" src="http://mochashoppingcart.com/img/mocha-logo-white.gif" title="Mocha Shopping Cart" width="161" height="83" /></a><p class="wp-caption-text">Mocha Shopping Cart</p></div>A few months back I posted on CakePHP eCommerce and the lack of good solutions. Well that is now no longer the case. I would like to be one of the first people to introduce you to <a href="http://mochashoppingcart.com">Mocha Shopping Cart</a>. We have been working day and night (literally) to come up with a solution for the small and medium sized business owners to sell their products online easily. We also have geared Mocha to be extend-able and easy for CakePHP designers and developers to add in their own twists for clients.</p>
<p>Mocha is written entirely in CakePHP and jQuery and is certainly the best CakePHP eCommerce app out there. Why do I say that?</p>
<p><strong>Mocha Shopping Cart is&#8230;</strong></p>
<ul>
<li>Fully hosted, secure, pre-installed</li>
<li>Very easy to set up and configure</li>
<li>Themable and Modular (Plug ins docs in the works)</li>
<li>Works with most popular payment and shipping apis (UPS, USPS, Authorize.net, Paypal, etc.)</li>
<li>Charges no transaction fees and no setup fees</li>
</ul>
<p>If you still don&#8217;t believe me, Mocha is offering a limited time only <a href="http://bit.ly/HTSbo">Pre-Launch coupon code</a> that gives you the first month <strong>FREE</strong>. You can try it for yourself and see how you like it. I think you will agree that it beats CakeCart and BakeSale, HANDS DOWN! And no, Mocha is not free (after the first 30 days). The costs help to speed up development, pay for server and hosting fees, and pay for that cup of coffee that us developers need when its 8 AM and we are having to talk with &lt;insert_API_name_here&gt; first thing in the morning.</p>
<p>Official Website: <a href="http://mochashoppingcart.com">Mocha Shopping Cart</a><br />
Blog with coupon code: <a href="http://bit.ly/HTSbo">Get a free trial of Mocha Shopping Cart</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techno-geeks.org/2009/09/cakephp-ecommerce-done-right-mocha-shopping-cart/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy JSON with CakePHP and jQuery</title>
		<link>http://techno-geeks.org/2009/08/easy-json-with-cakephp-and-jquery/</link>
		<comments>http://techno-geeks.org/2009/08/easy-json-with-cakephp-and-jquery/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 19:00:52 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://techno-geeks.org/?p=250</guid>
		<description><![CDATA[I am not sure if this is the fanciest way to get the job done but it works REALLY well. What job am I referring to? I am referring to outputting data as JSON in a CakePHP view and then parsing it in a jQuery AJAX response. Its fairly easy to accomplish with the JSON [...]]]></description>
			<content:encoded><![CDATA[<p>I am not sure if this is the fanciest way to get the job done but it works REALLY well. What job am I referring to? I am referring to outputting data as JSON in a CakePHP view and then parsing it in a jQuery AJAX response. Its fairly easy to accomplish with the <a href="http://www.json.org/js.html">JSON parser provided by json.org</a>. Scroll to the bottom and download/include <a href="http://www.json.org/json2.js">json2.js</a>.</p>
<p>Controller example:</p>
<pre class="brush: php;">
				$sizeArray = getimagesize('/path/to/really_cool_image.jpg');

				$outputArray = array(
					'file' =&gt; 'really_cool_image.jpg',
					'width' =&gt; $sizeArray[0],
					'height' =&gt; $sizeArray[1],
				);

				$this-&gt;set('result', $outputArray);

				$this-&gt;render(null, 'ajax');
</pre>
<p>AJAX View example:</p>
<pre class="brush: php;">
Configure::write('debug', 0);
echo $javascript-&gt;object($result);
</pre>
<p>jQuery AJAX response handler example:</p>
<pre class="brush: jscript;">
	  function(response, status) {
	  		imageDetails = JSON.parse(response);
	  		imageName = imageDetails.file;
	  }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://techno-geeks.org/2009/08/easy-json-with-cakephp-and-jquery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Selective RSS Plugin for WordPress</title>
		<link>http://techno-geeks.org/2009/06/selective-rss-plugin-for-wordpress/</link>
		<comments>http://techno-geeks.org/2009/06/selective-rss-plugin-for-wordpress/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 16:42:03 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://techno-geeks.org/?p=199</guid>
		<description><![CDATA[We had a client recently request that we embed an RSS feed from a different site inside their WordPress install. This would&#8217;ve been very easy considering there are 100&#8242;s of RSS feed plugins that will accomplish this task. However, they wanted to only display RSS items that had certain keywords in the title. My initial [...]]]></description>
			<content:encoded><![CDATA[<p>We had a client recently request that we embed an RSS feed from a different site inside their WordPress install. This would&#8217;ve been very easy considering there are 100&#8242;s of RSS feed plugins that will accomplish this task. However, they wanted to only display RSS items that had certain keywords in the title. My initial search found no WP plugins that currently were capable of this. I also tried one of the more popular ones, <a href="http://wordpress.org/extend/plugins/feedlist/">FeedList</a>, but it used the <a href="http://codex.wordpress.org/Function_Reference/get_rss">get_rss()</a> function in the WordPress API. For some reason, this function was not properly parsing the feed they wanted to use, most likely due to it not being a <a href="http://validator.w3.org/feed/">valid feed</a>.</p>
<p>So to make a long story short: I decided to make a quick hack up solution and write my own WP plugin. My only hurdle-like requirement is that it had to work for PHP4 as well because the client is on one of our older servers. I ended up finding a really good <a href="http://www.stemkoski.com/how-to-easily-parse-a-rss-feed-with-php-4-or-php-5/">example by Ryan Stemkoski</a>. He wrote a perfect function for me to tweak a little and expand upon. I am currently waiting to get approved on WordPress extend so I can host my plugin there. For now, I have created a <a href="http://techno-geeks.org/selective-rss/">page here where you can download</a> the plugin.</p>
<p>Note: I haven&#8217;t tested this in a more recent version of WP yet but I will be soon. Let me know if you find any bugs!</p>
<p>I also figured I would post the source code in case someone needed a quick and dirty solution with some examples.</p>
<p>rss_lib.php</p>
<pre class="brush: php;">
&lt;?php

/*
* RSS Parsing Function
*
* Original Author: Ryan Stemkoski
* http://www.stemkoski.com/how-to-easily-parse-a-rss-feed-with-php-4-or-php-5/
*
* Slight modifications by Jesse R. Adams (DualTech Services, Inc.)
*/ 

function parseRSS($url) { 

	//PARSE RSS FEED
        $feedeed = implode('', file($url));
        $parser = xml_parser_create();
        xml_parse_into_struct($parser, $feedeed, $valueals, $index);
        xml_parser_free($parser);

	//CONSTRUCT ARRAY
        foreach($valueals as $keyey =&gt; $valueal){
            if($valueal['type'] != 'cdata') {
                $item[$keyey] = $valueal;
			}
        }

        $i = 0;

        foreach($item as $key =&gt; $value){

            if($value['type'] == 'open') {

                $i++;
                $itemame[$i] = $value['tag'];

            } elseif($value['type'] == 'close') {

                $feed = $values[$i];
                $item = $itemame[$i];
                $i--;

                if(count($values[$i])&gt;1){
                    $values[$i][strtolower($item)][] = $feed;
                } else {
                    $values[$i][strtolower($item)] = $feed;
                }

            } else {
                $values[$i][strtolower($value['tag'])] = $value['value'];
            }
        }

	//RETURN ARRAY VALUES
	return $values[0];
} 

/*
* Convert Raw RSS Parse into concise list of items
*
* Optionally pass in limit (on number of items)
* and/or array list of words to grab items by.
*
*/

function extractRSSItems($xmlArray, $limit = null, $filteredWords = array()) {
	$array = array();
	$regex = null;

	if (count($filteredWords) &gt; 0) {
		$regex = implode('|', $filteredWords);
	}

	foreach($xmlArray['rss']['channel']['item'] as $item) {
		if (!$regex || ($regex &amp;&amp; preg_match(&quot;/$regex/i&quot;, $item['title']))) {
			$array[] = $item;
		}
 	}

	if($limit) {
		array_splice($array, ($limit - 1), (count($array) - $limit));
	}

	return $array;
}
?&gt;
</pre>
<p>selective_rss.php</p>
<pre class="brush: php;">
&lt;?php
/*
Plugin Name: Selective RSS
Plugin URI: http://techno-geeks.org/selective-rss
Description: Simple Plugin that allows you to embed RSS feed items into Pages or Posts. Optionally allows you to choose how many items to display and allows you to limit items to ones that contain certain words in the titles.
Version: 0.1.0b
Author: Jesse R. Adams (DualTech Services, Inc.)
Author URI: http://www.dual-tech.com/about-dualtech-services/
*/

require_once('rss_lib.php');

function filter_feeds($content) {
	$limit = null;
	$filter = array();
	$url = null;

	$inputTag = preg_match('/\[srss (.+)\]/', $content, $matches);
	$rawArgs = explode(',', $matches[1]);

	foreach($rawArgs as $input) {
                preg_match_all('/^(url|filter|limit)=(.+)$/i', $input, $matches);
                $key = $matches[1][0];
                $value = $matches[2][0]

		if ($key == 'filter') {
			$filter = explode(';', $value);
		} else {
			$$key = $value;
		}
	}

	if ($url) {
		$xml = parseRSS($url);
		$items = extractRSSItems($xml, $limit, $filter);

		$htmlToAdd = '';
		foreach ($items as $item) {
			$htmlToAdd .= '&lt;a href=&quot;' . $item['link'] . '&quot; target=&quot;new&quot;&gt;' . $item['title'] . '&lt;/a&gt;' . &quot;&lt;br/&gt;\n&quot;;
			$htmlToAdd .= $item['description'] . &quot;&lt;br/&gt;&lt;br/&gt;\n&quot;;
		}

		$content = preg_replace('/\[srss .+\]/', $htmlToAdd, $content);
	}
	return $content;
}

add_filter('the_content', 'filter_feeds');
?&gt;
</pre>
<p>Update 06/19: Fixed the way arguments are parsed to be less limiting on possibilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://techno-geeks.org/2009/06/selective-rss-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>CakePHP: Including Models inside your Controller</title>
		<link>http://techno-geeks.org/2009/05/models-inside-controller/</link>
		<comments>http://techno-geeks.org/2009/05/models-inside-controller/#comments</comments>
		<pubDate>Tue, 26 May 2009 16:07:38 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://techno-geeks.org/?p=176</guid>
		<description><![CDATA[There are currently three methods for including and using models inside your controller. I am referring to the case when your controller does not belong to a model or or the model is not related to the model inside the controller you are working in. Although this case should be extremely rare, it seems to [...]]]></description>
			<content:encoded><![CDATA[<p>There are currently three methods for including and using models inside your controller. I am referring to the case when your controller does not belong to a model or or the model is not related to the model inside the controller you are working in. Although this case should be extremely rare, it seems to happen to me a lot. This post is basically a re-summary of <a href="http://groups.google.com/group/cake-php/browse_thread/thread/137c57b4eb010317">Gwoo&#8217;s response</a> in the <a href="http://groups.google.com/group/cake-php/browse_thread/thread/137c57b4eb010317">CakePHP Google Groups discussion</a>.</p>
<p><strong>1. Controller::loadModel();</strong><br />
This method actually calls ClassRegistry::init() and saves the instance of the model as a parameter in the controller.</p>
<p>Example:</p>
<pre class="brush: php;">
Controller::loadModel('Car');
$cars = $this-&gt;Car-&gt;find('all');
</pre>
<p><strong>2. ClassRegistry::init()</strong><br />
This method creates an instance of the Model and returns it for use.</p>
<p>Example:</p>
<pre class="brush: php;">
$car = ClassRegistry::init('Car');
$cars = $car-&gt;find('all');
</pre>
<p><strong>3. App:import()</strong> (not recommended)<br />
This method only includes the file. This requires you to create an instance each time.</p>
<p>Example:</p>
<pre class="brush: php;">
App::import('Car');
$car = new Car();
$cars = $car-&gt;find('all');
</pre>
<p>As you can see this is really simple and basic stuff. However, I felt the need to re-post this information. If for nothing else, I will be using this as a reference point for myself <img src='http://techno-geeks.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Update 5/27/09: Miles Johnson has a nice write up on this <a href="http://www.milesj.me/blog/read/16/loading-models-specific-to-certain-actions">on his blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://techno-geeks.org/2009/05/models-inside-controller/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>CakePHP Character Encoding Checklist</title>
		<link>http://techno-geeks.org/2009/05/cakephp-character-encoding-checklist/</link>
		<comments>http://techno-geeks.org/2009/05/cakephp-character-encoding-checklist/#comments</comments>
		<pubDate>Fri, 15 May 2009 20:04:01 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://techno-geeks.org/?p=171</guid>
		<description><![CDATA[I was having some issues today with character encoding and I thought I&#8217;d post about it. There are three elements that you need to make sure you have if you want to properly use UTF-8 character encoding in your Cake app. My issue was that I did not have #2, although adding #1 didn&#8217;t hurt [...]]]></description>
			<content:encoded><![CDATA[<p>I was having some issues today with character encoding and I thought I&#8217;d post about it. There are three elements that you need to make sure you have if you want to properly use UTF-8 character encoding in your Cake app. My issue was that I did not have #2, although adding #1 didn&#8217;t hurt either.</p>
<p>1. Database Config</p>
<p>Add &#8216;encoding&#8217; => &#8216;utf8&#8242; to app/config/database.php</p>
<pre class="brush: php;">
	var $default = array(
		'driver' =&gt; 'mysql',
		'persistent' =&gt; false,
		'host' =&gt; 'localhost',
		'login' =&gt; 'user',
		'password' =&gt; 'password',
		'database' =&gt; 'database',
		'encoding' =&gt; 'utf8'
	);
</pre>
<p>2. Make sure your layout has the charset line in the <head></p>
<pre class="brush: php;">
	&lt;head&gt;
	 	&lt;?php echo $html-&gt;charset(); ?&gt;
	 	Other elements...
	&lt;/head&gt;
</pre>
<p>3. This one is set by default, but make sure App.encoding is set in app/config/core.php</p>
<pre class="brush: php;">
/**
 * Application wide charset encoding
 */
	Configure::write('App.encoding', 'UTF-8');
</pre>
<p>And thats it!</p>
]]></content:encoded>
			<wfw:commentRss>http://techno-geeks.org/2009/05/cakephp-character-encoding-checklist/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Peep! A friendly GTD compliant productivity tool for you.</title>
		<link>http://techno-geeks.org/2009/05/peep/</link>
		<comments>http://techno-geeks.org/2009/05/peep/#comments</comments>
		<pubDate>Mon, 11 May 2009 14:33:47 +0000</pubDate>
		<dc:creator>jesse</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Peep!]]></category>

		<guid isPermaLink="false">http://techno-geeks.org/?p=164</guid>
		<description><![CDATA[About a year ago Rick (http://www.rickguyer.com) had me read the book Getting Things Done by David Allen. In his book, Allen teaches you how to use his strategies and procedures on managing your tasks (or actions) in a very organized and well thought out fashion. His strategy is unique and calls for a very unique [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://trypeep.com"><img alt="" src="http://trypeep.com/img/peep-logo-plain.png" class="alignleft" width="146" height="80" /></a><br />
About a year ago Rick (<a href="http://www.rickguyer.com">http://www.rickguyer.com</a>) had me read the book <a href="http://en.wikipedia.org/wiki/Getting_things_done">Getting Things Done</a> by David Allen. In his book, Allen teaches you how to use his strategies and procedures on managing your tasks (or actions) in a very organized and well thought out fashion. His strategy is unique and calls for a very unique tool to accompany his GTD system. When I originally read his book, Rick and I spent several days searching for a different program, service, or web app that would allow us to incorporate Allen&#8217;s GTD system in an electronic fashion. After a solid week of effort I gave up after finding nothing that I felt was easy to use and completely GTD compliant. </p>
<p>Finally, after over a year, we decided to create this perfect GTD compliant web service that will help people, like us, be able to incorporate Allen&#8217;s system and become more productive. <a href="http://trypeep.com">Peep!</a> is &#8220;a simple and easy-to-use tool to help you focus and start getting things done.&#8221; I highly suggest you all try it and let me know what you think.</p>
<p>Head over to <a href="http://trypeep.com">http://trypeep.com</a> and get started today!</p>
]]></content:encoded>
			<wfw:commentRss>http://techno-geeks.org/2009/05/peep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

