<?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>The Analyst &#187; Tips and tricks</title>
	<atom:link href="http://psyphil.com/bundle/tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://psyphil.com</link>
	<description>Being different is a gift, like being normal</description>
	<lastBuildDate>Thu, 25 Feb 2010 08:56:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Domain redirecting using PHP, redirect whole site not just a page</title>
		<link>http://psyphil.com/domain-redirecting-using-php-redirect-whole-site-not-just-a-page/</link>
		<comments>http://psyphil.com/domain-redirecting-using-php-redirect-whole-site-not-just-a-page/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 17:55:16 +0000</pubDate>
		<dc:creator>The Analyst</dc:creator>
				<category><![CDATA[php Programming]]></category>
		<category><![CDATA[Tips and tricks]]></category>

		<guid isPermaLink="false">http://psyphil.com/?p=113</guid>
		<description><![CDATA[If your site is moved to a new domain with the same file structure as before you can use this code to redirect to the new location. Works well for content management systems like wordpress even without .htaccess &#60;?php $url=$_SERVER['REQUEST_URI']; $url=substr($url, 0, -1); $url_new=&#8221;http://newdomain.com$url/&#8221;; header(&#8220;HTTP/1.1 301 Moved Permanently&#8221;); header(&#8220;Location: $url_new&#8221;); exit(); ?&#62; Place the above [...]]]></description>
			<content:encoded><![CDATA[<p>If your site is moved to a new domain <strong>with the same file structure</strong> as before you can use this code to redirect to the new location. Works well for content management systems like wordpress even without .htaccess</p>
<blockquote><p> &lt;?php<br />
$url=$_SERVER['REQUEST_URI'];<br />
$url=substr($url, 0, -1);<br />
$url_new=&#8221;http://newdomain.com$url/&#8221;;<br />
header(&#8220;HTTP/1.1 301 Moved Permanently&#8221;);<br />
header(&#8220;Location: $url_new&#8221;);<br />
exit();<br />
?&gt; </p></blockquote>
<p>Place the above code before outputting html (Even before &lt;html&gt;).<br />
<strong> What silly thing does this do ?</strong><br />
It does silly thing of concatenating  the file name part in old domain to new domain and redirect the visitors and search engines. Since its server side redirect its search engine friendly and you won&#8217;t lose search engine juice.</p>
]]></content:encoded>
			<wfw:commentRss>http://psyphil.com/domain-redirecting-using-php-redirect-whole-site-not-just-a-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to remove raquo; from wordpress title.</title>
		<link>http://psyphil.com/how-to-remove-raquo-from-wordpress-title/</link>
		<comments>http://psyphil.com/how-to-remove-raquo-from-wordpress-title/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 07:20:03 +0000</pubDate>
		<dc:creator>The Analyst</dc:creator>
				<category><![CDATA[php Programming]]></category>
		<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://psyphil.com/?p=86</guid>
		<description><![CDATA[Oh there are two methods to remove raquo; from the title of wordpress posts. 1. Instead of wp_title() in your theme&#8217;s header file (header.php) put echo wp_title(&#8221;,true); This method is the easiest one to do, it just strips off the raquo; inserted by wordpress. 2. Second method is to find that particular file in wp-includes [...]]]></description>
			<content:encoded><![CDATA[<p>Oh there are two methods to remove raquo; from the title of wordpress posts. </p>
<p>1. </p>
<blockquote><p>Instead of <strong>wp_title() </strong> in your theme&#8217;s header file (header.php) put echo wp_title(&#8221;,true);</p></blockquote>
<p>This method is the easiest one to do, it just strips off the raquo; inserted by wordpress.</p>
<p>2. </p>
<blockquote><p>Second method is to find that particular file in wp-includes thats inserting raquo; into title and removing raquo; from it. I have done it in previous versions of wordpress ( haven&#8217;t tried in 2.7) and feeling bit lazy to search for it. Hakuna matata as long as first one serves my purpose.</p></blockquote>
<p>Second one is really an elegant way, try it yourself in your free time. Post a comment if you can spare minutes to tell others.</p>
]]></content:encoded>
			<wfw:commentRss>http://psyphil.com/how-to-remove-raquo-from-wordpress-title/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to show more than 15 posts in wordpress admin&#8217;s edit posts</title>
		<link>http://psyphil.com/how-to-show-more-than-15-posts-in-wordpress-admins-edit-posts/</link>
		<comments>http://psyphil.com/how-to-show-more-than-15-posts-in-wordpress-admins-edit-posts/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 07:10:21 +0000</pubDate>
		<dc:creator>The Analyst</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://psyphil.com/?p=83</guid>
		<description><![CDATA[Find the line wp(&#8220;post_type=post&#38;what_to_show=posts$post_status_q&#38;posts_per_page=15&#38;order=$order&#38;orderby=$orderby&#8221;); Its 805th line in wordpress 2.7, line number might be different in different versions, so better find (CTRL+F) the line of code above in wp-admin/includes/post.php Replace 15 in posts_per_page=15 by some higher number you wish, Lets say 50, the code code after change must look like this wp(&#8220;post_type=post&#38;what_to_show=posts$post_status_q&#38;posts_per_page=50&#38;order=$order&#38;orderby=$orderby&#8221;);]]></description>
			<content:encoded><![CDATA[<p>Find the line</p>
<blockquote><p>wp(&#8220;post_type=post&amp;what_to_show=posts$post_status_q&amp;posts_per_page=15&amp;order=$order&amp;orderby=$orderby&#8221;);</p></blockquote>
<p>Its <strong>805th</strong> line in wordpress <strong>2.7</strong>, line number might be different in different versions, so better find (CTRL+F) the line of code above in <strong>wp-admin/includes/post.php</strong></p>
<p>Replace <strong>15</strong> in <strong>posts_per_page=15</strong> by some higher number you wish, Lets say 50, the code code after change must look like this</p>
<blockquote><p>wp(&#8220;post_type=post&amp;what_to_show=posts$post_status_q&amp;posts_per_page=50&amp;order=$order&amp;orderby=$orderby&#8221;);</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://psyphil.com/how-to-show-more-than-15-posts-in-wordpress-admins-edit-posts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Language encoding problem for Greek/Arabic/Russian content</title>
		<link>http://psyphil.com/russian-language-characters-display-problem/</link>
		<comments>http://psyphil.com/russian-language-characters-display-problem/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 01:46:54 +0000</pubDate>
		<dc:creator>The Analyst</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>
		<category><![CDATA[Character encoding problem]]></category>

		<guid isPermaLink="false">http://psyphil.com/?p=62</guid>
		<description><![CDATA[While retrieving Greek/ Arabic/ Russian language or some other non english character data from database there is possibility that the data may appear as question marks (??????) instead of the original data, Usually you will be having data in its original language neatly stored in database, but for some strange reasons php is displaying it [...]]]></description>
			<content:encoded><![CDATA[<p>While retrieving Greek/ Arabic/ Russian language or some other non english character data from database there is possibility  that the data may appear as question marks (??????) instead of the original data, Usually you will be having  data in its original language neatly stored in database, but for some strange reasons php is displaying it as ?????? when queried.</p>
<p>This problem actually happens because you have not explicitly mentioned the character set inside your php code. Here are two things you must do to solve your problem.</p>
<li>Put this meta tag inside <strong>head </strong>tags<br />
<strong>&lt;head&gt; &lt;meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html&#34; charset=&#34;utf-8&#34; /&gt; &lt;/head&gt;</strong></li>
<li>Use <strong>mysql_query(&#34;SET NAMES &#39;utf8&#39;&#34;);</strong> before the query to database<strong>mysql_query(&#34;SET NAMES &#39;utf8&#39;&#34;);<br />
$new_database_content=mysql_query(&#34;select * from (&#8230;.) where (&#8230;.) &#34;);</strong></li>
]]></content:encoded>
			<wfw:commentRss>http://psyphil.com/russian-language-characters-display-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2 ways to delete symlinks and ways it can&#8217;t be deleted.</title>
		<link>http://psyphil.com/2-ways-to-delete-symlinks-and-ways-it-cant-be-deleted/</link>
		<comments>http://psyphil.com/2-ways-to-delete-symlinks-and-ways-it-cant-be-deleted/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 11:27:26 +0000</pubDate>
		<dc:creator>The Analyst</dc:creator>
				<category><![CDATA[Tips and tricks]]></category>

		<guid isPermaLink="false">http://psyphil.com/?p=41</guid>
		<description><![CDATA[Symlinks ( symbolic links / soft links ) are the shortcuts to another file or directory, Here I&#8217;m referring to the symlinks that you usually see in a FTP account ( not to be confused with the shortcuts used in a PC ). You can not usually delete symlinks by Using control panel provided by [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Symlinks ( symbolic links / soft links )</strong> are the shortcuts to another file or directory, Here I&#8217;m referring to the symlinks that you usually see in a FTP account ( not to be confused with the shortcuts used in a PC ).</p>
<p><strong>You can not usually delete symlinks by</strong></p>
<ol>
<li> Using control panel provided by your host.</li>
<li>Using <strong>internet explorer</strong> to accesss ftp account.</li>
<li>Using a <strong>random ftp client</strong> that only supports ftp.</li>
<li>Changing file permission (eg: <strong>changing toÂ  777 </strong> ) and trying to delete.</li>
</ol>
<p><strong>How to delete symlinks</strong></p>
<ol>
<li>Use a proper ftp client software that supports <strong>SFTP/SSH</strong> mode file transfer. Use Winscp or filezilla . I have tried <strong>winscp</strong> and mostly <strong>filezilla</strong> too works in <strong>sftp</strong> mode.</li>
<li>Use <strong>shell commands</strong> to remove the symlink,Â  eg 1: use &#8220;rm /www/public_html/~folder_name&#8221; instead of &#8220;rm ~folder_name&#8221; to delete the file along with the folder. eg2: use &#8220;unlink symbolic-link&#8221; .</li>
</ol>
<p>Once you remove Symlinks it will be easy to delete the containing folder, try it.</p>
]]></content:encoded>
			<wfw:commentRss>http://psyphil.com/2-ways-to-delete-symlinks-and-ways-it-cant-be-deleted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

