<?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>VV&#039;s Corner &#187; development</title>
	<atom:link href="http://vinoaj.com/blog/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://vinoaj.com/blog</link>
	<description>my collection of random thoughts, how-to&#039;s and code snippets</description>
	<lastBuildDate>Sat, 04 Dec 2010 15:05:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Triggering the Source Code view of the current page using JavaScript</title>
		<link>http://vinoaj.com/blog/2008/03/triggering-the-source-code-view-of-the-current-page-using-javascript/</link>
		<comments>http://vinoaj.com/blog/2008/03/triggering-the-source-code-view-of-the-current-page-using-javascript/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 22:40:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://vinoaj.com/blog/uncategorized/triggering-the-source-code-view-of-the-current-page-using-javascript/</guid>
		<description><![CDATA[I was recently writing a demo to showcase the new Google Language API, and in my demo I did the usual thing of instructing users to View &#62; Page Source in order to view the source code and comments. I know this is less than ideal, because it forces users to have to process the [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently writing a <a href="http://vinoaj.com/google/language" title="Google Language API demo" target="_blank">demo to showcase the new Google Language API</a>, and in my demo I did the usual thing of instructing users to View &gt; Page Source in order to view the source code and comments.  I know this is less than ideal, because it forces users to have to process the instructions, and then execute them.  Somewhere in there you lose them and they never execute the desired action.</p>
<p>It got me thinking: is there a way to have the source code in front of them in one click?  A few Google searches later, and the answer was yes!</p>
<p>Using JavaScript you can open a new window to display the source code view of the current window:</p>
<div class="igBar"><span id="ljavascript-2"><a href="#" onclick="javascript:showPlainTxt('javascript-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-2">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">window.<span style="color: #000066;">open</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'view-source:'</span> + window.<span style="color: #006600;">location</span>.<span style="color: #006600;">href</span>, <span style="color: #3366CC;">'mysource'</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Voila!  How easy was that?  Now it's your turn.</p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2008/03/triggering-the-source-code-view-of-the-current-page-using-javascript/&via=vinoaj&text=Triggering the Source Code view of the current page using JavaScript&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2008/03/triggering-the-source-code-view-of-the-current-page-using-javascript/&via=vinoaj&text=Triggering the Source Code view of the current page using JavaScript&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fvinoaj.com%2Fblog%2F2008%2F03%2Ftriggering-the-source-code-view-of-the-current-page-using-javascript%2F&amp;title=Triggering%20the%20Source%20Code%20view%20of%20the%20current%20page%20using%20JavaScript" id="wpa2a_2"><img src="http://vinoaj.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://vinoaj.com/blog/2008/03/triggering-the-source-code-view-of-the-current-page-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recommended Mozilla Firefox add-ons (aka extensions, aka plugins)</title>
		<link>http://vinoaj.com/blog/2007/07/recommended-mozilla-firefox-add-ons-aka-extensions-aka-plugins/</link>
		<comments>http://vinoaj.com/blog/2007/07/recommended-mozilla-firefox-add-ons-aka-extensions-aka-plugins/#comments</comments>
		<pubDate>Mon, 30 Jul 2007 02:15:19 +0000</pubDate>
		<dc:creator>vinoaj</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://vinoaj.com/blog/howtos/javascript/recommended-mozilla-firefox-add-ons-aka-extensions-aka-plugins/</guid>
		<description><![CDATA[This is a list of my "must-have" Mozilla Firefox add-ons. If you can recommend anything similar or better, be sure to drop me a comment. Page Analysis &#38; SEO Minimise Nuisance Bookmark Management Download Management Productivity Web Development &#38; Design Security Functional Extensions Tab Management Add-Ons Management Page Analysis &#38; SEO About This Site Bookmarks [...]]]></description>
			<content:encoded><![CDATA[<p>This is a list of my "must-have" <a href="https://addons.mozilla.org/en-US/firefox/" target="_blank">Mozilla Firefox add-ons</a>.  If you can recommend anything similar or better, be sure to drop me a comment.</p>
<hr />
<a href="#pageanalyis">Page Analysis &amp; SEO</a><br />
<a href="#nuisance">Minimise Nuisance</a><br />
<a href="#bookmarks">Bookmark Management</a><br />
<a href="#downloads">Download Management</a><br />
<a href="#productivity">Productivity</a><br />
<a href="#webdev">Web Development &amp; Design</a><br />
<a href="#security">Security</a><br />
<a href="#functional">Functional Extensions</a><br />
<a href="#tabs">Tab Management</a><br />
<a href="#addons">Add-Ons Management</a></p>
<hr /><a title="pageanalysis" name="pageanalysis"></a></p>
<h2>Page Analysis &amp; SEO</h2>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/3673" target="_blank"><strong>About This Site Bookmarks</strong></a> - right-click on a page, select "About This Site Bookmarks" and you will see a list of handy links pointing off to informational sites such as Alexa, Compete, Netcraft, del.icio.us, etc.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/321" target="_blank"><strong>SearchStatus</strong></a></p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/590" target="_blank"><strong>ShowIP</strong></a></p>
<hr />
<a title="nuisance" name="nuisance"></a></p>
<h2>Minimising Nuisance</h2>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/1865" target="_blank"><strong>Adblock Plus</strong></a></p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/1136" target="_blank"><strong>Adblock Filterset.G Updater</strong></a></p>
<hr />
<a title="bookmarks" name="bookmarks"></a></p>
<h2>Bookmark Management</h2>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/11" target="_blank"><strong>Add Bookmark Here</strong></a></p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/1553" target="_blank"><strong>Bookmark Duplicate Detector</strong></a></p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/3615" target="_blank"><strong>del.icio.us</strong></a></p>
<hr />
<a title="downloads" name="downloads"></a></p>
<h2>Download Management</h2>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/26" target="_blank"><strong>Download Statusbar</strong></a> - manage your downloads via the Firefox status bar.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/201" target="_blank"><strong>DownThemAll</strong></a> - conveniently download all link targets on a page.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/220" target="_blank"><strong>FlashGot</strong></a> - allows for single and multiple downloads utilising an external download manager of your choice (I prefer FlashGet).</p>
<hr />
<a title="productivity" name="productivity"></a></p>
<h2>Productivity</h2>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/383" target="_blank"><strong>Auto Copy</strong></a> - highlight a piece of text and the selection is automatically copied to your clipboard.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/1117" target="_blank"><strong>FoxClocks</strong></a> - displays local times around the world in the statusbar or toolbar.  Great for if you are dealing with friends and colleagues across multiple timezones.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/219" target="_blank"><strong>FoxyTunes</strong></a> - operate your currently running media player from your Firefox statusbar.</p>
<p><a href="http://www.google.com/notebook" target="_blank"><strong>Google Notebook</strong></a> - conveniently clip text and links to your Google Notebook.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/190" target="_blank"><strong>Linkification</strong></a> - Converts text links (including e-mail addresses) into clickable links.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/636" target="_blank"><strong>PDF Download</strong></a></p>
<hr />
<a title="webdev" name="webdev"></a></p>
<h2>Web Development &amp; Design</h2>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/271" target="_blank"><strong>ColorZilla</strong></a> - eye-dropper tool that allows you to pick the HEX &amp; RGB values of colours of elements on the page.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/1843" target="_blank"><strong>Firebug</strong></a> - the quintessential Javascript debugger.  It also allows for excellent DOM and CSS debugging and manipulation.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/images/addon_icon/249" target="_blank"><strong>HTML Validator</strong></a></p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/35" target="_blank"><strong>IE View</strong></a> - open the current page in an IE window.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/3829" target="_blank"><strong>Live HTTP Headers</strong></a> - view HTTP request and response headers in realtime.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/59" target="_blank"><strong>User Agent Switcher</strong></a> - allows you to spoof the User-Agent string and have Firefox masquerade as the Googlebot, etc, to see how your site reacts to different user-agents.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/655" target="_blank"><strong>View Source Chart</strong></a> - renders page source HTML in an easy-to-read manner.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank"><strong>Web Developer</strong></a> - a must for the serious web developer.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/5369" target="_blank"><strong>YSlow</strong></a> - an addon to the Firebug debugger.  It allows you to profile a page and identify bottlenecks.  Provided by Yahoo.  Also see Yahoo's articles on improving page load performance.</p>
<hr />
<a title="security" name="security"></a></p>
<h2>Security</h2>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/2497" target="_blank"><strong>CookieSafe</strong></a></p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/4510" target="_blank"><strong>Edit Cookies</strong></a></p>
<p><a href="http://www.siteadvisor.com/download/ff.html" target="_blank"><strong>McAfee SiteAdvisor</strong></a> - lets you know if the currently viewed site is considered "safe" or not.</p>
<p><a title="functional" name="functional"></a></p>
<h2>Functionality Extensions</h2>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/743" target="_blank"><strong>CustomizeGoogle</strong></a> - customize your Google search and application experiences.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/3336" target="_blank"><strong>ErrorZilla</strong></a> - extends the standard page not found error screen with convenient links such as access to the page's Google cached copy.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/4429" target="_blank"><strong>Secure Login</strong></a></p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/315" target="_blank"><strong>View Cookies</strong></a></p>
<hr />
<a title="tabs" name="tabs"></a></p>
<h2>Tab Management</h2>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/3780" target="_blank"><strong>Faviconize Tab</strong></a> - minimize a tab's width to the width of the favicon.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/1122" target="_blank"><strong>Tab Mix Plus</strong></a></p>
<hr />
<a title="addons" name="addons"></a></p>
<h2>Add-Ons Management</h2>
<p><a href="http://www.google.com/tools/firefox/browsersync/" target="_blank"><strong>Google Browser Sync</strong></a></p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/2109" target="_blank"><strong>FEBE</strong></a> - a convenient extensions &amp; settings backup tool.  Allows you to also run scheduled backups.  The backups can be used to transport your extensions and their settings to another machine or Firefox profile.</p>
<p><a href="https://addons.mozilla.org/en-US/firefox/addon/421" target="_blank"><strong>MR Tech Local Install</strong></a> - install power tools for add-ons</p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2007/07/recommended-mozilla-firefox-add-ons-aka-extensions-aka-plugins/&via=vinoaj&text=Recommended Mozilla Firefox add-ons (aka extensions, aka plugins)&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2007/07/recommended-mozilla-firefox-add-ons-aka-extensions-aka-plugins/&via=vinoaj&text=Recommended Mozilla Firefox add-ons (aka extensions, aka plugins)&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fvinoaj.com%2Fblog%2F2007%2F07%2Frecommended-mozilla-firefox-add-ons-aka-extensions-aka-plugins%2F&amp;title=Recommended%20Mozilla%20Firefox%20add-ons%20%28aka%20extensions%2C%20aka%20plugins%29" id="wpa2a_4"><img src="http://vinoaj.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://vinoaj.com/blog/2007/07/recommended-mozilla-firefox-add-ons-aka-extensions-aka-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selecting a random row using MySQL</title>
		<link>http://vinoaj.com/blog/2007/07/selecting-a-random-row-using-mysql/</link>
		<comments>http://vinoaj.com/blog/2007/07/selecting-a-random-row-using-mysql/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 08:54:58 +0000</pubDate>
		<dc:creator>vinoaj</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://vinoaj.com/blog/howtos/selecting-a-random-row-using-mysql/</guid>
		<description><![CDATA[There are many examples where you would need to retrieve a random record or more from a set of tables. For example your page template may be cycling through QOTDs, testimonials, offers, specials, and so forth. To retrieve a random row in MySQL, use the ORDER BY RAND() statement to randomly order the rows of [...]]]></description>
			<content:encoded><![CDATA[<p>There are many examples where you would need to retrieve a random record or more from a set of tables.  For example your page template may be cycling through QOTDs, testimonials, offers, specials, and so forth.</p>
<p>To retrieve a random row in MySQL, use the <code>ORDER BY RAND()</code> statement to randomly order the rows of a table.  Then use <code>LIMIT x</code> to retrieve the first <code>x</code> rows from the randomised representation of the table.</p>
<p>For example:</p>
<div class="igBar"><span id="lsql-5"><a href="#" onclick="javascript:showPlainTxt('sql-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-5">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/*&nbsp; Retrieve 5 random special offers to display in your e-commerce store's sidebar */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">SELECT</span>&nbsp; offer_id</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">FROM</span>&nbsp; &nbsp; special_offers</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> RAND<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;color:#800000;">5</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Of course, we can make our query as complex as needed, and then randomly order the resultset.</p>
<div class="igBar"><span id="lsql-6"><a href="#" onclick="javascript:showPlainTxt('sql-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-6">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">SELECT</span>&nbsp; so.offer_id, i.title</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">FROM</span>&nbsp; &nbsp; special_offers so</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> items i <span style="color: #993333; font-weight: bold;">ON</span> <span style="color:#006600; font-weight:bold;">&#40;</span>so.item_id = i.item_id<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> item_categories ic <span style="color: #993333; font-weight: bold;">ON</span> <span style="color:#006600; font-weight:bold;">&#40;</span>i.item_id = ic.item_id<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">WHERE</span>&nbsp; &nbsp;ic.category_id = <span style="color: #cc66cc;color:#800000;">2344</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">ORDER</span> <span style="color: #993333; font-weight: bold;">BY</span> RAND<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;color:#800000;">5</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2007/07/selecting-a-random-row-using-mysql/&via=vinoaj&text=Selecting a random row using MySQL&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2007/07/selecting-a-random-row-using-mysql/&via=vinoaj&text=Selecting a random row using MySQL&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fvinoaj.com%2Fblog%2F2007%2F07%2Fselecting-a-random-row-using-mysql%2F&amp;title=Selecting%20a%20random%20row%20using%20MySQL" id="wpa2a_6"><img src="http://vinoaj.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://vinoaj.com/blog/2007/07/selecting-a-random-row-using-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP code snippet &#8211; Reorder items in a table</title>
		<link>http://vinoaj.com/blog/2007/07/php-code-snippet-reorder-items-in-a-table/</link>
		<comments>http://vinoaj.com/blog/2007/07/php-code-snippet-reorder-items-in-a-table/#comments</comments>
		<pubDate>Mon, 09 Jul 2007 10:00:15 +0000</pubDate>
		<dc:creator>vinoaj</dc:creator>
				<category><![CDATA[db]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://vinoaj.com/blog/howtos/php-code-snippet-reorder-items-in-a-table/</guid>
		<description><![CDATA[This snippet of code reorders items in a table based on the number of steps you want to move an item from its current position. It moves the item of interest to its new position and shifts all other items to their new shifted positions. PLAIN TEXT PHP: function moveItem &#40;$n_steps&#41; &#123; if &#40;$n_steps == [...]]]></description>
			<content:encoded><![CDATA[<p>This snippet of code reorders items in a table based on the number of steps you want to move an item from its current position.  It moves the item of interest to its new position and shifts all other items to their new shifted positions.</p>
<div class="igBar"><span id="lphp-8"><a href="#" onclick="javascript:showPlainTxt('php-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-8">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> moveItem <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$n_steps</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$n_steps</span> == <span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$cur_pos</span> = <span style="color:#0000FF;">$this</span>-&amp;gt;pos;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$new_pos</span> = <span style="color:#0000FF;">$cur_pos</span> + <span style="color:#0000FF;">$n_steps</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$n_steps</span> &amp;lt;<span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$min_pos</span> = <span style="color:#0000FF;">$cur_pos</span> + <span style="color:#0000FF;">$n_steps</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$max_pos</span> = <span style="color:#0000FF;">$cur_pos</span> - <span style="color:#CC66CC;color:#800000;">1</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$shift_sign</span> = <span style="color:#FF0000;">'+'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">elseif</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$n_steps</span>&amp;gt; <span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$min_pos</span> = <span style="color:#0000FF;">$cur_pos</span> + <span style="color:#CC66CC;color:#800000;">1</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$max_pos</span> = <span style="color:#0000FF;">$cur_pos</span> + <span style="color:#0000FF;">$n_steps</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$shift_sign</span> = <span style="color:#FF0000;">'-'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> <span style="color:#616100;">else</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">return</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$id</span> = <span style="color:#0000FF;">$this</span>-&amp;gt;id;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//Reorder existing items that will be existed by moving this item</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$sql</span> = <span style="color:#FF0000;">"UPDATE&nbsp; positions</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">SET&nbsp;&nbsp;order_num = order_num $shift_sign 1</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">WHERE&nbsp; &nbsp;id = $id</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">AND&nbsp;position&amp;gt;= $min_pos</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">AND&nbsp;position &amp;lt;= $max_pos"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&amp;gt;db-&amp;gt;query<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sql</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//Now set new position for this item</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$sql</span> = <span style="color:#FF0000;">"UPDATE postions SET position = $new_pos WHERE id = $id"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$this</span>-&amp;gt;db-&amp;gt;query<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$sql</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2007/07/php-code-snippet-reorder-items-in-a-table/&via=vinoaj&text=PHP code snippet - Reorder items in a table&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2007/07/php-code-snippet-reorder-items-in-a-table/&via=vinoaj&text=PHP code snippet - Reorder items in a table&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fvinoaj.com%2Fblog%2F2007%2F07%2Fphp-code-snippet-reorder-items-in-a-table%2F&amp;title=PHP%20code%20snippet%20%E2%80%93%20Reorder%20items%20in%20a%20table" id="wpa2a_8"><img src="http://vinoaj.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://vinoaj.com/blog/2007/07/php-code-snippet-reorder-items-in-a-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>svn &#8211; Ignore/exclude files from version control</title>
		<link>http://vinoaj.com/blog/2007/07/svn-ignoreexclude-files-from-version-control/</link>
		<comments>http://vinoaj.com/blog/2007/07/svn-ignoreexclude-files-from-version-control/#comments</comments>
		<pubDate>Thu, 05 Jul 2007 10:34:13 +0000</pubDate>
		<dc:creator>vinoaj</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://vinoaj.com/blog/howtos/svn-ignoreexclude-files-from-version-control/</guid>
		<description><![CDATA[In most projects there are going to be files that you wish to ignore in version control. These could be temporary files, log or debug files, and so forth. These are files that you can safely ignore when executing commands such as svn commit and svn st. The following shows how to configure your svn [...]]]></description>
			<content:encoded><![CDATA[<p>In most projects there are going to be files that you wish to ignore in version control.  These could be temporary files, log or debug files, and so forth.  These are files that you can safely ignore when executing commands such as <code>svn commit</code> and <code>svn st</code>.  The following shows how to configure your svn client to ignore particular files in your working copy.</p>
<pre>svn propedit svn:ignore /path/with/files/to/ignore/</pre>
<p>svn opens up your text editor of choice</p>
<p>Use file patterns to indicate which files to ignore from version control. Each pattern goes on a new line. e.g.</p>
<pre>
log_12*.log
*.tmp</pre>
<p>Save your file and exit</p>
<p>Now whenever you perform commands like <code>svn st</code> or <code>svn commit</code>, svn will ignore files with the patterns you specified in the directories that you specified.</p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2007/07/svn-ignoreexclude-files-from-version-control/&via=vinoaj&text=svn - Ignore/exclude files from version control&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2007/07/svn-ignoreexclude-files-from-version-control/&via=vinoaj&text=svn - Ignore/exclude files from version control&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fvinoaj.com%2Fblog%2F2007%2F07%2Fsvn-ignoreexclude-files-from-version-control%2F&amp;title=svn%20%E2%80%93%20Ignore%2Fexclude%20files%20from%20version%20control" id="wpa2a_10"><img src="http://vinoaj.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://vinoaj.com/blog/2007/07/svn-ignoreexclude-files-from-version-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project configuration</title>
		<link>http://vinoaj.com/blog/2007/04/project-configuration/</link>
		<comments>http://vinoaj.com/blog/2007/04/project-configuration/#comments</comments>
		<pubDate>Fri, 06 Apr 2007 09:02:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://vinoaj.com/blog/development/project-configuration/</guid>
		<description><![CDATA[I prefer initialising all my scripts through a bootstrap script that in turn reads a configuration file. I tend to re-use a common set of configuration parameters. PLAIN TEXT PHP: define&#40;'DEBUG_PROJECT', false&#41;; define&#40;'DISPLAY_ERRORS', true&#41;;&#60;/code&#62; &#160; /** * E-mail send/receive related * / define('EMAIL_CONTACT_ADDRESS', 'webmaster@mysite.com'); define('EMAIL_SERVER_FROM_IDENTITY', 'MySite Webmaster'); define('EMAIL_WEB_ADMINISTRATOR', 'admin@mysite.com'); /** * Time-related */ &#160; //EOT [...]]]></description>
			<content:encoded><![CDATA[<p>I prefer initialising all my scripts through a bootstrap script that in turn reads a configuration file.  I tend to re-use a common set of configuration parameters.</p>
<div class="igBar"><span id="lphp-10"><a href="#" onclick="javascript:showPlainTxt('php-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-10">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DEBUG_PROJECT'</span>, <span style="color:#000000; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'DISPLAY_ERRORS'</span>, <span style="color:#000000; font-weight:bold;">true</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&lt;/code&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* E-mail send/receive related</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* /</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">define('EMAIL_CONTACT_ADDRESS', 'webmaster@mysite.com');</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">define('EMAIL_SERVER_FROM_IDENTITY', 'MySite Webmaster');</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">define('EMAIL_WEB_ADMINISTRATOR', 'admin@mysite.com');</span></div>
</li>
<li style="font-weight: bold;color:#26536A;"></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Time-related</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//EOT - &quot;end of time&quot;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//Sometimes (but rarely) I need to construct queries that search until the &quot;end of time&quot;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'EOT_TIMESTAMP'</span>, <span style="color:#CC66CC;color:#800000;">2145790800</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">//2038-01-01 00:00</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'EOT_YEAR'</span>, <span style="color:#CC66CC;color:#800000;">2037</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'EOT_MONTH'</span>, <span style="color:#CC66CC;color:#800000;">12</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'EOT_DATE'</span>,<span style="color:#CC66CC;color:#800000;">31</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'TIMEZONE'</span>, <span style="color:#FF0000;">'Australia/Sydney'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Paths</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'PROJECT_HTTP_HOST'</span>, <span style="color:#FF0000;">'http://www.mysite.com/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'PATH_PROJECT'</span>,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#FF0000;">'/home/bauer/projectX/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'PATH_PUBLIC_HTML'</span>,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PATH_PROJECT . <span style="color:#FF0000;">'public_html/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'PATH_CLASSES'</span>,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PATH_PROJECT . <span style="color:#FF0000;">'classes/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'PATH_PROJECT_INCLUDES'</span>,&nbsp; &nbsp; PATH_PROJECT . <span style="color:#FF0000;">'includes/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'PATH_CLIENT_IMAGES'</span>,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PATH_PUBLIC_HTML . <span style="color:#FF0000;">'images/client/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'PATH_CLIENT_THUMBNAILS_IMAGES'</span>,&nbsp; &nbsp; PATH_CLIENT_IMAGES . <span style="color:#FF0000;">'thumbnails/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'HTTP_CLIENT_IMAGES'</span>,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; HTTP_HOST . <span style="color:#FF0000;">'images/client/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'HTTP_CLIENT_THUMBNAILS_IMAGES'</span>,&nbsp; &nbsp; HTTP_CLIENT_IMAGES . <span style="color:#FF0000;">'thumbnails/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">/**</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* Page renderer-related directive</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">* These parameters are compatible with the Smarty templating engine</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">*/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'PATH_TEMPLATES'</span>,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PATH_PROJECT_INCLUDES . <span style="color:#FF0000;">'templates/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'PATH_CURRENT_THEME'</span>,&nbsp; &nbsp; &nbsp;PATH_TEMPLATES . <span style="color:#FF0000;">'current-theme/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'SMARTY_TEMPLATE_DIR'</span>,&nbsp; &nbsp; &nbsp;PATH_CURRENT_THEME . <span style="color:#FF0000;">'templates/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'SMARTY_COMPILE_DIR'</span>,&nbsp; &nbsp; &nbsp;PATH_CURRENT_THEME . <span style="color:#FF0000;">'templates_c/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'SMARTY_CACHE_DIR'</span>,&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PATH_CURRENT_THEME . <span style="color:#FF0000;">'cache/'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/define"><span style="color:#000066;">define</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'SMARTY_CONFIG_DIR'</span>,&nbsp; &nbsp; &nbsp;PATH_CURRENT_THEME . <span style="color:#FF0000;">'configs'</span><span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2007/04/project-configuration/&via=vinoaj&text=Project configuration&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div style="float: right; margin-left: 10px;"><a href="http://twitter.com/share?url=http://vinoaj.com/blog/2007/04/project-configuration/&via=vinoaj&text=Project configuration&related=:&lang=en&count=horizontal" class="twitter-share-button">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fvinoaj.com%2Fblog%2F2007%2F04%2Fproject-configuration%2F&amp;title=Project%20configuration" id="wpa2a_12"><img src="http://vinoaj.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://vinoaj.com/blog/2007/04/project-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

