<?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>PHP 4u Web developer</title>
	<atom:link href="http://php4u.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://php4u.co.uk</link>
	<description>PHP related blog, freelancer to hire!</description>
	<lastBuildDate>Thu, 04 Mar 2010 16:33:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>20 Linux System Monitoring Tools Every SysAdmin Should Know</title>
		<link>http://php4u.co.uk/2010/03/20-linux-system-monitoring-tools-every-sysadmin-should-know/</link>
		<comments>http://php4u.co.uk/2010/03/20-linux-system-monitoring-tools-every-sysadmin-should-know/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 16:33:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[useful commands]]></category>

		<guid isPermaLink="false">http://php4u.co.uk/?p=116</guid>
		<description><![CDATA[Amazing list found at http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html
]]></description>
			<content:encoded><![CDATA[<p>Amazing list found at http://www.cyberciti.biz/tips/top-linux-monitoring-tools.html</p>
]]></content:encoded>
			<wfw:commentRss>http://php4u.co.uk/2010/03/20-linux-system-monitoring-tools-every-sysadmin-should-know/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RewriteMap causing indefinite redirects</title>
		<link>http://php4u.co.uk/2010/02/rewritemap-causing-indefinite-redirects/</link>
		<comments>http://php4u.co.uk/2010/02/rewritemap-causing-indefinite-redirects/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 15:26:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://php4u.co.uk/?p=114</guid>
		<description><![CDATA[If you&#8217;re using Apache mod_rewrite with RewriteMap is causing loop and breaks, probably you had forget about conditions.
RewriteMap  links txt:/var/www/bin/rewritemap.txtRewriteCond ${links:$1&#124;Unknown} !UnknownRewriteRule ^/(.*) ${links:$1} [R=301,L,NC]
Easy saying &#8211; Rule will redirect only when url is found in your mapfile
 
]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using Apache mod_rewrite with RewriteMap is causing loop and breaks, probably you had forget about conditions.</p>
<p>RewriteMap  links txt:/var/www/bin/rewritemap.txt<br /><strong>RewriteCond ${links:$1|Unknown} !Unknown</strong><br />RewriteRule ^/(.*) ${links:$1} [R=301,L,NC]</p>
<p>Easy saying &#8211; Rule will redirect only when url is found in your mapfile</p>
<p> </p>
]]></content:encoded>
			<wfw:commentRss>http://php4u.co.uk/2010/02/rewritemap-causing-indefinite-redirects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run PHP (and others) code in a browser &#8211; revolutionary pastebin</title>
		<link>http://php4u.co.uk/2009/12/run-php-and-others-code-in-a-browser-revolutionary-pastebin/</link>
		<comments>http://php4u.co.uk/2009/12/run-php-and-others-code-in-a-browser-revolutionary-pastebin/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 12:52:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[code in browser]]></category>
		<category><![CDATA[code testing]]></category>
		<category><![CDATA[pastebin]]></category>

		<guid isPermaLink="false">http://php4u.co.uk/?p=112</guid>
		<description><![CDATA[If you need to test a code in browser &#8211; try  http://ideone.com/
Entry found on http://alouche.net/blog/2009/11/24/ideone-compiler-pastebin/
]]></description>
			<content:encoded><![CDATA[<p>If you need to test a code in browser &#8211; try  <a href="http://ideone.com/">http://ideone.com/</a></p>
<p>Entry found on http://alouche.net/blog/2009/11/24/ideone-compiler-pastebin/</p>
]]></content:encoded>
			<wfw:commentRss>http://php4u.co.uk/2009/12/run-php-and-others-code-in-a-browser-revolutionary-pastebin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m in TOP10 on elance.com</title>
		<link>http://php4u.co.uk/2009/12/im-in-top10-on-elance-com/</link>
		<comments>http://php4u.co.uk/2009/12/im-in-top10-on-elance-com/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 20:42:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://php4u.co.uk/?p=105</guid>
		<description><![CDATA[I was really suprised and pleased when i found myself on elance.com in TOP10 coders!
http://www.elance.com/p/blog/2009/12/congratulations_to_our_php_code_off_winners.html
]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-medium wp-image-107" title="elance-code-off-winners" src="http://php4u.co.uk/wp-content/uploads/2009/12/elance-code-off-winners-300x270.jpg" alt="elance-code-off-winners" width="300" height="270" />I was really suprised and pleased when i found myself on elance.com in TOP10 coders!</p>
<p><a title="Elance PHP contest" href="http://www.elance.com/p/blog/2009/12/congratulations_to_our_php_code_off_winners.html" target="_blank">http://www.elance.com/p/blog/2009/12/congratulations_to_our_php_code_off_winners.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://php4u.co.uk/2009/12/im-in-top10-on-elance-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql client for Ubuntu</title>
		<link>http://php4u.co.uk/2009/11/mysql-client-for-ubuntu/</link>
		<comments>http://php4u.co.uk/2009/11/mysql-client-for-ubuntu/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 12:52:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[gui]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://php4u.co.uk/?p=102</guid>
		<description><![CDATA[I&#8217;ve tried TORA, which seems to be nice
sudo apt-get install tora
sudo apt-get install libqt3-mt-mysql
Any others?

]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve tried TORA, which seems to be nice<br />
<code>sudo apt-get install tora</code><br />
<code>sudo apt-get install libqt3-mt-mysql</code><br />
Any others?<br />
<a title="Db Visualizer" href="http://www.minq.se/products/dbvis/dbvis50.html" target="_blank"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://php4u.co.uk/2009/11/mysql-client-for-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geotagging script</title>
		<link>http://php4u.co.uk/2009/08/geotagging-script/</link>
		<comments>http://php4u.co.uk/2009/08/geotagging-script/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 20:48:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[geotagging]]></category>
		<category><![CDATA[user stats]]></category>
		<category><![CDATA[visitors live stats]]></category>

		<guid isPermaLink="false">http://php4u.co.uk/?p=98</guid>
		<description><![CDATA[Geotagging script (http://themeforest.net/user/php4ucouk)
Script converts visitor&#8217;s ip adress into :

 country code (2 and 3 letter ISO code)


 full english country name


 region code and name


 currency code used in this country


 postal code


 gps coordinates


 area code


 dma code


 metro code

and BONUS

 overall statitics about users from different countries


 number or live visitors on your [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Geotagging script </strong>(http://themeforest.net/user/php4ucouk)</p>
<p>Script converts visitor&#8217;s ip adress into :</p>
<ul>
<li> country code (2 and 3 letter ISO code)</li>
</ul>
<ul>
<li> full english country name</li>
</ul>
<ul>
<li> region code and name</li>
</ul>
<ul>
<li> currency code used in this country</li>
</ul>
<ul>
<li> postal code</li>
</ul>
<ul>
<li> gps coordinates</li>
</ul>
<ul>
<li> area code</li>
</ul>
<ul>
<li> dma code</li>
</ul>
<ul>
<li> metro code</li>
</ul>
<p><strong>and BONUS</strong></p>
<ul>
<li> overall statitics about users from different countries</li>
</ul>
<ul>
<li> number or live visitors on your web page</li>
</ul>
<p>Data is provided to you, so you can use it (display it, store in db or do whatever you need)</p>
<p><strong><a title="Geotagging live demo" href="http://php4u.co.uk/geotagging/demo.php" target="_blank">Live demo</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://php4u.co.uk/2009/08/geotagging-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How set active item in primary links menu in Drupal</title>
		<link>http://php4u.co.uk/2009/07/how-set-active-item-in-primary-links-menu-in-drupal/</link>
		<comments>http://php4u.co.uk/2009/07/how-set-active-item-in-primary-links-menu-in-drupal/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 15:50:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Drupal 6.xx]]></category>
		<category><![CDATA[drupal 6.x]]></category>
		<category><![CDATA[drupal menu]]></category>
		<category><![CDATA[drupal theming]]></category>
		<category><![CDATA[theme_links]]></category>

		<guid isPermaLink="false">http://php4u.co.uk/?p=94</guid>
		<description><![CDATA[I wanted to set item to be active from my module. After research i found quite easy way to do it.
I found theme_links() which are preparing menu to be displayed. Copy that into template.php in your theme folder.
My function is quite simple:

?View Code PHPfunction YOURTHEMENAME_links&#40;$links, $attributes = array&#40;'class' =&#38;gt; 'links'&#41;&#41; &#123;
global $language;
$output = '';
&#160;
/**
* Make [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to set item to be active from my module. After research i found quite easy way to do it.</p>
<p>I found <a title="theme_links()" href="http://api.drupal.org/api/function/theme_links/6" target="_blank">theme_links()</a> which are preparing menu to be displayed. Copy that into template.php in your theme folder.</p>
<p>My function is quite simple:</p>

<div class="wp_codebox_msgheader wp_codebox_hide"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p94code2'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p942"><td class="code" id="p94code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> YOURTHEMENAME_links<span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span><span style="color: #339933;">,</span> <span style="color: #000088;">$attributes</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #0000ff;">'links'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$language</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
* Make our item active
*/</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/strpos"><span style="color: #990000;">strpos</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'q'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'URLTOMATCH1/'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$org</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'q'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
menu_set_active_item<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'node/57819'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// nid is taken from primary links</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/strpos"><span style="color: #990000;">strpos</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'q'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'URLTOMATCH2'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$org</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'q'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
menu_set_active_item<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'node/57789'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/strpos"><span style="color: #990000;">strpos</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'q'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'URLTOMATCH3'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$org</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'q'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
menu_set_active_item<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'node/57829'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// inspiration</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/strpos"><span style="color: #990000;">strpos</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'q'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'inspiration'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$org</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'q'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
menu_set_active_item<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'node/57839'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&amp;lt;ul'</span><span style="color: #339933;">.</span> drupal_attributes<span style="color: #009900;">&#40;</span><span style="color: #000088;">$attributes</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;gt;'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$num_links</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/count"><span style="color: #990000;">count</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$links</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$class</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$key</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Add first, last and active classes to the list of links to help out themers.</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$class</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' first'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$num_links</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$class</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' last'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'href'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'href'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'q'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">||</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'href'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'&amp;lt;front&amp;gt;'</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> drupal_is_front_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'language'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'language'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>language <span style="color: #339933;">==</span> <span style="color: #000088;">$language</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>language<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$class</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">' active'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&amp;lt;li'</span><span style="color: #339933;">.</span> drupal_attributes<span style="color: #009900;">&#40;</span><a href="http://www.php.net/array"><span style="color: #990000;">array</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class'</span> <span style="color: #339933;">=&amp;</span>gt<span style="color: #339933;">;</span> <span style="color: #000088;">$class</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;gt;'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'href'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">// Pass in $link as $options, they share the same keys.</span>
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> l<span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'href'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$link</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #666666; font-style: italic;">// Some links are actually not links, but we wrap these in &amp;lt;span&amp;gt; for adding title and class attributes</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/empty"><span style="color: #990000;">empty</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'html'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> check_plain<span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$span_attributes</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/isset"><span style="color: #990000;">isset</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attributes'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$span_attributes</span> <span style="color: #339933;">=</span> drupal_attributes<span style="color: #009900;">&#40;</span><span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attributes'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&amp;lt;span'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$span_attributes</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;gt;'</span><span style="color: #339933;">.</span> <span style="color: #000088;">$link</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'title'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;lt;/span&amp;gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&amp;lt;/li&amp;gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$output</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&amp;lt;/ul&amp;gt;'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// set original value</span>
menu_set_active_item<span style="color: #009900;">&#40;</span><span style="color: #000088;">$org</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://php4u.co.uk/2009/07/how-set-active-item-in-primary-links-menu-in-drupal/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to modify Drupal Views SQL</title>
		<link>http://php4u.co.uk/2009/07/how-to-modify-drupal-views-sql/</link>
		<comments>http://php4u.co.uk/2009/07/how-to-modify-drupal-views-sql/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 10:16:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Drupal 6.xx]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[orderby]]></category>
		<category><![CDATA[views 2.xx]]></category>

		<guid isPermaLink="false">http://php4u.co.uk/?p=91</guid>
		<description><![CDATA[I wanted to sort my views result on field which doesn&#8217;t exists in db table, so my idea was to use:
SELECT &#8230; WHERE field IN (value1, value2) &#8230; ORDER BY field = value1 DESC, field = value2 DESC  etc
Which orders my elements exactly as I need, but problem was how to modyfy views sorting options?
Simply [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to sort my views result on field which doesn&#8217;t exists in db table, so my idea was to use:</p>
<p>SELECT &#8230; WHERE field IN (value1, value2) &#8230; ORDER BY field = value1 DESC, field = value2 DESC  etc</p>
<p>Which orders my elements exactly as I need, but problem was how to modyfy views sorting options?</p>
<p>Simply you can implement <strong> hook_views_query_alter(&amp;$view, &amp;$query)</strong> in your_module.views.inc file</p>
<p><strong>$query-&gt;orderby</strong> is an array of all orderby elements, so you can easily modify it.</p>
]]></content:encoded>
			<wfw:commentRss>http://php4u.co.uk/2009/07/how-to-modify-drupal-views-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Mail problem on Ubuntu</title>
		<link>http://php4u.co.uk/2009/05/php-mail-problem-on-ubuntu/</link>
		<comments>http://php4u.co.uk/2009/05/php-mail-problem-on-ubuntu/#comments</comments>
		<pubDate>Fri, 29 May 2009 14:39:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://php4u.co.uk/?p=89</guid>
		<description><![CDATA[I&#8217;ve installed fresh version of Ubuntu 9.04 with Lamp, but I couldn&#8217;t send emails outside.
Problem was SMTP auth of outgoing server, spending time found http://dbaron.org/linux/sendmail who made my day. Thanks
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve installed fresh version of Ubuntu 9.04 with Lamp, but I couldn&#8217;t send emails outside.</p>
<p>Problem was SMTP auth of outgoing server, spending time found <a title="Sendmail SMTP conf" href="http://dbaron.org/linux/sendmail" target="_blank">http://dbaron.org/linux/sendmail</a> who made my day. Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://php4u.co.uk/2009/05/php-mail-problem-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why do I receive an &#8220;Operation aborted&#8221; error message when I visit a Web page in Internet Explorer?</title>
		<link>http://php4u.co.uk/2009/05/why-do-i-receive-an-operation-aborted-error-message-when-i-visit-a-web-page-in-internet-explorer/</link>
		<comments>http://php4u.co.uk/2009/05/why-do-i-receive-an-operation-aborted-error-message-when-i-visit-a-web-page-in-internet-explorer/#comments</comments>
		<pubDate>Tue, 19 May 2009 13:45:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Browsers issues]]></category>
		<category><![CDATA[internet explorer. ie7]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[operation aborted]]></category>

		<guid isPermaLink="false">http://php4u.co.uk/?p=87</guid>
		<description><![CDATA[I did really simple application, but still under IE7 it was crashing with Operation aborted.
First &#8220;You can turn off friendly HTTP error messages in Internet Explorer. This workaround still lets the error message appear. However, Internet Explorer does not move away from the page after the error occurs. This workaround works only for Internet Explorer [...]]]></description>
			<content:encoded><![CDATA[<p>I did really simple application, but still under IE7 it was crashing with Operation aborted.</p>
<p>First &#8220;You can turn off friendly HTTP error messages in Internet Explorer. This workaround still lets the error message appear. However, Internet Explorer does not move away from the page after the error occurs. This workaround works only for Internet Explorer 6.</p>
<p>To do this, follow these steps:</p>
<p>1. On the Tools menu, click Internet Options.<br />
2. On the Advanced tab, click to clear the Show friendly HTTP error messages check box under the Browsing section, and then click OK.<br />
3. Close the browser. &#8221; according to <a href="http://support.microsoft.com/kb/927917" target="_blank">http://support.microsoft.com/kb/927917</a></p>
<p>At least page is rendered, but it doesn&#8217;t solve a problem. When i started to dig i found that i&#8217;m using Jqwuery tooltip inside table.</p>
<p>Next thing i&#8217;ve added line to execute javascript when document is fully loaded.</p>
<div id="javascript-1">
<div class="javascript" style="font-family: monospace;">
<ol>
<li style="font-weight: normal; vertical-align: top; color: #acaa9a;">
<div style="margin: 0pt; padding: 0pt; background: transparent none repeat scroll 0% 0%; font-family: monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 1em; line-height: 1.2em; font-size-adjust: none; font-stretch: normal; vertical-align: top;">$<span style="color: #009900;">(</span>document<span style="color: #009900;">)</span>.<a href="http://www.learningjquery.com/wp-content/themes/ljq/docs.php?fn=ready"><span>ready</span></a><span style="color: #009900;">(</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">(</span><span style="color: #009900;">)</span> <span style="color: #009900;">{</span></div>
</li>
<li style="font-weight: bold; vertical-align: top; color: #acaa9a;">
<div style="margin: 0pt; padding: 0pt; background: transparent none repeat scroll 0% 0%; font-family: monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 1em; line-height: 1.2em; font-size-adjust: none; font-stretch: normal; vertical-align: top;"><span style="color: #006600; font-style: italic;">// put all your jQuery goodness in here.</span></div>
</li>
<li style="font-weight: normal; vertical-align: top; color: #acaa9a;">
<div style="margin: 0pt; padding: 0pt; background: transparent none repeat scroll 0% 0%; font-family: monospace; font-style: normal; font-variant: normal; font-weight: normal; font-size: 1em; line-height: 1.2em; font-size-adjust: none; font-stretch: normal; vertical-align: top;"><span style="color: #009900;">}</span><span style="color: #009900;">)</span><span style="color: #339933;">;</span></div>
</li>
</ol>
</div>
</div>
<p>It solved IE7 from crashing</p>
]]></content:encoded>
			<wfw:commentRss>http://php4u.co.uk/2009/05/why-do-i-receive-an-operation-aborted-error-message-when-i-visit-a-web-page-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.719 seconds -->
