<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>idProjections.com</title>
	
	<link>http://idprojections.com</link>
	<description />
	<lastBuildDate>Thu, 12 Nov 2009 23:01:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/idProjections" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="idprojections" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Such a Slacker…</title>
		<link>http://idprojections.com/such-a-slacker</link>
		<comments>http://idprojections.com/such-a-slacker#comments</comments>
		<pubDate>Thu, 12 Nov 2009 23:01:36 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://idprojections.com/?p=165</guid>
		<description><![CDATA[I know it&#8217;s never a good thing to say &#8220;Sorry for no updates&#8221;, namely because I know no one cares. But what I am really sorry for is not having updated my portfolio in such a long time.
I have been working on lots of projects, including the rebuild and relaunch of TextSanta.net, along with some [...]]]></description>
			<content:encoded><![CDATA[<p>I know it&#8217;s never a good thing to say &#8220;Sorry for no updates&#8221;, namely because I know no one cares. But what I am really sorry for is not having updated my portfolio in such a long time.</p>
<p>I have been working on lots of projects, including the rebuild and relaunch of <a href="https://www.textsanta.net/">TextSanta.net</a>, along with some other pretty fun projects. I am also working on rebranding idProjections, the company is going through a lot of transitions, new partners, new clients, and I think a new design should reflect that as well as the fact that my business cards were redesigned&#8230;</p>
<p>Keep your eyes peeled for the next month as I work on this site in my down time. You can follow me on Twitter <a href="http://www.twitter.com/idpro">@idPro</a>. Lots of new things happening before the first of next year, with these changes, your company will be in great hands, you&#8217;ll be amazed at not only the product that we&#8217;ll be able to put out, but the speed and the cost will be blow your mind!</p>
<p>Thanks for those who care just enough to read this, and by next year I plan on putting a lot more effort into this blog!</p>
]]></content:encoded>
			<wfw:commentRss>http://idprojections.com/such-a-slacker/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stream FLV files from Mosso’s Cloud Files CDN</title>
		<link>http://idprojections.com/stream-flv-files-from-mossos-cloud-files-cdn</link>
		<comments>http://idprojections.com/stream-flv-files-from-mossos-cloud-files-cdn#comments</comments>
		<pubDate>Wed, 20 May 2009 20:46:09 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Mosso]]></category>

		<guid isPermaLink="false">http://idprojections.com/?p=149</guid>
		<description><![CDATA[I recently had a client come to me with their Mosso account. They are using them for both website hosting and as a content delivery network.
From the brief amount of time I spent going through what Mosso has to offer and speaking with their tech support I was pretty surprised. Their Live Chat support is [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had a client come to me with their Mosso account. They are using them for both website hosting and as a content delivery network.</p>
<p>From the brief amount of time I spent going through what Mosso has to offer and speaking with their tech support I was pretty surprised. Their Live Chat support is phenomenal. They helped right some issues with a DNN install and made a few other things clear as well. Their phone support is lacking, which is sad, because sometimes I will get a call from a client while driving down the highway that something is wrong and I&#8217;ll need to call Tech Support to fix the issue, but I don&#8217;t think I could trust their call center from the experience that I had.</p>
<p>Anyway, this is not a review or a rant on Mosso, this is supposed to be a quick guide on an easy way to stream your Flash videos from their Cloud Files CDN hosting package. Hit the jump fo some mo&#8230; sso&#8230; HA! See what I did there?</p>
<p><span id="more-149"></span><strong>Step 1:</strong></p>
<p>You are going to want to setup your <a rel="nofollow" href="http://www.mosso.com/cloudfiles.jsp">Cloud Files</a> account with Mosso. From there you will need to follow all of the internal information on how to get your files uploaded, etc&#8230; I use <a rel="nofollow" href="http://cyberduck.ch/">Cyberduck</a> for Mac and it&#8217;s extremely easy to get the ball rolling on this.</p>
<p><strong>Step II:</strong></p>
<p>In your Mosso admin panel, go to Hosting and then Cloud Files. Select the container you are wanting to use that has your videos in it and at the bottom make sure you have the container set to Public. Once set to public, it will provide you a link to that container. The link itself will no provide you a listing of files, so it&#8217;s relatively private in that sense. You will need to keep that link handy.</p>
<p><strong>Step Three:</strong></p>
<p>Open up your Adobe Flash and you should be presented with a Welcome Screen. If not, then click File &gt; New.</p>
<p>I chose Flash File (ActionScript 3.0), but if you have an older version, 2.0 might work just as well.</p>
<p><strong>Step Quatro:</strong></p>
<p>Once you have a new Flash file opened up, head back and select File &gt; Import &gt; Import Video.</p>
<p>There you will be presented with two options, the first one is to select a local file, the second is to use a link for a file already on the web. We&#8217;ll be using the second link.</p>
<p>Paste in the link you remembered earlier and then add your movie name and extension, so you should have something like <em>http://cdn.cloudfiles.mosso.com/c1234/movie.flv</em></p>
<p>Click the Continue button.<em><br />
</em></p>
<p><strong>Another Step:</strong></p>
<p>You will now be presented with the skin you&#8217;d like to use on your streaming video. You can change colors and there are lots of options as to how you would like for the skin to be presented.</p>
<p>Click Continue and then click Finish.</p>
<p>It will ask you to save your FLA, choose a location and hit OK. It will save both the FLA file as well as a SWF file that carries the skin information for your player. You will probably want to change some of the Parameters, such as autoPlay. You will also want to make sure the white background matches up with the same size as your video in the Properties tab to make sure you don&#8217;t have any overhang as you try to place your video on your website.</p>
<p><strong>Final Step:</strong></p>
<p>After you have the background lined up behind your video you will want to once more click File &gt; Export &gt; Export Video</p>
<p>You will choose where you want to save your SWF file. Simply upload your SWF file and the SWF file that generates your video player skin and then you can call the SWF file however you feel best suites your needs. I like <a rel="nofollow" href="http://blog.deconcept.com/swfob">SWFObject</a>.</p>
<p><em>If you have any questions about this post or any comments or point out any mistakes, feel free to leave a comment!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://idprojections.com/stream-flv-files-from-mossos-cloud-files-cdn/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wait… Where Did All the Style Go?!</title>
		<link>http://idprojections.com/wait-where-did-all-the-style-go</link>
		<comments>http://idprojections.com/wait-where-did-all-the-style-go#comments</comments>
		<pubDate>Wed, 08 Apr 2009 18:39:41 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://idprojections.com/?p=137</guid>
		<description><![CDATA[The idea behind this event is to promote Web Standards. Plain and simple. This includes proper use of (x)html, semantic markup, a good hierarchy structure, and of course, a good &#8216;ol play on words. It&#8217;s time to show off your &#60;body&#62;.
CSS Naked Day
]]></description>
			<content:encoded><![CDATA[<p>The idea behind this event is to promote Web Standards. Plain and simple. This includes proper use of (x)html, semantic markup, a good hierarchy structure, and of course, a good &#8216;ol play on words. It&#8217;s time to show off your &lt;body&gt;.</p>
<p><a href="http://naked.dustindiaz.com/">CSS Naked Day</a></p>
]]></content:encoded>
			<wfw:commentRss>http://idprojections.com/wait-where-did-all-the-style-go/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.7 ISE 500 When Trying to Post</title>
		<link>http://idprojections.com/wordpress-27-ise-500-when-trying-to-post</link>
		<comments>http://idprojections.com/wordpress-27-ise-500-when-trying-to-post#comments</comments>
		<pubDate>Thu, 22 Jan 2009 05:44:26 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://idprojections.com/wordpress-27-ise-500-when-trying-to-post</guid>
		<description><![CDATA[So, I was getting an ISE Error 500 whenever I tried to post. I also could not do any Plugin updates. I was starting to get pretty annoyed when I ran across this easy solution.
Hope it helps someone else!
Solution for WordPress 2.7 ISE Error 500 from CodeDifferent

]]></description>
			<content:encoded><![CDATA[<p>So, I was getting an ISE Error 500 whenever I tried to post. I also could not do any Plugin updates. I was starting to get pretty annoyed when I ran across this easy solution.</p>
<p>Hope it helps someone else!</p>
<p><a href="http://www.codedifferent.com/2009/01/12/solution-for-500-internal-server-error-after-upgrading-to-wordpress-27-at-1and1-server">Solution for WordPress 2.7 ISE Error 500 from CodeDifferent<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://idprojections.com/wordpress-27-ise-500-when-trying-to-post/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery .load() &amp; UI Sortables AJAX/PHP Fun!</title>
		<link>http://idprojections.com/jquery-load-ui-sortables-ajaxphp-fun</link>
		<comments>http://idprojections.com/jquery-load-ui-sortables-ajaxphp-fun#comments</comments>
		<pubDate>Thu, 22 Jan 2009 05:31:07 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://idprojections.com/?p=107</guid>
		<description><![CDATA[So, I&#8217;ve been pretty neglectful of this blog, but I have a hard time trying to figure out what to write until I started doing some searching the other day trying to figure out how to do a sample .post() or .load() with jQuery. I found plenty of information on how to do the JavaScript [...]]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ve been pretty neglectful of this blog, but I have a hard time trying to figure out what to write until I started doing some searching the other day trying to figure out how to do a sample .post() or .load() with jQuery. I found plenty of information on how to do the JavaScript side of it, but I wasn&#8217;t able to find an example that had the PHP sample in it as well.</p>
<p>In this post I am going to cover .load() as well as the <a href="http://ui.jquery.com/demos/sortable">jQuery UI Sortables</a> plugin. I hope this is beneficial to someone!<br />
<span id="more-107"></span><br />
Well, I figured since I have nothing to write about, I would post my findings in hope that maybe some day a searcher will happen across this site and will find it helpful.</p>
<p>First off &#8211; <strong>.load()</strong></p>
<p>.load() was actually really simple to implement once I figured out exactly what it was doing. It&#8217;s just a simple GET request! Write the PHP as if it was a form running a GET to the PHP file, but it can do more. What if you need to insert a HTML document into the middle of your site when a certain criteria is met.</p>
<p>An easy example is if you have a radio button, which clicked will load a new part to the form so that they can fill out the rest of the required information.</p>
<p>Here is the sample form</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">form</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;itemName&quot;</span> <span style="color: #000066;">enctype</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;multipart/form-data&quot;</span> <span style="color: #000066;">method</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;post&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemName&quot;</span>&gt;</span>Name<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemName&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;required&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemName&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemDesc&quot;</span>&gt;</span>Description<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">textarea</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemDesc&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;required&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemDesc&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">textarea</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemCat&quot;</span>&gt;</span>Category<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemCat&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;required&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemCat&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemType1txt&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemType&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;radio&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemType&quot;</span>&gt;</span>1 Text Area<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
      	 <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemType3txt&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemType&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;radio&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemType&quot;</span>&gt;</span>3 Text Areas<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemImg&quot;</span>&gt;</span>Image<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemImg&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;required&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemImg&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemAdd&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemAdd&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;submit&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Add Item&quot;</span> <span style="color: #66cc66;">/</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></pre></div></div>

<p>And then you could do a bit of JavaScript like this</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#frmItemType1txt&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#frmItemTypeInput&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;slow&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#frmItemTypeInput&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;item1Txt.html&quot;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This will wait for your to click on the first radio button and then it will make sure the #frmItemTypeInput div is visible in case your CSS or any other JavaScript hides it and then it will load the item1Txt.html file into that div.</p>
<p>That HTML document can be as simple as</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">label</span> <span style="color: #000066;">for</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemType1txtInput&quot;</span>&gt;</span>Message<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">label</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">textarea</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemType1txtInput&quot;</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;frmItemType1txtInput&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;required&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">textarea</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span></pre></div></div>

<p>Nothing more to it!</p>
<p>Now, let&#8217;s say you want to get fancy and you are using the <a href="http://ui.jquery.com/demos/sortable">jQuery UI Sortables</a> plugin and you want your order to write itself to a database as soon as you change the placement. No need for a submit button (unless JS is disabled of course). Here is what I came up with to make the Sortables work as you&#8217;d hope!</p>
<p>I had a bunch of categories that needed to be able to be arranged and rearranged as necessary. So, lets say you already have the categories in your database and you just need to pull them out of the database, show them, and then have them sortable and rewrite back to the database of their new position.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div id=&quot;info&quot;&gt;&lt;/div&gt;
&lt;ul id=&quot;catList&quot;&gt;
  	<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  		<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'SELECT * FROM Category ORDER BY Placement'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// I have a column called Placement with nothing in it to start out with set to INT (11)</span>
 			<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_fetch_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
				<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'&lt;li id=&quot;catItem_'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; class=&quot;sortitem&quot;&gt;
								&lt;img src=&quot;img/arrow.png&quot; alt=&quot;Arrange Category&quot; title=&quot;Arrange Category&quot; class=&quot;handle&quot; /&gt;
								&lt;span class=&quot;catName&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">'CategoryName'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/span&gt;
							&lt;/li&gt;n&quot;</span><span style="color: #339933;">;</span>
  		<span style="color: #009900;">&#125;</span>
		<span style="color: #000000; font-weight: bold;">?&gt;</span>
  &lt;/ul&gt;</pre></div></div>

<p>This will run through the while statement pulling out all the categories within the database. I would recommend keeping the #info div hidden or display: none, but during testing purposes, keep it visible. Any MySQL errors will appear there.</p>
<p>The JavaScript is pretty simple for this. Associate the image to be the grabbing point to sort everything and then call the load function to write the placement back to the database.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#catList&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">sortable</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
		handle <span style="color: #339933;">:</span> <span style="color: #3366CC;">'.handle'</span><span style="color: #339933;">,</span>
		update <span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #003366; font-weight: bold;">var</span> order <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#catList'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">sortable</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'serialize'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#info&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">load</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;sortCategory.php?&quot;</span><span style="color: #339933;">+</span>order<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Pretty simple so far, right? So, the sortCategory.php has got to be where all the hard stuff happens, right? Wrong. Just another quick MySQL query.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'../../dbConfig.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'catItem'</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$position</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span>
	<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UPDATE Category SET Placement = <span style="color: #006699; font-weight: bold;">$position</span> WHERE id = <span style="color: #006699; font-weight: bold;">$item</span>&quot;</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">endforeach</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>It&#8217;s seriously that easy to have the Sortables write back to the database.</p>
<p>Feel free to comment if you have any questions about what I did here or if you have any way to make what I did better/easier/faster!</p>
]]></content:encoded>
			<wfw:commentRss>http://idprojections.com/jquery-load-ui-sortables-ajaxphp-fun/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Text Message Marketing Request</title>
		<link>http://idprojections.com/text-message-marketing-request</link>
		<comments>http://idprojections.com/text-message-marketing-request#comments</comments>
		<pubDate>Sun, 04 Jan 2009 18:26:16 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://idprojections.com/text-message-marketing-request</guid>
		<description><![CDATA[I am thinking about a project. But I need your help! I need the API for as many aggregators as possible. I have emailed them all, but so far most are unresponsive. If you happen to have any information on some companies, it would be very helpful.
I still need APIs from companies like :
http://www.slingermobile.com/
http://www.rhbrands.com/
http://www.messagebuzz.com/
http://www.cellitmarketing.com/
http://www.promotxt.com/
http://www.clubtexting.com/
And I [...]]]></description>
			<content:encoded><![CDATA[<p>I am thinking about a project. But I need your help! I need the API for as many aggregators as possible. I have emailed them all, but so far most are unresponsive. If you happen to have any information on some companies, it would be very helpful.<br />
I still need APIs from companies like :<br />
http://www.slingermobile.com/<br />
http://www.rhbrands.com/<br />
http://www.messagebuzz.com/<br />
http://www.cellitmarketing.com/<br />
http://www.promotxt.com/<br />
http://www.clubtexting.com/</p>
<p>And I am sure there are tons others, but it would helpful to get these for a start&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://idprojections.com/text-message-marketing-request/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Timed Image Rotator</title>
		<link>http://idprojections.com/timed-image-rotator</link>
		<comments>http://idprojections.com/timed-image-rotator#comments</comments>
		<pubDate>Sun, 07 Dec 2008 20:18:03 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://idprojections.com/?p=97</guid>
		<description><![CDATA[I was working on a project a while back and I ran across a really neat blog. I wish I could remember the link to the site as I would gladly give credit to where my idea came from. I will edit this if I run across it again.
Anyway, he had a picture of his [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a project a while back and I ran across a really neat blog. I wish I could remember the link to the site as I would gladly give credit to where my idea came from. I will edit this if I run across it again.</p>
<p>Anyway, he had a picture of his parent&#8217;s farm that would change according to not only the time of day, but the current weather. He didn&#8217;t want to share his code with the public as I am sure it took quit a while to produce so I can understand, but I liked the concept and wanted to use it.</p>
<p>I was soon given a project where I could use a technique like that &#8211; <a href="http://idprojections.com/portfolio/charlies-farm-and-home">Charlies Farm and Home</a> &#8211; so I began working on it.<br />
<span id="more-97"></span><br />
Now, there are many different ways to have done this, but I decided I wanted it to work on the user&#8217;s end, so that the user would get an image depicting the time of day it currently was at their house. Obviously, since it was going to be a client side appication, I am going to use JavaScript to accomplish the task.</p>
<p>First off, we are going to create the XHTML document that we are going to use. Now, I am a big fan of writing my XHTML semantically, so I am going to be using the &lt;h1&gt; tag for my header and then doing a quick image replacement technique, so that the header is not only SEO friendly, but usable by those with disabilities and users will even have a fall back in case JavaScript is disabled on their browser.</p>
<p>Let&#8217;s start with a really basic XHTML document.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=UTF-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Site Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>Site or Page Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>After we get the basics done, we can throw in a little CSS. We will wrap the text inside the &lt;h1&gt; tag with a span and then we will use CSS to hide the text from browsers with CSS enabled and we will show them an image in it&#8217;s place. This will be the default image that users with JavaScript disabled will see.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=UTF-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Site Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span>
h1 {
  background: #000 url(../image/directory/1.jpg) no-repeat left top;
  width: 801px;
  height: 241px;
}
h1 span {
  display: none;
}
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>Site or Page Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>Now, let&#8217;s take a look at the the JavaScript we are going to use to grab the images&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> getIMG<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
 datetoday <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 timenow<span style="color: #339933;">=</span>datetoday.<span style="color: #660066;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 datetoday.<span style="color: #660066;">setTime</span><span style="color: #009900;">&#40;</span>timenow<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 thehour <span style="color: #339933;">=</span> datetoday.<span style="color: #660066;">getHours</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>thehour <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">22</span><span style="color: #009900;">&#41;</span>
  display <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;../image/directory/1.jpg&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>thehour <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">18</span><span style="color: #009900;">&#41;</span>
  display <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;../image/directory/2.jpg&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>thehour <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">8</span><span style="color: #009900;">&#41;</span>
  display <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;../image/directory/3.jpg&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>thehour <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">5</span><span style="color: #009900;">&#41;</span>
  display <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;../image/directory/4.jpg&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>thehour <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span>
  display <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;../image/directory/1.jpg&quot;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">else</span>
  display <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;../image/directory/1.jpg&quot;</span><span style="color: #339933;">;</span>
&nbsp;
 <span style="color: #003366; font-weight: bold;">var</span> image <span style="color: #339933;">=</span> <span style="color: #3366CC;">'&lt;'</span><span style="color: #339933;">;</span>  image<span style="color: #339933;">+=</span><span style="color: #3366CC;">'img alt=&quot;&quot; src=../image/directory/'</span> <span style="color: #339933;">+</span> display <span style="color: #339933;">+</span> <span style="color: #3366CC;">' /'</span><span style="color: #339933;">;</span>  image<span style="color: #339933;">+=</span><span style="color: #3366CC;">'&gt;'</span><span style="color: #339933;">;</span>
&nbsp;
 document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>image<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>We will add a call to the JavaScript in the HTML and then add the call to grab the image that the JavaScript chooses.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span> xmlns<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=UTF-8&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>Site Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;rotator.js&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span>
h1 {
  background: #000 url(../image/directory/1.jpg) no-repeat left top;
  width: 801px;
  height: 241px;
}
h1 span {
  display: none;
}
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">h1</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>Site or Page Title<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>getIMG();<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">h1</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

<p>That&#8217;s pretty much it. You&#8217;ll need to edit the size of the image in the CSS for the &lt;h1&gt; tag and you will need to specify the path to your image directory in the JavaScript and of course make sure all the images are named correctly.</p>
<p>Feel free to comment if you have any suggestions or questions, I will work on a jQuery version of this one of these days and post it.</p>
]]></content:encoded>
			<wfw:commentRss>http://idprojections.com/timed-image-rotator/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Easy Way to Log Referral IDs with PHP</title>
		<link>http://idprojections.com/easy-way-to-log-referral-ids-with-php</link>
		<comments>http://idprojections.com/easy-way-to-log-referral-ids-with-php#comments</comments>
		<pubDate>Mon, 01 Dec 2008 00:19:48 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://idprojections.com/?p=67</guid>
		<description><![CDATA[I figured if I am going to have a blog on this site, I might as well post something informational and hopefully useful to someone so I wrote up this little diddy.
So, I was working on a recent project and needed an easy way to track referral URL uses. They weren&#8217;t going to really be [...]]]></description>
			<content:encoded><![CDATA[<p>I figured if I am going to have a blog on this site, I might as well post something informational and hopefully useful to someone so I wrote up this little diddy.</p>
<p>So, I was working on a recent project and needed an easy way to track referral URL uses. They weren&#8217;t going to really be affiliates, but they got a small commission off of every sale they drove to the site&#8230; so ya, I guess it was like an affiliate tracker&#8230; but I just needed something quick and easy so I came up with this little script.</p>
<p><span id="more-67"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$urlParts</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'.'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_HOST'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$referralID</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$urlParts</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">setcookie</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;site_referral&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$referralID</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">time</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">7200</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;example.com&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: https://www.example.com/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Basically, I gave each referrer a subdomain (http://referrer.example.com/) and then when the user goes to this subdomain your site will grab the URL and break it into three parts via the explode function. It will then grab the first part, which is obviously the referral&#8217;s ID you gave them.</p>
<p>It will then write that to a cookie, or if you wanted a database, and then it redirects the user to the homepage of your site like nothing ever happened.</p>
<p>I set the cookie so that I could pass it around a few times, but you could replace the setcookie function with something like this.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$referralSet</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT referral FROM referralLogs WHERE referral=&quot;</span><span style="color: #000088;">$referralID</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$referralSet</span> <span style="color: #339933;">!=</span> <span style="color: #000088;">$referralID</span> <span style="color: #009900;">&#123;</span>
<span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INSERT INTO referralLogs SET referral=&quot;</span><span style="color: #000088;">$referralID</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">mysql_error</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$referralCounter</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT counter FROM referralLogs WHERE referral=&quot;</span><span style="color: #000088;">$referralID</span><span style="color: #0000ff;">&quot; LIMIT 1&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$referralCounter</span><span style="color: #339933;">++;</span>
<span style="color: #000088;">$referralUpdate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mysql_query</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UPDATE referralLogs WHERE referral=&quot;</span><span style="color: #000088;">$referral</span><span style="color: #0000ff;">&quot; SET count=&quot;</span><span style="color: #000088;">$referralCounter</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I didn&#8217;t use this exact code, but I think it is valid. This should check to see if you already have the current referral code in your database and if not, add it. Then it will grab the counter from the database and increase the count by one.</p>
<p>If you run into any errors, with it, feel free to post a comment below and I will try and help out!</p>
]]></content:encoded>
			<wfw:commentRss>http://idprojections.com/easy-way-to-log-referral-ids-with-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turkey Dais!</title>
		<link>http://idprojections.com/turkey-dais</link>
		<comments>http://idprojections.com/turkey-dais#comments</comments>
		<pubDate>Thu, 27 Nov 2008 21:46:41 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Nothing Important]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=18</guid>
		<description><![CDATA[Turkey, Bud-Light, Familia, and more Bud-Light&#8230; Gotta love the holidays!
I ate too much at my family&#8217;s house and then ended up heading over to my wife&#8217;s family&#8217;s house and ate even more.
Today is the celebration of my new site going live and I have high hopes that someday people will have a reason to stop [...]]]></description>
			<content:encoded><![CDATA[<p>Turkey, Bud-Light, Familia, and more Bud-Light&#8230; Gotta love the holidays!</p>
<p>I ate too much at my family&#8217;s house and then ended up heading over to my wife&#8217;s family&#8217;s house and ate even more.</p>
<p>Today is the celebration of my new site going live and I have high hopes that someday people will have a reason to stop in! Until then I will sit here and talk to myself&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://idprojections.com/turkey-dais/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello Inter-tubes!</title>
		<link>http://idprojections.com/hello-world-2</link>
		<comments>http://idprojections.com/hello-world-2#comments</comments>
		<pubDate>Thu, 27 Nov 2008 05:27:51 +0000</pubDate>
		<dc:creator>Kyle</dc:creator>
				<category><![CDATA[Nothing Important]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Freelance]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://localhost:8888/?p=1</guid>
		<description><![CDATA[Welcome to the NEW idProjections.com!
My name is Kyle and I fancy myself a Web Developer of sorts. I am a freelance coder out of St. Louis, MO. I plan on keeping this site up-to-date with my latest projects and my pieces of code that I might find interesting.
This is my first blog so we will [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Welcome to the NEW idProjections.com!</strong></p>
<p>My name is Kyle and I fancy myself a Web Developer of sorts. I am a freelance coder out of St. Louis, MO. I plan on keeping this site up-to-date with my latest projects and my pieces of code that I might find interesting.</p>
<p>This is my first blog so we will see how this goes!</p>
<p><span id="more-4"></span></p>
<p>I enjoy coding in CSS, XHTML, PHP, MySQL, jQuery, and plan on learning Ruby on Rails here one of these days! I enjoy spending time on <a href="http://csscreator.com/">CSSCreator.com</a> trying to help out other CSS coders and receiving some help there myself whenever I run into a wall.</p>
<p>If you have any questions about anything that I post on here please feel free to post a comment and hopefully I will be able to help out or if I happen to get two readers, someone else will be able to come along and help out.</p>
]]></content:encoded>
			<wfw:commentRss>http://idprojections.com/hello-world-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
