<?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>thephpx - codeigniter junky &#187; development</title>
	<atom:link href="http://www.thephpx.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thephpx.com</link>
	<description>codeigniter, jquery, php, mysql</description>
	<lastBuildDate>Mon, 21 Nov 2011 21:17:51 +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>Stress testing and profiling tools for web application</title>
		<link>http://www.thephpx.com/2011/11/22/stress-testing-and-profiling-tools-for-web-application/</link>
		<comments>http://www.thephpx.com/2011/11/22/stress-testing-and-profiling-tools-for-web-application/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 21:16:56 +0000</pubDate>
		<dc:creator>thephpx</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[stress testing]]></category>

		<guid isPermaLink="false">http://www.thephpx.com/?p=276</guid>
		<description><![CDATA[Hi there, Recently I came across some cool new tools along with some of my old favorites and thought this calls for a quick post - Front End Profiling Tool: FireBug: Firebug is pretty handy to find out how long it is taking your website to load and render as well as how many header &#8230; <a href="http://www.thephpx.com/2011/11/22/stress-testing-and-profiling-tools-for-web-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hi there,</p>
<p>Recently I came across some cool new tools along with some of my old favorites and thought this calls for a quick post -</p>
<h2>Front End Profiling Tool:</h2>
<p><b>FireBug:</b> Firebug is pretty handy to find out how long it is taking your website to load and render as well as how many header calls are made to fetch external java-script and css files. It also packs lots of useful tools and a must have for any serious web application developer.</p>
<p><b>YSlow:</b>YSlow sort of gives your an easy to understand report on your web pages flaws and how to overcome them.</p>
<h2>Web Server Stress Testing Tool:</h2>
<p><b>Siege:</b> Siege is a command line tool that you can install and simulate concurrent hits to any particular URL.</p>
<p><strong>Example:</strong></p>
<pre code="html">siege -c 10 -r 10 http://www.mydomain.com/</pre>
<p>Above code pings the URL concurrently with 10 connections repeating 10 times making 100 hits to the URL.</p>
<h2>MySQL database Profiling Tool:</h2>
<p><b>Jet Profiler:</b>Jet profiler Shows the real time activity of the connected mysql database once its hooked up. It is pretty useful when used together with the siege tool and see how concurrent hits affect the database.</p>
<p><br/></p>
<p>Naturally these are not all that is out there so any new inputs from the readers will be most welcomed <img src='http://www.thephpx.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><br/><br />
<br/><br />
thanks,</p>
<blockquote>
<h4>faisal ahmed</h4>
<p><em style="padding: 0; margin: 0;">web application developer</em><br />
<strong style="padding: 0; margin: 0;">web: </strong>http://www.faisalbd.com/<br />
<strong style="padding: 0; margin: 0;">email: </strong>thephpx(at)gmail(dot)com</p></blockquote>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.thephpx.com/2011/11/22/stress-testing-and-profiling-tools-for-web-application/"></g:plusone></div><div class="shr-publisher-276"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.thephpx.com%2F2011%2F11%2F22%2Fstress-testing-and-profiling-tools-for-web-application%2F&amp;title=Stress%20testing%20and%20profiling%20tools%20for%20web%20application" id="wpa2a_2" onclick="pageTracker._trackPageview('/outgoing/www.addtoany.com/share_save_url=http_3A_2F_2Fwww.thephpx.com_2F2011_2F11_2F22_2Fstress-testing-and-profiling-tools-for-web-application_2F_amp_title=Stress_20testing_20and_20profiling_20tools_20for_20web_20application?referer=');"><img src="http://www.thephpx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thephpx.com/2011/11/22/stress-testing-and-profiling-tools-for-web-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: Bash script for dynamic symbolic link creation</title>
		<link>http://www.thephpx.com/2011/08/26/linux-bash-script-for-dynamic-symbolic-link-creation/</link>
		<comments>http://www.thephpx.com/2011/08/26/linux-bash-script-for-dynamic-symbolic-link-creation/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 02:54:25 +0000</pubDate>
		<dc:creator>thephpx</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.thephpx.com/?p=247</guid>
		<description><![CDATA[Hello everyone, I just created this simple but useful bash script to create symbolic link. It lets me avoid going into my local server root located at /var/www/ and instead symbolic link of a folder located at /home/public/ is created at /var/www/ so anything that you put inside /home/public/project1 or project2 or whatever the folder &#8230; <a href="http://www.thephpx.com/2011/08/26/linux-bash-script-for-dynamic-symbolic-link-creation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hello everyone,</p>
<p>I just created this simple but useful bash script to create symbolic link. It lets me avoid going into my local server root located at /var/www/ and instead symbolic link of a folder located at /home/public/ is created at /var/www/ so anything that you put inside /home/public/project1 or project2 or whatever the folder name is it also gets reflected and thus can be accessed via link http://localhost/project1 or http://localhost/project2 and so on.</p>
<p><strong>STEP 1:</strong> create a file named <strong>symlink</strong> at /home/public/ or anywhere you like. Then copy the following code inside it and save it.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="co2">#! /bin/bash</span></div>
</li>
<li class="li1">
<div class="de1">sudo mkdir -m <span class="nu0">777</span> $<span class="nu0">1</span></div>
</li>
<li class="li1">
<div class="de1">sudo ln -s /home/<span class="kw1">default</span>/Public/$<span class="nu0">1</span> /var/www</div>
</li>
<li class="li1">
<div class="de1">echo $<span class="nu0">1</span> symbolic link created</div>
</li>
</ol>
</div>
<p>
<br/><strong>STEP 2:</strong> To use the script to create a folder and create a symbolic link at the server root located at /var/www/ you have to type in the following code and press enter.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">sh symlink faisal</div>
</li>
</ol>
</div>
<p><br/>
<p>
On the above code sh is the prefix required to run the bash script named symlink and faisal is the name of the folder i want to create and link to /var/www/</p>
<p>Hope the above snippet was useful.</p>
<p><br/><br />
thanks,</p>
<blockquote>
<h4>faisal ahmed</h4>
<p><em style="padding: 0; margin: 0;">web application developer</em><br />
<strong style="padding: 0; margin: 0;">web: </strong>http://www.faisalbd.com/<br />
<strong style="padding: 0; margin: 0;">email: </strong>thephpx(at)gmail(dot)com</p></blockquote>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.thephpx.com/2011/08/26/linux-bash-script-for-dynamic-symbolic-link-creation/"></g:plusone></div><div class="shr-publisher-247"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.thephpx.com%2F2011%2F08%2F26%2Flinux-bash-script-for-dynamic-symbolic-link-creation%2F&amp;title=Linux%3A%20Bash%20script%20for%20dynamic%20symbolic%20link%20creation" id="wpa2a_4" onclick="pageTracker._trackPageview('/outgoing/www.addtoany.com/share_save_url=http_3A_2F_2Fwww.thephpx.com_2F2011_2F08_2F26_2Flinux-bash-script-for-dynamic-symbolic-link-creation_2F_amp_title=Linux_3A_20Bash_20script_20for_20dynamic_20symbolic_20link_20creation?referer=');"><img src="http://www.thephpx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thephpx.com/2011/08/26/linux-bash-script-for-dynamic-symbolic-link-creation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>google +1 button onClick event</title>
		<link>http://www.thephpx.com/2011/06/10/google-1-button-onclick-event/</link>
		<comments>http://www.thephpx.com/2011/06/10/google-1-button-onclick-event/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 10:25:02 +0000</pubDate>
		<dc:creator>thephpx</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google +1]]></category>
		<category><![CDATA[google +1 callback]]></category>

		<guid isPermaLink="false">http://www.thephpx.com/?p=238</guid>
		<description><![CDATA[Hello there, I was recently working with google +1 feature and came about this trick to trace if someone clicked the button or not. CODE : &#160; &#60;html&#62; &#60;head&#62; &#160; &#160; &#60;script type=&#34;text/javascript&#34; src=&#34;https://apis.google.com/js/plusone.js&#34;&#62;&#60;/script&#62; &#160; &#160; &#60;script type=&#34;text/javascript&#34;&#62; &#160; &#160; &#160; &#160;function testme&#40;&#41;&#123; &#160; &#160; &#160; &#160; &#160; alert&#40;&#8216;test&#8217;&#41;; &#160; &#160; &#160; &#160;&#125; &#160; &#160; &#8230; <a href="http://www.thephpx.com/2011/06/10/google-1-button-onclick-event/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hello there,<br/><br />
I was recently working with google +1 feature and came about this trick to trace if someone clicked the button or not.</p>
<p><b>CODE :</b></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&lt;html&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;head&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;script type=<span class="st0">&quot;text/javascript&quot;</span> src=<span class="st0">&quot;https://apis.google.com/js/plusone.js&quot;</span>&gt;&lt;/script&gt;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &lt;script type=<span class="st0">&quot;text/javascript&quot;</span>&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;<span class="kw2">function</span> testme<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alert<span class="br0">&#40;</span><span class="st0">&#8216;test&#8217;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">&lt;/script&gt;</span></div>
</li>
<li class="li2">
<div class="de2">&lt;/head&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;body&gt;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &lt;g:plusone callback=<span class="st0">&quot;testme&quot;</span> href=<span class="st0">&quot;http://www.faisalbd.com/&quot;</span>&gt;&lt;/g:plusone&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;/body&gt;</div>
</li>
<li class="li1">
<div class="de1">&lt;/html&gt;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
</ol>
</div>
<p><br/><br />
Hope it helped someone <img src='http://www.thephpx.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<br/><br />
thanks,</p>
<blockquote>
<h4>faisal ahmed</h4>
<p><em style="padding: 0; margin: 0;">web application developer</em><br />
<strong style="padding: 0; margin: 0;">web: </strong>http://www.faisalbd.com/<br />
<strong style="padding: 0; margin: 0;">email: </strong>thephpx(at)gmail(dot)com</p></blockquote>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.thephpx.com/2011/06/10/google-1-button-onclick-event/"></g:plusone></div><div class="shr-publisher-238"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.thephpx.com%2F2011%2F06%2F10%2Fgoogle-1-button-onclick-event%2F&amp;title=google%20%2B1%20button%20onClick%20event" id="wpa2a_6" onclick="pageTracker._trackPageview('/outgoing/www.addtoany.com/share_save_url=http_3A_2F_2Fwww.thephpx.com_2F2011_2F06_2F10_2Fgoogle-1-button-onclick-event_2F_amp_title=google_20_2B1_20button_20onClick_20event?referer=');"><img src="http://www.thephpx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thephpx.com/2011/06/10/google-1-button-onclick-event/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dummies guide to LAMP setup on linux :)</title>
		<link>http://www.thephpx.com/2011/05/31/dummies-guide-to-lamp-setup-on-linux/</link>
		<comments>http://www.thephpx.com/2011/05/31/dummies-guide-to-lamp-setup-on-linux/#comments</comments>
		<pubDate>Tue, 31 May 2011 15:40:35 +0000</pubDate>
		<dc:creator>thephpx</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[LAMP Stack]]></category>
		<category><![CDATA[phpMyadmin]]></category>

		<guid isPermaLink="false">http://www.thephpx.com/?p=224</guid>
		<description><![CDATA[Hello everyone, Recently I came across several nifty apt-get commands that quite handy and if used properly can be a life saver while setting up LAMP stack on your system. Step 1 : One line LAMP setup on linux - sudo apt-get install lamp-server^ Step 2 : Setup phpMyadmin to manage your mysql databases - &#8230; <a href="http://www.thephpx.com/2011/05/31/dummies-guide-to-lamp-setup-on-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hello everyone,<br />
<br/><br />
Recently I came across several nifty apt-get commands that quite handy and if used properly can be a life saver while setting up LAMP stack on your system.<br />
<br/><br />
<strong>Step 1 : One line LAMP setup on linux -</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">sudo apt-get install lamp-server^</div>
</li>
</ol>
</div>
<p><br/><br />
<strong>Step 2 : Setup phpMyadmin to manage your mysql databases -</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">sudo apt-get install phpmyadmin</div>
</li>
</ol>
</div>
<p><br/><br />
<strong>Step 3 : Setup xdebug and integrate with php5 installation -</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">sudo apt-get install php5-xdebug</div>
</li>
</ol>
</div>
<p><br/><br />
<strong>Step 4 : Setup cURL -</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">sudo apt-get install php5-curl</div>
</li>
</ol>
</div>
<p><br/><br />
<strong>After the above command finishes installing curl do the following -</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">cd /etc/php5/conf.d/
</div>
</li>
<li class="li1">
<div class="de1">sudo gedit xdebug.ini</div>
</li>
</ol>
</div>
<p><br/><br />
<strong>After opening the file in gedit, add the following lines at the end of the file then save and close it.</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">xdebug.remote_enable=On
</div>
</li>
<li class="li1">
<div class="de1">xdebug.remote_host=&quot;localhost&quot;
</div>
</li>
<li class="li1">
<div class="de1">xdebug.remote_port=9000
</div>
</li>
<li class="li1">
<div class="de1">xdebug.remote_handler=&quot;dbgp&quot;</div>
</li>
</ol>
</div>
<p><br/><br />
The following step is helpful for those who later want to integrate andorid SDK, because only Sun JDK is supported when running the android SDK app, is handy if you use it.<br />
<br/><br />
<strong>Step 5 : Setup sun -</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">sudo apt-get install sun-java6</div>
</li>
</ol>
</div>
<p><br/><br />
<strong>Step 6 : Enable Rewrite Module for PHP -</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">a2enmod rewrite</div>
</li>
</ol>
</div>
<p><br/><br />
<br/><br />
The above will do a smooth install of a functioning LAMP server on the system <img src='http://www.thephpx.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> , comments and queries are always welcomed.<br />
<br/><br />
thanks,</p>
<blockquote>
<h4>faisal ahmed</h4>
<p><em style="padding: 0; margin: 0;">web application developer</em><br />
<strong style="padding: 0; margin: 0;">web: </strong>http://www.faisalbd.com/<br />
<strong style="padding: 0; margin: 0;">email: </strong>thephpx(at)gmail(dot)com</p></blockquote>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.thephpx.com/2011/05/31/dummies-guide-to-lamp-setup-on-linux/"></g:plusone></div><div class="shr-publisher-224"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.thephpx.com%2F2011%2F05%2F31%2Fdummies-guide-to-lamp-setup-on-linux%2F&amp;title=Dummies%20guide%20to%20LAMP%20setup%20on%20linux%20%3A%29" id="wpa2a_8" onclick="pageTracker._trackPageview('/outgoing/www.addtoany.com/share_save_url=http_3A_2F_2Fwww.thephpx.com_2F2011_2F05_2F31_2Fdummies-guide-to-lamp-setup-on-linux_2F_amp_title=Dummies_20guide_20to_20LAMP_20setup_20on_20linux_20_3A_29?referer=');"><img src="http://www.thephpx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thephpx.com/2011/05/31/dummies-guide-to-lamp-setup-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Codeigniter: Helper for template library dynamic view partial loading</title>
		<link>http://www.thephpx.com/2011/02/23/codeigniter-helper-for-template-library-dynamic-view-partial-loading/</link>
		<comments>http://www.thephpx.com/2011/02/23/codeigniter-helper-for-template-library-dynamic-view-partial-loading/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 13:43:51 +0000</pubDate>
		<dc:creator>thephpx</dc:creator>
				<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[codeigniter library]]></category>
		<category><![CDATA[codeigniter template library]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[template library]]></category>
		<category><![CDATA[template parser helper]]></category>

		<guid isPermaLink="false">http://www.thephpx.com/?p=167</guid>
		<description><![CDATA[Hello everyone, I have recently been in quick-fire blogging mode. After playing with the superb template library developed by Phil Sturgeon. The following template helper is the outcome of tweaking that makes life easier while setting up view partials and calling them inside the layout dynamically. The helper also has an add-on use which gives &#8230; <a href="http://www.thephpx.com/2011/02/23/codeigniter-helper-for-template-library-dynamic-view-partial-loading/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hello everyone,</p>
<p>I have recently been in quick-fire blogging mode. After playing with the superb <a href="http://philsturgeon.co.uk/demos/codeigniter-template/user_guide/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/philsturgeon.co.uk/demos/codeigniter-template/user_guide/?referer=');">template library</a> developed by <a href="http://philsturgeon.co.uk/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/philsturgeon.co.uk/?referer=');">Phil Sturgeon</a>.</p>
<p>The following template helper is the outcome of tweaking that makes life easier while setting up view partials and calling them inside the layout dynamically. The helper also has an add-on use which gives user the option to use region specific partial loading.</p>
<h5>Controller:</h5>
<p> welcome.php<br/></p>
<pre>
$partial_list[]['region'] = 'left';
$partial_list[]['name'] = 'category';
$partial_list[]['view'] = 'partial_category';
$partial_list[]['region'] = 'right';
$partial_list[]['name'] = 'login_box';
$partial_list[]['view'] = 'partial_login';

/* following functionautomatically sets the partials
* based on the above array and also passes $partial_list
* variable to the view.
*/

/*
* make sure the pareser helper is loaded before
* calling this function
*/

setup_partials($partial_list);

$this-&gt;template-&gt;set_layout('home_layout');
$this-&gt;template-&gt;build('home_view');
</pre>
<p><br/></p>
<h5>Layout:</h5>
<p> home_view.php<br/></p>
<pre>
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;&lt;?php echo $template[&#039;title&#039;];?&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;div class=&quot;left&quot;&gt;
		/* Will show only partials with region set as left */
		&lt;?php show_partials(&#039;list&#039;, &#039;left&#039;, $partial_list, $template); ?&gt;
	&lt;/div&gt;
	&lt;div class=&quot;mid&quot;&gt;&lt;?php echo $template[&#039;body&#039;];?&gt;&lt;/div&gt;
	&lt;div class=&quot;right&quot;&gt;
		/* Will show only partials with region set as right */
		&lt;?php show_partials(&#039;list&#039;, &#039;right&#039;, $partial_list, $template);?&gt;
	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Detail about the usage can be found in the actual helper file, also feel free to comment here and I will try my best to help out.</p>
<h3>Download Helper:</h3>
<p><a href="http://www.thephpx.com/files/partial_helper.zip">DOWNLOAD PARSER HELPER</a></p>
<p>thanks,</p>
<blockquote>
<h4>faisal ahmed</h4>
<p><i style="padding:0;margin:0;">web application developer</i><br />
<b style="padding:0;margin:0;">web:&nbsp;</b>http://www.faisalbd.com/<br />
<b style="padding:0;margin:0;">email:&nbsp;</b>thephpx(at)gmail(dot)com
</p></blockquote>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.thephpx.com/2011/02/23/codeigniter-helper-for-template-library-dynamic-view-partial-loading/"></g:plusone></div><div class="shr-publisher-167"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.thephpx.com%2F2011%2F02%2F23%2Fcodeigniter-helper-for-template-library-dynamic-view-partial-loading%2F&amp;title=Codeigniter%3A%20Helper%20for%20template%20library%20dynamic%20view%20partial%20loading" id="wpa2a_10" onclick="pageTracker._trackPageview('/outgoing/www.addtoany.com/share_save_url=http_3A_2F_2Fwww.thephpx.com_2F2011_2F02_2F23_2Fcodeigniter-helper-for-template-library-dynamic-view-partial-loading_2F_amp_title=Codeigniter_3A_20Helper_20for_20template_20library_20dynamic_20view_20partial_20loading?referer=');"><img src="http://www.thephpx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thephpx.com/2011/02/23/codeigniter-helper-for-template-library-dynamic-view-partial-loading/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google translate helper for codeigniter</title>
		<link>http://www.thephpx.com/2011/02/15/google-translate-helper-for-codeigniter/</link>
		<comments>http://www.thephpx.com/2011/02/15/google-translate-helper-for-codeigniter/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 10:33:27 +0000</pubDate>
		<dc:creator>thephpx</dc:creator>
				<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[codeigniter google api]]></category>
		<category><![CDATA[codeigniter translate]]></category>
		<category><![CDATA[codeigniter translate helper]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google translate api]]></category>
		<category><![CDATA[translate]]></category>

		<guid isPermaLink="false">http://www.thephpx.com/?p=150</guid>
		<description><![CDATA[Hello everyone, I am back with a tiny contribution. Today I have created a nifty helper for codeigniter which uses the google translate api (v2). In order to use the function you will require a google translation api key which you can get for free the google api console (https://code.google.com/apis/console). After you have your key &#8230; <a href="http://www.thephpx.com/2011/02/15/google-translate-helper-for-codeigniter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Hello everyone,</p>
<p>I am back with a tiny contribution. Today I have created a nifty helper for codeigniter which uses the google translate api (v2).</p>
<p>In order to use the function you will require a google translation api key which you can get for free the google api console (<a href="https://code.google.com/apis/console" onclick="pageTracker._trackPageview('/outgoing/code.google.com/apis/console?referer=');">https://code.google.com/apis/console</a>).</p>
<p>After you have your key it has to be passed to the function along-with the text to be translated, the language from which it is being translated from and to the language it is translated to. The function returns the translated text which can be used to do further processing or can be also be echoed.</p>
<p><strong>CODE:</strong></p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">&lt;?php</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="coMULTI">/* Develeoped by: faisal ahmed &lt;thephpx(at)gmail.com&#8211;&gt; */</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">function</span> google_translate<span class="br0">&#40;</span><span class="re0">$api_key</span>, <span class="re0">$text</span>, <span class="re0">$from_lang</span>, <span class="re0">$to_lang</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$link</span> = <span class="st0">&#8216;https://www.googleapis.com/language/translate/v2?key=&#8217;</span>.<span class="re0">$api_key</span>.<span class="st0">&#8216;&amp;amp;source=&#8217;</span>.<span class="re0">$from_lang</span>.<span class="st0">&#8216;&amp;amp;target=&#8217;</span>.<span class="re0">$to_lang</span>.<span class="st0">&#8216;&amp;amp;q=&#8217;</span>.<span class="re0">$text</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$response</span> = <a href="http://www.php.net/file_get_contents" onclick="pageTracker._trackPageview('/outgoing/www.php.net/file_get_contents?referer=');"><span class="kw3">file_get_contents</span></a><span class="br0">&#40;</span><span class="re0">$link</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$array</span> = json_decode<span class="br0">&#40;</span><span class="re0">$response</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$array</span>-&gt;<span class="me1">data</span>-&gt;<span class="me1">translations</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>-&gt;<span class="me1">translatedText</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">?&gt;</span></div>
</li>
</ol>
</div>
<p>Hope to be back with another snippet soon, till then keep in touch <img src='http://www.thephpx.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>thanks,</p>
<blockquote><p>thephpx</p></blockquote>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.thephpx.com/2011/02/15/google-translate-helper-for-codeigniter/"></g:plusone></div><div class="shr-publisher-150"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.thephpx.com%2F2011%2F02%2F15%2Fgoogle-translate-helper-for-codeigniter%2F&amp;title=Google%20translate%20helper%20for%20codeigniter" id="wpa2a_12" onclick="pageTracker._trackPageview('/outgoing/www.addtoany.com/share_save_url=http_3A_2F_2Fwww.thephpx.com_2F2011_2F02_2F15_2Fgoogle-translate-helper-for-codeigniter_2F_amp_title=Google_20translate_20helper_20for_20codeigniter?referer=');"><img src="http://www.thephpx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thephpx.com/2011/02/15/google-translate-helper-for-codeigniter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setup xdebug on LAMPP</title>
		<link>http://www.thephpx.com/2011/02/02/setup-xdebug-on-lampp/</link>
		<comments>http://www.thephpx.com/2011/02/02/setup-xdebug-on-lampp/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 00:07:13 +0000</pubDate>
		<dc:creator>thephpx</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[lampp]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://www.thephpx.com/?p=145</guid>
		<description><![CDATA[I am assuming the reader already has LAMPP setup and running on their Linux. First step towards setting up xdebug is to download LAMPP development package add-on from the apache-friends website. After the compressed file is download navigate to the folder where the TAR file is located using linux terminal and the type in - &#8230; <a href="http://www.thephpx.com/2011/02/02/setup-xdebug-on-lampp/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>I am assuming the reader already has LAMPP setup and running on their Linux. First step towards setting up xdebug is to download LAMPP development package add-on from the apache-friends website. After the compressed file is download navigate to the folder where the TAR file is located using linux terminal and the type in -</p>
<p><strong>export PATH=/opt/lampp/bin:$PATH</strong></p>
<p><strong>sudo tar xvfz xampp-linux-devel-1.7.4.tar.gz -C /opt</strong></p>
<p>The above overwrites the existing LAMPP setup and includes the add-ons. After the files are overwritten, type in the following command.</p>
<p><strong>/opt/lampp/bin/pecl update-channels</strong></p>
<p>The above updates the PECL channels and prepares it for PECL based xdebug installation. After the above line is executed type-in:<strong> </strong></p>
<p><strong><br />
/opt/lampp/bin/pecl install Xdebug<br />
</strong></p>
<p>The above line sets up Xdebug in the existing LAMPP setup and at the 3rd or 4th last line of you will see the location of the xdebug.so files location given, note it down. The location may look something similar to this &#8211; &#8220;<em>/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so</em>&#8221;</p>
<p>Now we have to update the <strong>php.ini</strong> file to include the xdebug settings. You will find the file in &#8220;opt/lampp/etc/&#8221; open it by typing -</p>
<p><strong>sudo gedit opt/lampp/etc/php.ini</strong></p>
<p>Add the following lines at the very end of the file and save it.</p>
<p><strong><br />
zend_extension = /opt/lampp/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so<br />
xdebug.profiler_output_dir = &#8220;/tmp/xdebug/&#8221;<br />
xdebug.profiler_enable = On<br />
xdebug.remote_enable=On<br />
xdebug.remote_host=&#8221;localhost&#8221;<br />
xdebug.remote_port=9000<br />
xdebug.remote_handler=&#8221;dbgp&#8221;<br />
</strong></p>
<p>After the file is saved restart LAMPP by typing in -</p>
<p><strong>sudo opt/lampp/lampp restart</strong></p>
<p>To verify goto http://localhost/ after the server is restarted and you will see Xdebug table showing the xdebug settings.</p>
<p>let me know if you come across any issues during the setup process.</p>
<blockquote><p>~ thephpx</p></blockquote>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.thephpx.com/2011/02/02/setup-xdebug-on-lampp/"></g:plusone></div><div class="shr-publisher-145"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.thephpx.com%2F2011%2F02%2F02%2Fsetup-xdebug-on-lampp%2F&amp;title=Setup%20xdebug%20on%20LAMPP" id="wpa2a_14" onclick="pageTracker._trackPageview('/outgoing/www.addtoany.com/share_save_url=http_3A_2F_2Fwww.thephpx.com_2F2011_2F02_2F02_2Fsetup-xdebug-on-lampp_2F_amp_title=Setup_20xdebug_20on_20LAMPP?referer=');"><img src="http://www.thephpx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thephpx.com/2011/02/02/setup-xdebug-on-lampp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>jQuery: input array object validation</title>
		<link>http://www.thephpx.com/2010/07/26/jquery-input-array-object-validation/</link>
		<comments>http://www.thephpx.com/2010/07/26/jquery-input-array-object-validation/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 03:13:13 +0000</pubDate>
		<dc:creator>thephpx</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[input array element]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://www.thephpx.com/2010/07/26/jquery-input-array-object-validation/</guid>
		<description><![CDATA[Use of input array objects in ajax based forms where we want to give users open ended options to add unlimited number of items and then process them on form submission is very common now a days. As the input elements all have the same name and assuming no class or id attribute is available, &#8230; <a href="http://www.thephpx.com/2010/07/26/jquery-input-array-object-validation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Use of input array objects in ajax based forms where we want to give users open ended options to add unlimited number of items and then process them on form submission is very common now a days. As the input elements all have the same name and assuming no <strong>class</strong> or <strong>id</strong> attribute is available, validation can be a big pain in the back side.</p>
<p>The following code excerpt shows how to validate in such a scenario -</p>
<pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 600px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;</span>!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">    &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;<span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">html</span> <span style="color: #ff0000">xmlns</span>=<span style="color: #0000ff">&quot;http://www.w3.org/1999/xhtml&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">head</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">meta</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;generator&quot;</span> <span style="color: #ff0000">content</span>=</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&quot;HTML Tidy for Windows (vers 14 February 2006), see www.w3.org&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">meta</span> <span style="color: #ff0000">http</span>-<span style="color: #ff0000">equiv</span>=<span style="color: #0000ff">&quot;content-type&quot;</span> <span style="color: #ff0000">content</span>=</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&quot;text/html; charset=us-ascii&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">title</span><span style="color: #0000ff">&gt;</span>Hello World<span style="color: #0000ff">&lt;/</span><span style="color: #800000">title</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">script</span> <span style="color: #ff0000">type</span>=<span style="color: #0000ff">&quot;text/javascript&quot;</span> <span style="color: #ff0000">src</span>=</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">script</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">script</span> <span style="color: #ff0000">type</span>=<span style="color: #0000ff">&quot;text/javascript&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">//<span style="color: #0000ff">&lt;</span>![CDATA[</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">      function checkname(fieldname){</pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">      var field = document.getElementsByName(fieldname+&quot;[]&quot;);</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">      var status = 1;</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">      for(i=0;i<span style="color: #0000ff">&lt;</span><span style="color: #800000">field.length</span>;<span style="color: #ff0000">i</span>++){</pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">        <span style="color: #ff0000">if</span>(<span style="color: #ff0000">status</span> <span style="color: #0000ff">&gt;</span> 0){</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">          if(field[i].value == ''){</pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">            status = 0;</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">          }</pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">        }</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">      }</pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">      </pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">      if(status == 0){alert('The field can not be empty!');}</pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">    }</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">//]]&gt;</pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">script</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">head</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">body</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">form</span> <span style="color: #ff0000">method</span>=<span style="color: #0000ff">&quot;post&quot;</span> <span style="color: #ff0000">action</span>=<span style="color: #0000ff">&quot;&quot;</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;form&quot;</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">&quot;form&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"> <span style="color: #0000ff">&lt;</span><span style="color: #800000">input</span> <span style="color: #ff0000">type</span>=<span style="color: #0000ff">&quot;text&quot;</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;faisal[]&quot;</span> <span style="color: #ff0000">value</span>=<span style="color: #0000ff">&quot;&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"> <span style="color: #0000ff">&lt;</span><span style="color: #800000">input</span> <span style="color: #ff0000">type</span>=<span style="color: #0000ff">&quot;text&quot;</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;faisal[]&quot;</span> <span style="color: #ff0000">value</span>=<span style="color: #0000ff">&quot;&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"> <span style="color: #0000ff">&lt;</span><span style="color: #800000">input</span> <span style="color: #ff0000">type</span>=<span style="color: #0000ff">&quot;text&quot;</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;faisal[]&quot;</span> <span style="color: #ff0000">value</span>=<span style="color: #0000ff">&quot;&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"> <span style="color: #0000ff">&lt;</span><span style="color: #800000">input</span> <span style="color: #ff0000">type</span>=<span style="color: #0000ff">&quot;text&quot;</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;faisal[]&quot;</span> <span style="color: #ff0000">value</span>=<span style="color: #0000ff">&quot;&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"> <span style="color: #0000ff">&lt;</span><span style="color: #800000">select</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">&quot;ahmed[]&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">option</span> <span style="color: #ff0000">value</span>=<span style="color: #0000ff">&quot;&quot;</span><span style="color: #0000ff">&gt;</span>None<span style="color: #0000ff">&lt;/</span><span style="color: #800000">option</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px">  <span style="color: #0000ff">&lt;</span><span style="color: #800000">option</span> <span style="color: #ff0000">value</span>=<span style="color: #0000ff">&quot;1&quot;</span><span style="color: #0000ff">&gt;</span>1<span style="color: #0000ff">&lt;/</span><span style="color: #800000">option</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">select</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"> <span style="color: #0000ff">&lt;</span><span style="color: #800000">input</span> <span style="color: #ff0000">type</span>=<span style="color: #0000ff">&quot;submit&quot;</span> <span style="color: #ff0000">value</span>=<span style="color: #0000ff">&quot;test&quot;</span> <span style="color: #ff0000">onclick</span>=<span style="color: #0000ff">&quot;checkname('ahmed');&quot;</span> <span style="color: #0000ff">/&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">form</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">body</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">html</span><span style="color: #0000ff">&gt;</span></pre>
<pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; font-size: 10px"></pre>
</pre>
<p>Comments and queries are welcomed <img src='http://www.thephpx.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<blockquote>
<p><strong><em>thephpx</em></strong></p>
</blockquote>
<p>[ad code=1 align=center]</p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.thephpx.com/2010/07/26/jquery-input-array-object-validation/"></g:plusone></div><div class="shr-publisher-108"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.thephpx.com%2F2010%2F07%2F26%2Fjquery-input-array-object-validation%2F&amp;title=jQuery%3A%20input%20array%20object%20validation" id="wpa2a_16" onclick="pageTracker._trackPageview('/outgoing/www.addtoany.com/share_save_url=http_3A_2F_2Fwww.thephpx.com_2F2010_2F07_2F26_2Fjquery-input-array-object-validation_2F_amp_title=jQuery_3A_20input_20array_20object_20validation?referer=');"><img src="http://www.thephpx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thephpx.com/2010/07/26/jquery-input-array-object-validation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Staged Code-Igniter Web Application Development</title>
		<link>http://www.thephpx.com/2009/09/08/staged-code-igniter-web-application-development/</link>
		<comments>http://www.thephpx.com/2009/09/08/staged-code-igniter-web-application-development/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 11:47:31 +0000</pubDate>
		<dc:creator>thephpx</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[Code-Igniter]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[Staged]]></category>
		<category><![CDATA[Web Application]]></category>

		<guid isPermaLink="false">http://www.thephpx.com/?p=39</guid>
		<description><![CDATA[Today I am going to share a little customization that I do while i develop codeigniter based web application. Now a days in most web application development firms a three-tire development process is followed. This is done to ensure smooth roll-out of the application from development to live. The three-tire development methodology involves three stages &#8230; <a href="http://www.thephpx.com/2009/09/08/staged-code-igniter-web-application-development/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Today I am going to share a little customization that I do while i develop codeigniter based web application. Now a days in most web application development firms a three-tire development process is followed. This is done to ensure smooth roll-out of the application from development to live.</p>
<p>The three-tire development methodology involves three stages of development servers. <strong>First</strong> comes the local server which is setup in your laptop or workstation. <strong>Then</strong> comes the internal test server, which is a central server that holds all the SVN repository as well as hosts the site and make it accessable to all from within the network. This server is also sometimes called staggin server. <strong>Last</strong> but not the least comes the live server, in most cases its your clients server where you upload your codes after they have passed the QA checks of both local-server and staging-server.</p>
<p>One related aspect of staged development is that in most cases they involve using SVN server for version control. Using SVN, though you can automatically update your server files from SVN server through &#8220;<strong>svn update</strong>&#8221; command but if the config file is not configured to take the different servers into consideration you will have to update the config file every time you do update on a server or set separate config file on each server and add the file to ignor list of the SVN repository.</p>
<p>Our way of doing it is to use a single config file and make it lookup the host address to determine which configuration settings to use.  If you are familiar with codeigniter then you already know you will find your config file at <strong>system/application/config/config.php</strong>.</p>
<p>Find the following line in the <strong>config.php</strong> file:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"> &nbsp;<span class="re0">$config</span><span class="br0">&#91;</span><span class="st0">&#8216;base_url&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;http://localhost/codeigniter/&quot;</span>;</div>
</li>
</ol>
</div>
<p>Replace the line with the following lines -</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$_SERVER</span><span class="br0">&#91;</span><span class="st0">&#8216;HTTP_HOST&#8217;</span><span class="br0">&#93;</span> == <span class="st0">&quot;localhost&quot;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$config</span><span class="br0">&#91;</span><span class="st0">&#8216;base_url&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;http://localhost/codeigniter/&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span><span class="kw1">else</span> <span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$_SERVER</span><span class="br0">&#91;</span><span class="st0">&#8216;HTTP_HOST&#8217;</span><span class="br0">&#93;</span> == <span class="st0">&quot;192.168.1.1&quot;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$config</span><span class="br0">&#91;</span><span class="st0">&#8216;base_url&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;http://192.168.1.1/codeigniter/&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$config</span><span class="br0">&#91;</span><span class="st0">&#8216;base_url&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;http://www.live-server.com/codeigniter/&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Now all your URL&#8217;s will be adjusted based on the server the site is accessed from. Next we will modify the database.php file which is also located in <strong>system/application/config/database.php</strong></p>
<p>Find the following line(s) in the <strong>database.php </strong>file:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"> &nbsp;<span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;hostname&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;localhost&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;username&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;root&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;password&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;database&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;restobolivia&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbdriver&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;mysql&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbprefix&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;pconnect&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">TRUE</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;db_debug&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">TRUE</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;cache_on&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">FALSE</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;cachedir&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;char_set&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;utf8&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbcollat&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;utf8_general_ci&quot;</span>;</div>
</li>
</ol>
</div>
<p>Replace the above line with the following once:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$_SERVER</span><span class="br0">&#91;</span><span class="st0">&#8216;HTTP_HOST&#8217;</span><span class="br0">&#93;</span> == <span class="st0">&quot;localhost&quot;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;hostname&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;localhost&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;username&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;root&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;password&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;password&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;database&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;database_name&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbdriver&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;mysql&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbprefix&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;pconnect&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">TRUE</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;db_debug&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">TRUE</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;cache_on&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">FALSE</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;cachedir&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;char_set&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;utf8&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbcollat&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;utf8_general_ci&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span><span class="kw1">else</span> <span class="kw1">if</span><span class="br0">&#40;</span><span class="re0">$_SERVER</span><span class="br0">&#91;</span><span class="st0">&#8216;HTTP_HOST&#8217;</span><span class="br0">&#93;</span> == <span class="st0">&quot;192.168.1.1&quot;</span><span class="br0">&#41;</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;hostname&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;localhost&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;username&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;root&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;password&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;password&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;database&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;database_name&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbdriver&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;mysql&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbprefix&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;pconnect&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">TRUE</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;db_debug&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">FALSE</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;cache_on&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">FALSE</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;cachedir&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;char_set&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;utf8&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbcollat&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;utf8_general_ci&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;hostname&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;localhost&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;username&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;root&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;password&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;password&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;database&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;database_name&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbdriver&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;mysql&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbprefix&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;pconnect&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">TRUE</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;db_debug&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">FALSE</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;cache_on&#8217;</span><span class="br0">&#93;</span> = <span class="kw2">FALSE</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;cachedir&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;char_set&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;utf8&quot;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="re0">$db</span><span class="br0">&#91;</span><span class="st0">&#8216;default&#8217;</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="st0">&#8216;dbcollat&#8217;</span><span class="br0">&#93;</span> = <span class="st0">&quot;utf8_general_ci&quot;</span>;</div>
</li>
<li class="li2">
<div class="de2">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>The above code will give the server specific database configuration to the application based on the server it is accessed from.</p>
<p>Now save these two files and test your application you should be able to use the same config.php file in different servers if they are properly configured on <strong>config.php</strong> and <strong>database.php</strong></p>
<p>For any further query feel free to leave a comment I will try my best to help you out.</p>
<p>take care,</p>
<blockquote><p><em><strong>thephpx</strong></em></p></blockquote>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.thephpx.com/2009/09/08/staged-code-igniter-web-application-development/"></g:plusone></div><div class="shr-publisher-39"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.thephpx.com%2F2009%2F09%2F08%2Fstaged-code-igniter-web-application-development%2F&amp;title=Staged%20Code-Igniter%20Web%20Application%20Development" id="wpa2a_18" onclick="pageTracker._trackPageview('/outgoing/www.addtoany.com/share_save_url=http_3A_2F_2Fwww.thephpx.com_2F2009_2F09_2F08_2Fstaged-code-igniter-web-application-development_2F_amp_title=Staged_20Code-Igniter_20Web_20Application_20Development?referer=');"><img src="http://www.thephpx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thephpx.com/2009/09/08/staged-code-igniter-web-application-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sprintometer as a SCRUM management tool</title>
		<link>http://www.thephpx.com/2009/08/06/sprintometer-as-a-scrum-management-tool/</link>
		<comments>http://www.thephpx.com/2009/08/06/sprintometer-as-a-scrum-management-tool/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 01:40:31 +0000</pubDate>
		<dc:creator>thephpx</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[efficiency]]></category>
		<category><![CDATA[backlog]]></category>
		<category><![CDATA[product backlog]]></category>
		<category><![CDATA[project management]]></category>
		<category><![CDATA[retrospective]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[sprint]]></category>
		<category><![CDATA[sprintometer]]></category>

		<guid isPermaLink="false">http://www.thephpx.com/?p=32</guid>
		<description><![CDATA[On my endeavor to find the perfect SCRUM project management tool I came across a freeware option named “Sprintometer”. It is not entirely free as it sounds but the options it gives to a manager for free is quite outstanding. The application can be downloaded from their website { sprintometer.com } for free. Sprintometer support &#8230; <a href="http://www.thephpx.com/2009/08/06/sprintometer-as-a-scrum-management-tool/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>On my endeavor to find the perfect SCRUM project management tool I came across a freeware option named “Sprintometer”. It is not entirely free as it sounds but the options it gives to a manager for free is quite outstanding. The application can be downloaded from their website { sprintometer.com } for free.</p>
<p>Sprintometer support project mangement in both XP and SCRUM methodology. Once you create a project it first of all asks the way the project is going to be managed. Then onward a product backlog can be prepared with stories and tasks assigned to it. Each task then can be assigned to a developer or a coder or a tester.</p>
<p>On the basis of the project specification the application itself generated some very useful charts that give the manager a good understanding about where the project is actually heading. Some of these charts are -</p>
<ul>
<li><strong>Track Chart: </strong>Tracks the amount of work done and the amount of work remaining through a line graph.</li>
<li><strong>Scope Chart:</strong> Shows in hour(s) the amount of work left against a story.</li>
<li><strong>Resource and Budget Chart:</strong> A matrix showing the resource and cost both story-wise and day-wise</li>
<li><strong>Story Readiness Chart: </strong>Shows how much closer to completion a story is through a table.</li>
<li><strong>Summary Report:</strong> Gives a overall report about the story in terms of work done, remaining and days left.</li>
<li><strong>Workload Report:</strong> This shows the amount of workload taken on by each project team members.</li>
</ul>
<p>From a project manger perspective it gives me a complete hold on where my project is heading. But the only thing it lacks is integration of team members to give their inputs directly to the system. Hope they are working on it and will be made available to the freeware version in near future :p</p>
<p>take care,</p>
<p><em><strong>- thephpx</strong></em></p>
<div name="googleone_share_1" style="position:relative;z-index:5;float: right; margin-left: 10px;"><g:plusone size="tall" count="1" href="http://www.thephpx.com/2009/08/06/sprintometer-as-a-scrum-management-tool/"></g:plusone></div><div class="shr-publisher-32"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.thephpx.com%2F2009%2F08%2F06%2Fsprintometer-as-a-scrum-management-tool%2F&amp;title=Sprintometer%20as%20a%20SCRUM%20management%20tool" id="wpa2a_20" onclick="pageTracker._trackPageview('/outgoing/www.addtoany.com/share_save_url=http_3A_2F_2Fwww.thephpx.com_2F2009_2F08_2F06_2Fsprintometer-as-a-scrum-management-tool_2F_amp_title=Sprintometer_20as_20a_20SCRUM_20management_20tool?referer=');"><img src="http://www.thephpx.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.thephpx.com/2009/08/06/sprintometer-as-a-scrum-management-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

