<?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>John McCollum &#187; PHP</title>
	<atom:link href="http://johnmc.co/llum/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://johnmc.co/llum</link>
	<description>Muddling through since 1980</description>
	<lastBuildDate>Thu, 02 Sep 2010 21:12:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Removing index.php for Codeigniter (Zeus Server)</title>
		<link>http://johnmc.co/llum/removing-indexphp-for-codeigniter-zeus-server/</link>
		<comments>http://johnmc.co/llum/removing-indexphp-for-codeigniter-zeus-server/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 18:21:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Codeigniter]]></category>
		<category><![CDATA[mod rewrite]]></category>

		<guid isPermaLink="false">http://johnmccollum.co.uk/?p=75</guid>
		<description><![CDATA[Just a quick post &#8211; spent a few hours the other night trying to get Zeus Rewrite to play ball so that this: http://www.example.com/index.php/controller turned into this: http://www.example.com/controller There&#8217;s a distinct lack of examples for Zeus rewrite, but here&#8217;s what worked for me: map path into SCRATCH:DOCROOT from / set SCRATCH:REQUEST_URI = %{URL} look for [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjohnmc.co%2Fllum%2Fremoving-indexphp-for-codeigniter-zeus-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjohnmc.co%2Fllum%2Fremoving-indexphp-for-codeigniter-zeus-server%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Just a quick post &#8211; spent a few hours the other night trying to get Zeus Rewrite to play ball so that this:<br />
<pre>http://www.example.com/index.php/controller</pre><br />
turned into this:<br />
<pre>http://www.example.com/controller</pre><br />
There&#8217;s a distinct lack of examples for Zeus rewrite, but here&#8217;s what worked for me:<br />
<pre><pre>map path into SCRATCH:DOCROOT from /

set SCRATCH:REQUEST_URI = %{URL}

look for file at %{SCRATCH:DOCROOT}%{SCRATCH:REQUEST_URI}
if not exists then look for dir at %{SCRATCH:REQUEST_URI}%{SCRATCH:REQUEST_URI}
if not exists then set URL = /index.php%{SCRATCH:REQUEST_URI}</pre></pre><br />
Your mileage may vary; some tweaking may be required for your particular set up. Hopefully this post saves someone some work!</p>
]]></content:encoded>
			<wfw:commentRss>http://johnmc.co/llum/removing-indexphp-for-codeigniter-zeus-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Toawema goes live!</title>
		<link>http://johnmc.co/llum/toawema-goes-live/</link>
		<comments>http://johnmc.co/llum/toawema-goes-live/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 22:13:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Codeigniter]]></category>

		<guid isPermaLink="false">http://johnmccollum.co.uk/?p=71</guid>
		<description><![CDATA[We&#8217;ve just put the finishing touches on Toawema, a brand new prize draw website! We used Codeigniter, with JQuery for the UI. Using Codeigniter was a dream. It&#8217;s well known for its speed and lightweight footprint, but there are at least three other advantages that really sold it to me. Firstly, there&#8217;s a huge amount [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjohnmc.co%2Fllum%2Ftoawema-goes-live%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjohnmc.co%2Fllum%2Ftoawema-goes-live%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>We&#8217;ve just put the finishing touches on <a href="http://www.toawema.co.uk">Toawema</a>, a brand new prize draw website!</p>
<p>We used <a href="http://codeigniter.com/">Codeigniter</a>, with <a href="http://jquery.com">JQuery</a> for the UI.</p>
<p>Using Codeigniter was a dream. It&#8217;s well known for its speed and lightweight footprint, but there are at least three other advantages that really sold it to me.</p>
<p>Firstly, there&#8217;s a huge amount of flexibility compared to other frameworks. Works with almost any host, and any PHP version going back to 4.3.2. No command line jiggery-pokery needed to get it going. Completely open source, so you can hack away at the core to your heart&#8217;s content (or better, extend it.)</p>
<p>In fact, it is so flexible that you don&#8217;t even need to comply with the MVC design pattern &#8211; you could, if you wanted to, completely ditch the model and work only with controllers and views. There&#8217;s no restrictive naming conventions, or anything like that.</p>
<p>Secondly, the community is very active and helpful. Although I had a couple of minor issues throughout the development, the forum contained all the information I needed. I never had to ask a single question.</p>
<p>Lastly, Codeigniter has commercial backing in the shape of EllisLab. The future of Codeigniter looks really bright. In fact, 1.7 was released the day Toawema went live (thanks guys, it could&#8217;ve saved a ton of coding on the forms!)</p>
<p>Codeigniter is a fantastic product, and I can&#8217;t recommend it highly enough for anyone looking at PHP frameworks. I can&#8217;t wait to check out <a href="http://expressionengine.com/">ExpressionEngine</a> next!</p>
]]></content:encoded>
			<wfw:commentRss>http://johnmc.co/llum/toawema-goes-live/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to build search into your site with JQuery and Yahoo!</title>
		<link>http://johnmc.co/llum/how-to-build-search-into-your-site-with-jquery-and-yahoo/</link>
		<comments>http://johnmc.co/llum/how-to-build-search-into-your-site-with-jquery-and-yahoo/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 21:06:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[Search]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://johnmccollum.co.uk/?p=36</guid>
		<description><![CDATA[Yahoo have a hard time fighting off the image of being bridesmaid to Google&#8217;s bride. However, they have a decided knack for turning out really cool developer toys! For example, check out the Yahoo User Interface library, Yahoo Pipes, or their latest baby, Yahoo BOSS. Short for &#8216;Build your Own Search Service&#8217;, Yahoo have pretty [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjohnmc.co%2Fllum%2Fhow-to-build-search-into-your-site-with-jquery-and-yahoo%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjohnmc.co%2Fllum%2Fhow-to-build-search-into-your-site-with-jquery-and-yahoo%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Yahoo have a hard time fighting off the image of being bridesmaid to Google&#8217;s bride. However, they have a decided knack for turning out really cool developer toys! For example, check out the <a href="http://developer.yahoo.com/yui/">Yahoo User Interface library</a>, <a href="http://pipes.yahoo.com/pipes/">Yahoo Pipes</a>, or their latest baby, <a href="http://developer.yahoo.com/search/boss/">Yahoo BOSS</a>.</p>
<p>Short for &#8216;Build your Own Search Service&#8217;, Yahoo have pretty much opened up their entire search service via an API. With an unrestricted number of queries, and complete control over presentation of results, you can really go to town with this one!</p>
<p>Getting started is easy; simply get yourself an <a href="http://developer.yahoo.com/wsregapp/">API key here</a>. Go on, I&#8217;ll wait.</p>
<p>With that done, anyone with basic knowledge of <a href="http://johnmccollum.co.uk/category/php/">PHP</a> and <a href="http://johnmccollum.co.uk/category/jquery/">JQuery</a> can easily build a search application!</p>
<p><a href="http://johnmccollum.co.uk/boss/">Check out my demonstration here.</a></p>
<p>There are two pages involved in this demonstration. The first page displays the form, and contains the necessary JQuery code to fire off an AJAX request to the second page. The second page takes the posted value, fires off a request to the API, and returns the result.</p>
<p>Without further ado, here&#8217;s the JQuery:<br />
<pre><pre>&nbsp;&nbsp;&nbsp;&nbsp;$(document).ready(function(){
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(&#039;#results&#039;).hide();

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(&#039;#search&#039;).click(function(){
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(&#039;#results&#039;).hide();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;searchterm = $(&#039;#searchterm&#039;).val();
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$.post(&#039;getresult.php&#039;, {query: searchterm}, function(data){
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(&#039;#results&#039;).html(data).show(&#039;slow&#039;);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;})
&nbsp;&nbsp;&nbsp;&nbsp;})</pre></pre><br />
Nothing too horrendous here; hide the results division, grab the term to be searched for, fire off an AJAX request, and put the returned data in the results div. Show it slloooooowly. <img src='http://johnmc.co/llum/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The code in &#8216;getresult.php&#8217; isn&#8217;t much more complex; <a href="http://johnmccollum.co.uk/boss/getresult.txt">you can see it here.</a></p>
<p>That&#8217;s all there is to it! (At least for this very basic example.)</p>
<p>Once again, <a href="http://johnmccollum.co.uk/boss/">you can see a demonstration here</a>.</p>
<p>I&#8217;m sure there must be loads of ideas for mashups out there; let&#8217;s hear some of your thoughts!</p>
]]></content:encoded>
			<wfw:commentRss>http://johnmc.co/llum/how-to-build-search-into-your-site-with-jquery-and-yahoo/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
