<?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/"
	>

<channel>
	<title>Chronological Postings</title>
	<atom:link href="http://blog.yonyonjohn.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.yonyonjohn.com</link>
	<description>Home of the Royal Yon</description>
	<pubDate>Tue, 30 Sep 2008 00:08:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Banshee Cell Phone Remote</title>
		<link>http://blog.yonyonjohn.com/2008/09/29/banshee-cell-phone-remote/</link>
		<comments>http://blog.yonyonjohn.com/2008/09/29/banshee-cell-phone-remote/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 00:08:48 +0000</pubDate>
		<dc:creator>John</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.yonyonjohn.com/?p=10</guid>
		<description><![CDATA[I recently finished my banshee remote, which is controlled by a cell phone.
I will post the code as soon as there is a demand.
If you want it leave a comment and I&#8217;ll do it as fast as possable. I&#8217;m not posting it now because I just dont feel like packing it up if no one [...]]]></description>
			<content:encoded><![CDATA[<p>I recently finished my banshee remote, which is controlled by a cell phone.</p>
<p>I will post the code as soon as there is a demand.</p>
<p>If you want it leave a comment and I&#8217;ll do it as fast as possable. I&#8217;m not posting it now because I just dont feel like packing it up if no one will download it.</p>
<p>again if you  want it, I&#8217;ll be m ore than happy to make it available with instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yonyonjohn.com/2008/09/29/banshee-cell-phone-remote/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Yes, It IS Obnoxious</title>
		<link>http://blog.yonyonjohn.com/2008/06/25/yes-it-is-obnoxious/</link>
		<comments>http://blog.yonyonjohn.com/2008/06/25/yes-it-is-obnoxious/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 05:16:38 +0000</pubDate>
		<dc:creator>John</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.yonyonjohn.com/?p=6</guid>
		<description><![CDATA[No, I don&#8217;t care.
Unless by some misfortune you are deaf, you probably noticed that there is auto start music on this page, as well as many other parts of this blog.
Sorry.
I can&#8217;t help myself. It goes against everything I have learned, but the music is staying, at least 10 more hours. that&#8217;s when I&#8217;ll have [...]]]></description>
			<content:encoded><![CDATA[<p>No, I don&#8217;t care.</p>
<p>Unless by some misfortune you are deaf, you probably noticed that there is auto start music on this page, as well as many other parts of this blog.</p>
<p><strong>Sorry.</strong></p>
<p>I can&#8217;t help myself. It goes against everything I have learned, but the music is staying, at least 10 more hours. that&#8217;s when I&#8217;ll have had some sleep.</p>
<p>Have a listen, its over there.</p>
<p>&lt;&#8212;</p>
<p>EDIT: it&#8217;s gone now I managed to really eff it up.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yonyonjohn.com/2008/06/25/yes-it-is-obnoxious/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Summer Job Will NOT Be Boring.</title>
		<link>http://blog.yonyonjohn.com/2008/06/18/my-summer-job-will-not-be-boring/</link>
		<comments>http://blog.yonyonjohn.com/2008/06/18/my-summer-job-will-not-be-boring/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 21:18:30 +0000</pubDate>
		<dc:creator>John</dc:creator>
		
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.yonyonjohn.com/?p=5</guid>
		<description><![CDATA[A few weeks ago, I built a soda bottle raft. It was a big, wooden waterproof box that had 96 empty soda bottles underneith held in by door screening. I can sit on it, and still have the top stay about 4-6 inches ( 10 cm - 15 cm ) out of the water.It was [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago, I built a soda bottle raft. It was a big, wooden waterproof box that had 96 empty soda bottles underneith held in by door screening. I can sit on it, and still have the top stay about 4-6 inches ( 10 cm - 15 cm ) out of the water.It was easy to turn, but hard to move.</p>
<p>Now how can this become a summer job?</p>
<p>Easy, sell stuff from it! there is a river near by that has many kayakers paddling up and down the river every day. my plan is to make a pair of anchors to keep me in one spot, and sell water bottles to thirsty paddlers.</p>
<p>It would beat working at a supermarket.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yonyonjohn.com/2008/06/18/my-summer-job-will-not-be-boring/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Oui FM Player</title>
		<link>http://blog.yonyonjohn.com/2008/06/17/oui-fm-player/</link>
		<comments>http://blog.yonyonjohn.com/2008/06/17/oui-fm-player/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 01:45:54 +0000</pubDate>
		<dc:creator>John</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://blog.yonyonjohn.com/?p=4</guid>
		<description><![CDATA[Last summer I went on a vacation with my family to Britain and France. While we were in France, specifically Paris, I found a radio station that I actually enjoyed ( as opposed to the crap where I live ). This radio station was called Oui FM. I wasn&#8217;t able to understand much of what [...]]]></description>
			<content:encoded><![CDATA[<p>Last summer I went on a vacation with my family to Britain and France. While we were in France, specifically Paris, I found a radio station that I actually enjoyed ( as opposed to the crap where I live ). This radio station was called Oui FM. I wasn&#8217;t able to understand much of what was being said but I was able to catch a web address. <a title="Oui FM" href="http://ouifm.fr">Ouifm.fr</a> . (Oui.fm would have been much better.)</p>
<p>Upon arriving back in my home country I decided to check out their site. I was pleased to find a live stream of the station! I &#8220;tuned in&#8221; and began listening to the same great stuff. Around mid-winter I stopped listening. I dont know why, I just didnt feel like it anymore. Recently, however, I came back to find a flurry of new songs that I had not heard, but liked all the same. Problem was that Windows Media Player wouldent tell me whats playing. thats when this project started.</p>
<p>I started by going to Oui FM&#8217;s home page. once there I found <a title="Oui FM flash app" href="http://www.ouifm.fr/module_live.swf">this</a> flash app that gives the artist and song that is currently playing. I fired up <a title="SmartSniff" href="http://www.nirsoft.net/utils/smsniff.html">SmartSniff</a> (a smaller and faster wireshark like program) and loaded the flash app, it happily divulged where it was getting the information. It was coming directly from the site, right <a title="Oui FM raw data" href="http://www.ouifm.fr/data1.php">here</a> in fact. I wrote a quick php script that took the data, parsed it, made it look a little nicer (caps, etc.), and put it into xhtml. Now I needed a way to play it without the song being interuppted. i settled on using the <a title="JW rules!" href="http://www.jeroenwijering.com/?item=JW_FLV_Media_Player">JW Media player</a> to play the stream and ajax to update the page.</p>
<p>you can see the working script here: <a title="Oui FM live stream" href="http://yonyonjohn.com/ouifm.php">Oui FM player</a> .  I advise doing just that, they tend to have good music playing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yonyonjohn.com/2008/06/17/oui-fm-player/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Neoclassical Image Rotator Rewrite</title>
		<link>http://blog.yonyonjohn.com/2008/06/16/neoclassical-image-rotator-rewrite/</link>
		<comments>http://blog.yonyonjohn.com/2008/06/16/neoclassical-image-rotator-rewrite/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 19:16:09 +0000</pubDate>
		<dc:creator>John</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://blog.yonyonjohn.com/?p=3</guid>
		<description><![CDATA[Aight, first post on a new Wordpress install. It seems like every time I pick a new theme I need to make some modification to the code. I guess it&#8217;s my way of leaving my mark. This time around, I chose to modify the image rotator. From the Neoclassical Theme. For those of you who [...]]]></description>
			<content:encoded><![CDATA[<p>Aight, first post on a new <a title="Wordpress" href="http://wordpress.org">Wordpress</a> install. It seems like every time I pick a new theme I need to make some modification to the code. I guess it&#8217;s my way of leaving my mark. This time around, I chose to modify the image rotator. From the <a title="NeoClassical Theme" href="http://pearsonified.com/theme/neoclassical/">Neoclassical Theme</a>. For those of you who dont know, the current code looks like this:</p>
<blockquote><p>&lt;?php</p>
<p>$random_image = rand(1,5); // the second number should equal the total number of images that you want to rotate</p>
<p>?&gt;<br />
&lt;img src=&#8221;&lt;?php bloginfo(&#8217;template_url&#8217;); ?&gt;/headers/header_&lt;?php echo $random_image; ?&gt;.jpg&#8221; alt=&#8221;Random header image&#8230; Refresh for more!&#8221; /&gt;</p></blockquote>
<p>it&#8217;s simple, and it gets the job done, but it means that whenever you want to add a new image, change and old image, or delete an image you need to rename it by a given pattern, and modify a script. My script fixes all that by scanning the directory and building an array that is filtered to make a list of images that can be used. my code looks like this:</p>
<blockquote><p>&lt;?php</p>
<p>$excluded_files = array(&#8221;exclude_me.jpg&#8221;); //Put the name of any file that you DON&#8217;T want to see in here, this includes non image files, but not dirs</p>
<p>$dir = TEMPLATEPATH.&#8217;/headers&#8217;;<br />
$dh  = opendir($dir);<br />
while (false !== ($filename = readdir($dh))) {<br />
$dir_contents[] = $filename;<br />
}</p>
<p>foreach ($dir_contents as $file) { //This loop filters the array<br />
if (!is_dir(TEMPLATEPATH.&#8217;/headers/&#8217;.$file)){<br />
if (!in_array($file,$excluded_files)) {<br />
if (str_replace(&#8217;.jpg&#8217;,&#8217;.notjpg&#8217;,$file) != $file || str_replace(&#8217;.jpeg&#8217;,&#8217;.notjpeg&#8217;,$file) != $file) { //does both .jpg and .jpeg<br />
if ($file != &#8216;.&#8217; &amp;&amp; $file != &#8216;..&#8217; &amp;&amp; $file != NULL){<br />
$images[] = $file;<br />
}<br />
}<br />
}<br />
}<br />
}</p>
<p>$random_image = $images[rand(0,count($images)-1)]; //no more changing this <img src='http://blog.yonyonjohn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>?&gt;<br />
&lt;img src=&#8221;&lt;?php bloginfo(&#8217;template_url&#8217;); ?&gt;/headers/&lt;?php echo $random_image; ?&gt;&#8221; alt=&#8221;Random header image&#8230; Refresh for more!&#8221; /&gt;</p></blockquote>
<p>It&#8217;s much longer, but it is less demanding on the end user, and will save time an energy when you decide to change the default images.</p>
<p>at a glance:</p>
<ul>
<li>php 4 compatable</li>
<li>works with default installs of neoclassical, changed images, or basically anything else</li>
<li>easy to install</li>
</ul>
<p>installation:</p>
<ol>
<li><a title="Image Rotator script" href="http://blog.yonyonjohn.com/wp-content/uploads/rotating_images.zip">Download</a></li>
<li>unpack</li>
<li>upload and replace the original &#8220;rotating_images.php&#8221; (found in: &#8220;&lt;WORPRESS DIR&gt;/wp-content/themes/neoclassical/&#8221;) file with the new one</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.yonyonjohn.com/2008/06/16/neoclassical-image-rotator-rewrite/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://blog.yonyonjohn.com/2008/06/16/hello-world/</link>
		<comments>http://blog.yonyonjohn.com/2008/06/16/hello-world/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 12:53:46 +0000</pubDate>
		<dc:creator>John</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.yonyonjohn.com/?p=1</guid>
		<description><![CDATA[Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
]]></description>
			<content:encoded><![CDATA[<p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.yonyonjohn.com/2008/06/16/hello-world/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
