<?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 Magic Book - Free PHP Scripts, Tutorials and Downloads</title>
	<atom:link href="http://www.phpmagicbook.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpmagicbook.com</link>
	<description>PHP AtoZ Reloaded, free php tutorials, free php downloads, php scripts, PHP tips</description>
	<lastBuildDate>Tue, 15 Jun 2010 13:22:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Free Social CMS like Digg, Mixx, Reddit</title>
		<link>http://www.phpmagicbook.com/social-cms-digg-mixx-reddit/</link>
		<comments>http://www.phpmagicbook.com/social-cms-digg-mixx-reddit/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 13:22:30 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[CMS]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[Content Management]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[smarty]]></category>
		<category><![CDATA[social community]]></category>
		<category><![CDATA[social networking software]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=531</guid>
		<description><![CDATA[After using a lot of social networking websites and communities have you ever wanted to have your own social website? Here is a solution for you. You do not need any kind of PHP or HTML skills to start with this one. Pligg is an open source social CMS (Content Management System) that you can [...]<p><a href="http://www.phpmagicbook.com/social-cms-digg-mixx-reddit/">Free Social CMS like Digg, Mixx, Reddit</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.phpmagicbook.com/wp-content/uploads/2010/06/pligg-642x432.jpg" alt="http://digitalnature.ro/projects/mystique/" title="pligg" width="642" height="432" class="aligncenter size-thumbnail wp-image-577" /></p>
<p>After using a lot of social networking websites and communities have you ever wanted to have your own social website? Here is a solution for you. You do not need any kind of PHP or HTML skills to start with this one. Pligg is an open source social CMS (Content Management System) that you can download and use for free. Pligg CMS provides social networking software that encourages visitors to register on your website so that they can submit content and connect with other users. Pligg creates websites where stories are created and voted on by members, not website editors. Use Pligg content management system to start your own social networking community in minutes.</p>
<p><span id="more-531"></span></p>
<p>Pligg was created as a social networking CMS. While most content management systems are designed for only a handful of authors, Pligg CMS was designed to manage a site with an unlimited number of authors. All of these registered users are in control of the website&#8217;s content. It is a user driven CMS that relies on independent authors&#8217; content and participation to manage news articles.</p>
<p>Pligg started as a simple CMS to let users submit and vote on news articles. Vote on stories that interest you and articles that receive enough votes will appear on the homepage of your Pligg site. Pligg offers a 5 star method for voting or the more traditional numbered voting as seen on sites like Digg, Mixx, or Reddit.</p>
<p>Features include groups, private messaging, advanced comment system, user profiles, modules system, smarty templates, easy upgrades, rss feeds, seo enhanced, multiple languages</p>
<p><a rel="nofollow" target="_blank" href="http://www.pligg.com/">Download Pligg</a><br />
<a rel="nofollow" target="_blank" href="http://digitalnature.ro/projects/mystique/">Free Pligg Premium Quality Template [ mystique ]</a></p>
<p><a href="http://www.phpmagicbook.com/social-cms-digg-mixx-reddit/">Free Social CMS like Digg, Mixx, Reddit</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/smarty-for-smart-developers/" title="Smarty For Smart Developers">Smarty For Smart Developers</a></li><li><a href="http://www.phpmagicbook.com/open-source-small-forum/" title="Open Source PHP Based Great Forum &#8211; PHPBB Alternative">Open Source PHP Based Great Forum &#8211; PHPBB Alternative</a></li><li><a href="http://www.phpmagicbook.com/quick-edit-little-file-based-php-cms/" title="Quick Edit &#8211; Little File Based PHP CMS">Quick Edit &#8211; Little File Based PHP CMS</a></li><li><a href="http://www.phpmagicbook.com/add-view-delete-record/" title="Add, View, Delete Record Using PHP">Add, View, Delete Record Using PHP</a></li><li><a href="http://www.phpmagicbook.com/greeting-cards-system/" title="Download Greeting Cards System in PHP">Download Greeting Cards System in PHP</a></li><li><a href="http://www.phpmagicbook.com/hello-world/" title="Hello world!">Hello world!</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/social-cms-digg-mixx-reddit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPMagicBook Reloaded</title>
		<link>http://www.phpmagicbook.com/phpmagicbook-reloaded/</link>
		<comments>http://www.phpmagicbook.com/phpmagicbook-reloaded/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 21:21:50 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[about site]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=532</guid>
		<description><![CDATA[PHPMagicBook has been very modest, small, insignificant and under the hood. It is still modest but now with a fresh look. PHPMagicBook has got a new logo style. Lately we have not been posting enough due to lack of time and some other projects. We could not respond to guests. But now in following few [...]<p><a href="http://www.phpmagicbook.com/phpmagicbook-reloaded/">PHPMagicBook Reloaded</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>PHPMagicBook has been very modest, small, insignificant and under the hood. It is still modest but now with a fresh look. PHPMagicBook has got a new logo style. Lately we have not been posting enough due to lack of time and some other projects. We could not respond to guests. But now in following few days, you shall observe a start in regular activity here. We aim to solve problems for people who want to do it themselves. People who are designers and HTML developers, but can&#8217;t code PHP. In result they lose projects sometimes because they can not take whole project from starting point of Design and then HTML development and finally integration of PHP scripts at website to make it dynamic and responsive to its users. We just want to enable everybody to use PHP.</p>
<p>We provide working scripts. We test scripts, We write scripts and then we share it with you here. We are soon creating a section which will work like reference sheets for PHP scripts. You can not remember all PHP scripts you will ever need, right? So you need a reference sheet and ready to use functions of PHP. We are going to provide guests with the best practices and solution for PHP.</p>
<p>Check back soon and thanks to all PHPMagicBook guests, visitors, contributors and everybody who subscribed. PHPMagicBook has been reloaded and its going to start a new journey. Cheers!</p>
<p><a href="http://www.phpmagicbook.com/phpmagicbook-reloaded/">PHPMagicBook Reloaded</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/easiest-way-ever-php-email/" title="Easiest Way Ever PHP eMail Script">Easiest Way Ever PHP eMail Script</a></li><li><a href="http://www.phpmagicbook.com/phone-number-email-validation/" title="Phone Number And Email Validation Update">Phone Number And Email Validation Update</a></li><li><a href="http://www.phpmagicbook.com/date-and-time-in-php/" title="Date And Time Scripts In PHP">Date And Time Scripts In PHP</a></li><li><a href="http://www.phpmagicbook.com/form-validation/" title="Form Validation Script">Form Validation Script</a></li><li><a href="http://www.phpmagicbook.com/php-file-close/" title="PHP &#8211; File Close">PHP &#8211; File Close</a></li><li><a href="http://www.phpmagicbook.com/else-statement/" title="PHP Else Statement">PHP Else Statement</a></li><li><a href="http://www.phpmagicbook.com/php-file-upload-script-globals-off/" title="PHP File Upload Script &#8211; Globals Off">PHP File Upload Script &#8211; Globals Off</a></li><li><a href="http://www.phpmagicbook.com/writing-in-a-file-via-php/" title="Writing In A File Via PHP &#8211; Tutorial and Script Download">Writing In A File Via PHP &#8211; Tutorial and Script Download</a></li><li><a href="http://www.phpmagicbook.com/country-select-and-time-zone-select/" title="Country Select and Time Zone Select">Country Select and Time Zone Select</a></li><li><a href="http://www.phpmagicbook.com/php-file-delete-unlink-function/" title="PHP &#8211; File Delete &#8211; Unlink Function">PHP &#8211; File Delete &#8211; Unlink Function</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/phpmagicbook-reloaded/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Change Your Blog or Forum Theme Color Scheme Online Live</title>
		<link>http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/</link>
		<comments>http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 22:25:06 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[colors]]></category>
		<category><![CDATA[customization]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[live]]></category>
		<category><![CDATA[phpbb]]></category>
		<category><![CDATA[scheme]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=521</guid>
		<description><![CDATA[ColorizeIt is an online color scheme editor. You can select or upload a design, change colors, download modified design and use it. ColorizeIt is a perfect solution for owners of forums, blogs and turnkey websites. You no longer have to search for a design that matches color scheme you want, you can take any design [...]<p><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/">Change Your Blog or Forum Theme Color Scheme Online Live</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.phpmagicbook.com/wp-content/uploads/2010/04/change-theme-online.png" alt="" title="change-theme-online" width="500" height="176" class="alignnone size-full wp-image-522" /></p>
<p>ColorizeIt is an online color scheme editor. You can select or upload a design, change colors, download modified design and use it. ColorizeIt is a perfect solution for owners of forums, blogs and turnkey websites. <strong>You no longer have to search for a design that matches color scheme you want</strong>, you can take any design and quickly alter its color scheme online.</p>
<p><span id="more-521"></span></p>
<p>Service is in beta phase. Still you can use it and its great. Editing requires no html/css knowledge at all, you don&#8217;t need to enter weird html color values, all editing is done by <strong>moving few sliders</strong>. Select a color you want to be changed, move few sliders to change it to color you want, then when you download a design that color will be changed in all html files, css and all images.</p>
<p><a rel="nofollow" target="_blank" href="http://beta.colorizeit.com/">Go to Colorize it</a></p>
<p><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/">Change Your Blog or Forum Theme Color Scheme Online Live</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/change-prosilver-header-logo-phpbb/" title="Change Prosilver Header and Logo in PHPBB &#8211; Working Solution">Change Prosilver Header and Logo in PHPBB &#8211; Working Solution</a></li><li><a href="http://www.phpmagicbook.com/customizing-wordpress-tags-cloud-a-guide/" title="Customizing WordPress Tags Cloud &#8211; A Guide">Customizing WordPress Tags Cloud &#8211; A Guide</a></li><li><a href="http://www.phpmagicbook.com/how-to-include-specific-file-in-wordpress-blog-template/" title="How to Include Specific File In WordPress Blog Template">How to Include Specific File In WordPress Blog Template</a></li><li><a href="http://www.phpmagicbook.com/how-to-display-some-content-at-homepage-single-post-of-blog/" title="How To Display Some Content at Just Home Page and Single Post of Blog">How To Display Some Content at Just Home Page and Single Post of Blog</a></li><li><a href="http://www.phpmagicbook.com/display-rss-feed-from-any-blog-on-your-wordpress-blog/" title="Display RSS Feed From Any Blog on Your WordPress Blog">Display RSS Feed From Any Blog on Your WordPress Blog</a></li><li><a href="http://www.phpmagicbook.com/provide-rss-feed-for-each-post-and-comment-at-your-wordpress-blog/" title="Provide RSS Feed for Each Post and Comment at Your WordPress Blog">Provide RSS Feed for Each Post and Comment at Your WordPress Blog</a></li><li><a href="http://www.phpmagicbook.com/remove-ads-for-registered-users-or-admin-on-wordpress-blog/" title="Remove Ads for Registered Users or Admin on WordPress Blog">Remove Ads for Registered Users or Admin on WordPress Blog</a></li><li><a href="http://www.phpmagicbook.com/remove-comments-section-from-your-wordpress-blog/" title="Remove Comments Section From Your WordPress Blog">Remove Comments Section From Your WordPress Blog</a></li><li><a href="http://www.phpmagicbook.com/insert-adsense-after-the-first-post-in-your-wordpress-blog/" title="Insert Adsense After the First Post in Your WordPress Blog">Insert Adsense After the First Post in Your WordPress Blog</a></li><li><a href="http://www.phpmagicbook.com/redirect-ugly-permalink-to-postname/" title="Redirect Ugly Permalink to Postname">Redirect Ugly Permalink to Postname</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Change Prosilver Header and Logo in PHPBB &#8211; Working Solution</title>
		<link>http://www.phpmagicbook.com/change-prosilver-header-logo-phpbb/</link>
		<comments>http://www.phpmagicbook.com/change-prosilver-header-logo-phpbb/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 21:50:53 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Forums]]></category>
		<category><![CDATA[customization]]></category>
		<category><![CDATA[phpbb]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=510</guid>
		<description><![CDATA[You will install PHPBB and wonder what next? How to change its header and PHPBB logo? I did. First day I just stumbled through its admin settings, here and there and then searched quite a bit for default theme Prosilver&#8217;s customizations. Finally got it. Let&#8217;s come down to exactly how we do it. If you [...]<p><a href="http://www.phpmagicbook.com/change-prosilver-header-logo-phpbb/">Change Prosilver Header and Logo in PHPBB &#8211; Working Solution</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.phpmagicbook.com/wp-content/uploads/2010/04/phpbb-theme-change.png" alt="" title="phpbb-theme-change" width="500" height="117" class="alignnone size-full wp-image-519" /></p>
<p>You will install PHPBB and wonder what next? How to change its header and PHPBB logo? I did. First day I just stumbled through its admin settings, here and there and then searched quite a bit for default theme Prosilver&#8217;s customizations. Finally got it. Let&#8217;s come down to exactly how we do it. If you have been using WordPress then probably you will find PHPBB customization a bit nerdy task.</p>
<p>Go to <strong>sitename.com/styles/prosilver</strong> in your FTP<br />
Folder <strong>Theme</strong> contains css files<br />
Folder <strong>Template</strong> contains template files</p>
<p><span id="more-510"></span></p>
<p>Pay attention&#8230;.</p>
<h4>Change / Remove PHPBB Logo from Prosilver</h4>
<p>Go to template directory.<br />
There is a file <strong>template.cfg</strong><br />
Edit it.<br />
Find a line in it (line no.25)<br />
<strong>img_site_logo = site_logo.gif*52*139</strong><br />
Change logo width and height from it and change image name if you want. Save it.<br />
If you change image name, upload that new image in the directory <strong>imageset</strong></p>
<p>So far so good.<br />
We are not done yet.</p>
<p><strong>overall_header.html</strong> file in <strong>template</strong> directory contains some code you might want to check in.</p>
<p>Search there following line.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;{U_INDEX}&quot; title=&quot;&quot; id=&quot;logo&quot;&gt;{SITE_LOGO_IMG}&lt;/a&gt;</pre></div></div>

<p>Remove it if you want to remove logo completely.</p>
<p>We are not done yet.</p>
<p>Following two lines contains Title and site description in header. Remove or edit these.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;h1&gt;{SITENAME}&lt;/h1&gt;
&lt;p&gt;{SITE_DESCRIPTION}&lt;/p&gt;</pre></div></div>

<p>In my opinion, remove these lines, upload your logo image in <strong>imageset</strong> directory and change its name, width and height from file <strong>template.cfg</strong> in <strong>template</strong> directory.</p>
<p>We are not done yet.</p>
<p>If you will refresh site front side, it won&#8217;t show any changes. But changes have been made. I told you, we are not done yet buddy!</p>
<p>In <strong>theme</strong> directory, there are CSS files. Lots of them.</p>
<p>You might edit <strong>colours.css</strong> and <strong>common.css</strong> files to further modify header.</p>
<p>search for <strong>.headerbar</strong> style in both files and change properties accordingly &#8211; yep in both files. Here you can change background color and background image of header.</p>
<p>Find <strong>#logo</strong> id in <strong>common.css</strong>, set padding if you want.</p>
<h4>Adding Additional Header Links</h4>
<p>Come back to <strong>overall_header.html</strong> in <strong>template</strong> directory.</p>
<p>Find following lines.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=&quot;wrap&quot;&gt;
	&lt;a id=&quot;top&quot; name=&quot;top&quot; accesskey=&quot;t&quot;&gt;&lt;/a&gt;
	&lt;div id=&quot;page-header&quot;&gt;
		&lt;div class=&quot;headerbar&quot;&gt;</pre></div></div>

<p>Right under;</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div class=&quot;headerbar&quot;&gt;</pre></div></div>

<p>Start a DIV and close it there. In that DIV, you can place your additional header links.</p>
<p>We are not done yet!</p>
<h4>Changing Footer</h4>
<p>Find <strong>overall_footer.html</strong> file in <strong>template</strong> directory. Line no. 41 starts from &#8216;Powered by&#8230;.&#8217;</p>
<p>Change it and add more if you want according to your needs.</p>
<p>Okay! Final and important step&#8230;.</p>
<h4>Where are Changes! Damn it!</h4>
<p>Alright! I told you we are not done yet.<br />
Go to Admin area (ACP) of PHPBB.<br />
Go to <strong>Styles</strong> Tab.<br />
Go to <strong>Style components</strong> (left side menu).<br />
Under that there are:<br />
<strong>* Templates<br />
* Themes<br />
* Imagesets</strong><br />
Browse these one by one.<br />
In them you will find <strong>refresh</strong> link. Do it.</p>
<p>Refresh Templates.<br />
Refresh Themes.<br />
Refresh Imagesets</p>
<p>Now we are done; my friend. Check the front side now. Changes done! Its important to refresh templates, theme and imagesets to see changes in effect.</p>
<p>In start I was doing changes and did not refresh the theme and template and I could not see changes in site. I cursed PHPBB and went to sleep. With WordPress its all so easy. Click, click, click and you are there. PHPBB is tricky. Today I thought, Yeah! What the heck? Do it today. So, this is solution.</p>
<p>Want to see changes in header? See <strong><a rel="nofollow" target="_blank" href="http://www.techmynd.net/">http://www.techmynd.net/</a></strong></p>
<p><a href="http://www.phpmagicbook.com/change-prosilver-header-logo-phpbb/">Change Prosilver Header and Logo in PHPBB &#8211; Working Solution</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/change-blog-forum-theme-color-scheme-online-live-tool/" title="Change Your Blog or Forum Theme Color Scheme Online Live">Change Your Blog or Forum Theme Color Scheme Online Live</a></li><li><a href="http://www.phpmagicbook.com/change-color-theme-with-php-css-switch/" title="Change Color Theme With PHP &#8211; CSS Switch">Change Color Theme With PHP &#8211; CSS Switch</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/change-prosilver-header-logo-phpbb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Htaccess Mod Rewrite Practical Essential Important Solutions &#8211; Update</title>
		<link>http://www.phpmagicbook.com/htaccess-mod-rewrite-practical-essential-important-solutions-update/</link>
		<comments>http://www.phpmagicbook.com/htaccess-mod-rewrite-practical-essential-important-solutions-update/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 20:11:59 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Mod Rewrite]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=506</guid>
		<description><![CDATA[I have been experimenting with .htaccess a lot regarding with mod rewriting and URL rewriting and had a lot of difficulty finding the solutions regarding to exact problem I faced. This stuff is such a headache. I am feeling headache right now as I am typing after messing with a lot of .htaccess codes. Here [...]<p><a href="http://www.phpmagicbook.com/htaccess-mod-rewrite-practical-essential-important-solutions-update/">Htaccess Mod Rewrite Practical Essential Important Solutions &#8211; Update</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I have been experimenting with .htaccess a lot regarding with mod rewriting and URL rewriting and had a lot of difficulty finding the solutions regarding to exact problem I faced. This stuff is such a headache. I am feeling headache right now as I am typing after messing with a lot of .htaccess codes. Here is an update regarding essential stuff which you will find useful if you are trying to change your URLS from index.php to index.html or index.php to index and if after putting RewriteEngine on images are not showing up at pages. Following exercises will answer these tasks in htacces mod rewrite:</p>
<p>1- How to enable RewriteEngine for htaccess and localhost<br />
2- Images are not showing after RewriteEngine on<br />
3- Images in second level directory are not showing after RewriteEngine on<br />
e.g. <strong>images/1.jpg</strong> is showing but <strong>images/icons/2.jpg</strong> is not showing up<br />
4- Want to change <strong>index.php</strong> into <strong>index</strong> or <strong>about.php</strong> into <strong>about</strong><br />
5- Want to change all <strong>pages.php</strong> to <strong>pages.html</strong> for site using htaccess<br />
6- Want to Rewrite <strong>yoursite.com/user.php?username=xyz</strong> to <strong>yoursite.com/xyz</strong><br />
7- Want to Rewriting <strong>product.php?id=12</strong> to <strong>product/ipod-nano/12.html</strong><br />
8- Want to change <strong>product.php?id=5</strong> to <strong>porduct-5.html</strong></p>
<p><span id="more-506"></span></p>
<h4>Enable ReWrite Engine</h4>
<p>Before rewriting do this in .htaccess file.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">Options <span style="color: #339933;">+</span>FollowSymLinks
RewriteEngine on</pre></div></div>

<p>and after that start rewriting</p>
<h4>Images not showing after RewriteEngine on</h4>
<p>Solve images problem which sometimes does not show if you enable rewrite engine in .htaccess. I was trying to change index.php to index and when I did that, images from first images directory were displaying (images/) but the second level images (images/icons/) were not displaying. Even when I tried the absolute path, images from images/icons/ directory were not displaying. The trick is that, you have to rewrite images directory as well and similarly sometimes css and js directories also. In this case when I tried the following code, my problem was solved.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">RewriteRule ^images<span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">.+</span><span style="color: #009900;">&#41;</span>?$ images<span style="color: #339933;">/</span>$<span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#91;</span>NC<span style="color: #339933;">,</span>L<span style="color: #009900;">&#93;</span> 
<span style="color: #666666; font-style: italic;"># RewriteRule ^images/icons/(.+)?$ images/icons/$1 [NC,L]</span></pre></div></div>

<p>First line in above example solved my problem and I did not need the second in my case.</p>
<p>There is problem with Browsers which don&#8217;t recognize that folders you typed are not real So there is problem with images and css style. In another case consider the following example.</p>
<p>All you have to do is mod rewrite all your image, css and js folders like below:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">RewriteRule ^pictures<span style="color: #339933;">/</span>images<span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">.+</span><span style="color: #009900;">&#41;</span>?$ images<span style="color: #339933;">/</span>$<span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#91;</span>NC<span style="color: #339933;">,</span>L<span style="color: #009900;">&#93;</span>
RewriteRule ^pictures<span style="color: #339933;">/</span>css<span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">.+</span><span style="color: #009900;">&#41;</span>?$ css<span style="color: #339933;">/</span>$<span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#91;</span>NC<span style="color: #339933;">,</span>L<span style="color: #009900;">&#93;</span>
RewriteRule ^pictures<span style="color: #339933;">/</span>js<span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">.+</span><span style="color: #009900;">&#41;</span>?$ js<span style="color: #339933;">/</span>$<span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#91;</span>NC<span style="color: #339933;">,</span>L<span style="color: #009900;">&#93;</span>
RewriteRule ^pictures<span style="color: #339933;">/</span>php<span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">.+</span><span style="color: #009900;">&#41;</span>?$ php<span style="color: #339933;">/</span>$<span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#91;</span>NC<span style="color: #339933;">,</span>L<span style="color: #009900;">&#93;</span>
RewriteRule ^pictures<span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span>?$ pictures<span style="color: #339933;">.</span>Php?year<span style="color: #339933;">=</span>$<span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#91;</span>NC<span style="color: #339933;">,</span>L<span style="color: #009900;">&#93;</span></pre></div></div>

<h4>Redirect index.php to index</h4>
<p>Okay, you have to do this with all the pages separately. In the following case I have done these with two pages. Index.php and about.php. I don&#8217;t know yet what is the solution for doing it in single line for every page.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">RewriteRule index index<span style="color: #339933;">.</span>php
RewriteRule about about<span style="color: #339933;">.</span>php</pre></div></div>

<p>so on&#8230;</p>
<p>Important: You have implemented this code in .htaccess file. Now your like for <strong>yoursite.com/about.php</strong> will be <strong>yoursite.com/about</strong>. You will have to link the text with this modified call (with no .php) and .htaccess will do the magic where you have defined the rule to change about.php to about. That&#8217;s it.</p>
<h4>Change .php URLs in .html</h4>
<p>Now this one I know. Single line of code will do the magic. You have all the pages of site in php, but after writing this single line code in .htaccess, they will be changed into .html. I mean the URLs will be changed to .html. Link your pages with .html extension and write this code in .htaccess file and you are done.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">RewriteRule ^<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>\<span style="color: #339933;">.</span>html$ $1<span style="color: #339933;">.</span>php <span style="color: #009900;">&#91;</span>NC<span style="color: #009900;">&#93;</span></pre></div></div>

<p>For htm do this.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">RewriteRule ^<span style="color: #009900;">&#40;</span><span style="color: #339933;">.*</span><span style="color: #009900;">&#41;</span>\<span style="color: #339933;">.</span>htm$ $1<span style="color: #339933;">.</span>php <span style="color: #009900;">&#91;</span>NC<span style="color: #009900;">&#93;</span></pre></div></div>

<h4>Rewriting yoursite.com/user.php?username=xyz to yoursite.com/xyz</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">RewriteRule ^<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>a<span style="color: #339933;">-</span>zA<span style="color: #339933;">-</span>Z0<span style="color: #339933;">-</span><span style="color: #cc66cc;">9</span>_<span style="color: #339933;">-</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span>$ user<span style="color: #339933;">.</span>php?username<span style="color: #339933;">=</span>$<span style="color: #cc66cc;">1</span>
RewriteRule ^<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>a<span style="color: #339933;">-</span>zA<span style="color: #339933;">-</span>Z0<span style="color: #339933;">-</span><span style="color: #cc66cc;">9</span>_<span style="color: #339933;">-</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span>$ user<span style="color: #339933;">.</span>php?username<span style="color: #339933;">=</span>$<span style="color: #cc66cc;">1</span></pre></div></div>

<h4>Rewriting product.php?id=12 to product/ipod-nano/12.html</h4>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">RewriteRule ^product<span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span>a<span style="color: #339933;">-</span>zA<span style="color: #339933;">-</span>Z0<span style="color: #339933;">-</span><span style="color: #cc66cc;">9</span>_<span style="color: #339933;">-</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span>\<span style="color: #339933;">.</span>html$ product<span style="color: #339933;">.</span>php?id<span style="color: #339933;">=</span>$<span style="color: #cc66cc;">2</span></pre></div></div>

<p>And change product.php?id=5 to porduct-5.html so that http://localhost/product-5.html calls product.php?id=5 automatically</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">RewriteRule ^product<span style="color: #339933;">-</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">+</span><span style="color: #009900;">&#41;</span>\<span style="color: #339933;">.</span>html$ products<span style="color: #339933;">.</span>php?id<span style="color: #339933;">=</span>$<span style="color: #cc66cc;">1</span></pre></div></div>

<p>Done&#8230;</p>
<p>Please help me learn and do more with this htaccess stuff. If you know more about this, want to correct / improve these codes or offer more advanced codes to do the same what I have mentioned above, share with me in comments.</p>
<p><a href="http://www.phpmagicbook.com/htaccess-mod-rewrite-practical-essential-important-solutions-update/">Htaccess Mod Rewrite Practical Essential Important Solutions &#8211; Update</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/php-string-case-capitalization/" title="PHP &#8211; String Case &#8211; Capitalization">PHP &#8211; String Case &#8211; Capitalization</a></li><li><a href="http://www.phpmagicbook.com/sending-email-with-php/" title="Sending eMail Using PHP">Sending eMail Using PHP</a></li><li><a href="http://www.phpmagicbook.com/file-upload-get-info/" title="File Upload Using PHP and Get File Info">File Upload Using PHP and Get File Info</a></li><li><a href="http://www.phpmagicbook.com/unique-php-hit-counter/" title="PHP Unique Hit Counter Script">PHP Unique Hit Counter Script</a></li><li><a href="http://www.phpmagicbook.com/php-file-close/" title="PHP &#8211; File Close">PHP &#8211; File Close</a></li><li><a href="http://www.phpmagicbook.com/image-upload-rename-apply-restrictions/" title="Image Upload, Rename and Apply Restrictions Using PHP">Image Upload, Rename and Apply Restrictions Using PHP</a></li><li><a href="http://www.phpmagicbook.com/date-object-for-future-or-past-easy-monthwise-or-datewise-records-selection/" title="Date Object For Future or Past &#8211; Easy Monthwise or Datewise Records Selection Using PHP">Date Object For Future or Past &#8211; Easy Monthwise or Datewise Records Selection Using PHP</a></li><li><a href="http://www.phpmagicbook.com/print/" title="Print in PHP">Print in PHP</a></li><li><a href="http://www.phpmagicbook.com/adding-record-in-database/" title="Adding Record In Database Using PHP">Adding Record In Database Using PHP</a></li><li><a href="http://www.phpmagicbook.com/protect-hotlink-the-right-way-using-htaccess/" title="Protect Hotlink the Right Way Using htaccess">Protect Hotlink the Right Way Using htaccess</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/htaccess-mod-rewrite-practical-essential-important-solutions-update/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Protect Hotlink the Right Way Using htaccess</title>
		<link>http://www.phpmagicbook.com/protect-hotlink-the-right-way-using-htaccess/</link>
		<comments>http://www.phpmagicbook.com/protect-hotlink-the-right-way-using-htaccess/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 00:27:51 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[htaccess]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[hotlinking]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=505</guid>
		<description><![CDATA[Protect hotlinking the right way. There are content stealers out there who will copy your links and images and display them at their websites in result of which you pay more for bandwidth. If you do not do it the right way, you can block google and feedburner also. Here is a code to do [...]<p><a href="http://www.phpmagicbook.com/protect-hotlink-the-right-way-using-htaccess/">Protect Hotlink the Right Way Using htaccess</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Protect hotlinking the right way. There are content stealers out there who will copy your links and images and display them at their websites in result of which you pay more for bandwidth. If you do not do it the right way, you can block google and feedburner also. Here is a code to do it the right way. Any incoming direct request for your image file, zip file or rar will will display your specified image instead of that.</p>
<p><span id="more-505"></span></p>
<p>Add this code into your .htaccess file and make sure you change &#8216;yoursitename&#8217; there.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Options +FollowSymlinks
# Protect Hotlinking
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+.)?yoursitename.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www.)?google.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www.)?feedburner.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www.)?feeds2.feedburner.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*.(jpe?g|gif|bmp|png|zip|rar)$ http://yoursitename.com/someimage.jpg [L]</pre></div></div>

<p><a href="http://www.phpmagicbook.com/protect-hotlink-the-right-way-using-htaccess/">Protect Hotlink the Right Way Using htaccess</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/allow-htaccess-and-mod-rewrite-in-wamp/" title="Allow htaccess and Mod Rewrite in Wamp">Allow htaccess and Mod Rewrite in Wamp</a></li><li><a href="http://www.phpmagicbook.com/htaccess-essential-tricks-for-blog-website-performance-a-guide/" title=".htaccess Essential Tricks For Blog/Website Performance &#8211; Guide">.htaccess Essential Tricks For Blog/Website Performance &#8211; Guide</a></li><li><a href="http://www.phpmagicbook.com/redirect-wordpress-rss-feeds-to-feedburner/" title="Redirect WordPress RSS Feeds to Feedburner">Redirect WordPress RSS Feeds to Feedburner</a></li><li><a href="http://www.phpmagicbook.com/force-file-download-do-not-display-open-in-browser/" title="Force File download Using PHP &#8211; Do Not Display Open In Browser onclick">Force File download Using PHP &#8211; Do Not Display Open In Browser onclick</a></li><li><a href="http://www.phpmagicbook.com/dothtaccess-hacks/" title="Essential DotHtaccess Hacks">Essential DotHtaccess Hacks</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/protect-hotlink-the-right-way-using-htaccess/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hide Ads from Admin at Blog</title>
		<link>http://www.phpmagicbook.com/hide-ads-from-admin-at-blog/</link>
		<comments>http://www.phpmagicbook.com/hide-ads-from-admin-at-blog/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 21:01:38 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=504</guid>
		<description><![CDATA[You can trace which user is logged in. Users at WordPress have levels for access. Admin access level is 10. You can simply trace if the admin is logged in and hide ads from your blog so that admin may not see ads. If you are admin of a blog and post a lot then [...]<p><a href="http://www.phpmagicbook.com/hide-ads-from-admin-at-blog/">Hide Ads from Admin at Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>You can trace which user is logged in. Users at WordPress have levels for access. Admin access level is 10. You can simply trace if the admin is logged in and hide ads from your blog so that admin may not see ads. If you are admin of a blog and post a lot then its a chance that you submit impressions for ads by yourself while checking your posts after publishing. More impressions but less click = less earnings. Hide your ads from you. You definitely don&#8217;t want to click your own ads, for sure. That&#8217;s why it is useful to hide your own ads from you to reduce load time + avoid impressions you do not want + more earnings.</p>
<p><span id="more-504"></span></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">;</span>
get_currentuserinfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_level</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Welcome, Admin'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Welcome!'</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>OR</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$current_user</span><span style="color: #339933;">;</span> 
get_currentuserinfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$current_user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">user_level</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  Admin Stuff here (leave blank)
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
  Stuff Seen By Visitors
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p><a href="http://www.phpmagicbook.com/hide-ads-from-admin-at-blog/">Hide Ads from Admin at Blog</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/attach-send-multiple-files/" title="Upload Attach And Send Email Using PHP &#8211; Multiple File Attachments">Upload Attach And Send Email Using PHP &#8211; Multiple File Attachments</a></li><li><a href="http://www.phpmagicbook.com/detecting-database-and-mysql-connections/" title="Detecting Database And MySQL Connections in PHP &#8211; PHP DBConnection">Detecting Database And MySQL Connections in PHP &#8211; PHP DBConnection</a></li><li><a href="http://www.phpmagicbook.com/simple-text-based-hit-counter-for-static-html-pages/" title="Simple Text Based Hit Counter For Static HTML Pages">Simple Text Based Hit Counter For Static HTML Pages</a></li><li><a href="http://www.phpmagicbook.com/display-rss-from-other-websites/" title="Display RSS From Other Websites">Display RSS From Other Websites</a></li><li><a href="http://www.phpmagicbook.com/force-file-download-do-not-display-open-in-browser/" title="Force File download Using PHP &#8211; Do Not Display Open In Browser onclick">Force File download Using PHP &#8211; Do Not Display Open In Browser onclick</a></li><li><a href="http://www.phpmagicbook.com/find-file-path-at-server-using-php/" title="Find File Path At Server Using PHP">Find File Path At Server Using PHP</a></li><li><a href="http://www.phpmagicbook.com/display-the-total-number-of-comments-on-your-wordpress-blog/" title="Display the Total Number of Comments on Your WordPress Blog">Display the Total Number of Comments on Your WordPress Blog</a></li><li><a href="http://www.phpmagicbook.com/flash-php-mailing-form/" title="Flash PHP Mailing Form &#8211; Send Email from Flash Using PHP">Flash PHP Mailing Form &#8211; Send Email from Flash Using PHP</a></li><li><a href="http://www.phpmagicbook.com/php-implode/" title="PHP &#8211; Implode">PHP &#8211; Implode</a></li><li><a href="http://www.phpmagicbook.com/php-file-read/" title="PHP &#8211; File Read">PHP &#8211; File Read</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/hide-ads-from-admin-at-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Change Default WordPress Gravatar in Comments</title>
		<link>http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/</link>
		<comments>http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 20:52:20 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=501</guid>
		<description><![CDATA[If you use a plugin to add avatars to your blog, there might be a setting in the plugin’s options page for choosing the default avatar. If you use WordPress 2.5+, then you probably use a template tag like the following for your avatars. &#60;?php echo get_avatar&#40; $comment, 32 &#41;; ?&#62; You can easily modify [...]<p><a href="http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/">Change Default WordPress Gravatar in Comments</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you use a plugin to add avatars to your blog, there might be a setting in the plugin’s options page for choosing the default avatar. If you use WordPress 2.5+, then you probably use a template tag like the following for your avatars.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">32</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>You can easily modify this code to show a default customized gravatar to appear if the comment author has no gravater to show.</p>
<p><span id="more-501"></span></p>
<p>Just add a comma after the 32 (The pixel size of the image, if you want to change that while you’re at it!), and paste in the URL to your image. e.g.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> get_avatar<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$comment</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">80</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://www.yourblogaddress.com/my-gravatar.jpg'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>Now the comments on your posts will have a much nicer image that draws less attention, promotes recognition of your logo, and as so few blogs have a unique default avatar, it shows your attention to detail.</p>
<p><a href="http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/">Change Default WordPress Gravatar in Comments</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/social-cms-digg-mixx-reddit/" title="Free Social CMS like Digg, Mixx, Reddit">Free Social CMS like Digg, Mixx, Reddit</a></li><li><a href="http://www.phpmagicbook.com/advanced-form-validation-by-message-no-alert-dialogue-box/" title="Advanced Form Validation and Displaying Error Message &#8211; No Alert Dialogue Box">Advanced Form Validation and Displaying Error Message &#8211; No Alert Dialogue Box</a></li><li><a href="http://www.phpmagicbook.com/redirect-wordpress-rss-feeds-to-feedburner/" title="Redirect WordPress RSS Feeds to Feedburner">Redirect WordPress RSS Feeds to Feedburner</a></li><li><a href="http://www.phpmagicbook.com/text-to-image-using-php/" title="Text To Image Using PHP">Text To Image Using PHP</a></li><li><a href="http://www.phpmagicbook.com/input-output/" title="Input Output in PHP">Input Output in PHP</a></li><li><a href="http://www.phpmagicbook.com/upload-file-email-file-restrict/" title="Upload and eMail File Using PHP and Apply Restrictions">Upload and eMail File Using PHP and Apply Restrictions</a></li><li><a href="http://www.phpmagicbook.com/date-object-for-future-or-past-easy-monthwise-or-datewise-records-selection/" title="Date Object For Future or Past &#8211; Easy Monthwise or Datewise Records Selection Using PHP">Date Object For Future or Past &#8211; Easy Monthwise or Datewise Records Selection Using PHP</a></li><li><a href="http://www.phpmagicbook.com/random-single-image-display-on-page-reload/" title="Random Single Image Display On Page Reload Using PHP">Random Single Image Display On Page Reload Using PHP</a></li><li><a href="http://www.phpmagicbook.com/adding-record-in-database/" title="Adding Record In Database Using PHP">Adding Record In Database Using PHP</a></li><li><a href="http://www.phpmagicbook.com/display-images-from-folder/" title="Auto Display Images From Folder Using PHP">Auto Display Images From Folder Using PHP</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Only Allow Your IP to Access Website or Blog Admin</title>
		<link>http://www.phpmagicbook.com/only-allow-your-ip-to-access-website-or-blog-admin/</link>
		<comments>http://www.phpmagicbook.com/only-allow-your-ip-to-access-website-or-blog-admin/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 20:35:57 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=503</guid>
		<description><![CDATA[If you are the only owner of any website or blog and want to protect your admin directory then you can allow that admin directory for just your IP and deny from all others. Here it is how. # just allow my computer and my IP to access admin of this site order deny,allow deny [...]<p><a href="http://www.phpmagicbook.com/only-allow-your-ip-to-access-website-or-blog-admin/">Only Allow Your IP to Access Website or Blog Admin</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you are the only owner of any website or blog and want to protect your admin directory then you can allow that admin directory for just your IP and deny from all others. Here it is how.</p>
<p><span id="more-503"></span></p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"># just allow my computer and my IP to access admin of this site
order deny,allow
deny from all
allow from xxx.xx.x.xxx</pre></div></div>

<p>Where xxxxx digits will contain your IP address. This example will work if you use a static IP. You can check your IP from <a rel="nofollow" target="_blank" href="http://www.techmynd.com/tools/ip-address-locator.php">here</a>.</p>
<p><a href="http://www.phpmagicbook.com/only-allow-your-ip-to-access-website-or-blog-admin/">Only Allow Your IP to Access Website or Blog Admin</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/php-voting-scripts/" title="PHP Voting Scripts Download">PHP Voting Scripts Download</a></li><li><a href="http://www.phpmagicbook.com/change-default-wordpress-gravatar-in-comments/" title="Change Default WordPress Gravatar in Comments">Change Default WordPress Gravatar in Comments</a></li><li><a href="http://www.phpmagicbook.com/php-file-read/" title="PHP &#8211; File Read">PHP &#8211; File Read</a></li><li><a href="http://www.phpmagicbook.com/open-source-small-forum/" title="Open Source PHP Based Great Forum &#8211; PHPBB Alternative">Open Source PHP Based Great Forum &#8211; PHPBB Alternative</a></li><li><a href="http://www.phpmagicbook.com/phone-number-email-validation/" title="Phone Number And Email Validation Update">Phone Number And Email Validation Update</a></li><li><a href="http://www.phpmagicbook.com/php-flash-based-text-hit-counter/" title="PHP Flash Based Text Hit Counter &#8211; Flash Based Hit Counter Using PHP">PHP Flash Based Text Hit Counter &#8211; Flash Based Hit Counter Using PHP</a></li><li><a href="http://www.phpmagicbook.com/random-single-image-display-on-page-reload/" title="Random Single Image Display On Page Reload Using PHP">Random Single Image Display On Page Reload Using PHP</a></li><li><a href="http://www.phpmagicbook.com/tell-a-friend-php-referrer-recommend-site-script/" title="Tell A Friend PHP Referrer &#8211; Recommend Site Script">Tell A Friend PHP Referrer &#8211; Recommend Site Script</a></li><li><a href="http://www.phpmagicbook.com/define-variable-in-php/" title="Define Variable In PHP">Define Variable In PHP</a></li><li><a href="http://www.phpmagicbook.com/image-upload-rename-apply-restrictions/" title="Image Upload, Rename and Apply Restrictions Using PHP">Image Upload, Rename and Apply Restrictions Using PHP</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/only-allow-your-ip-to-access-website-or-blog-admin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hide WordPress WP-Admin Login Page</title>
		<link>http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/</link>
		<comments>http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/#comments</comments>
		<pubDate>Sun, 20 Dec 2009 20:20:05 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.phpmagicbook.com/?p=502</guid>
		<description><![CDATA[Here is a code which you can use to hide your wp-admin screen. Change YOURSECRETWORDHERE to something else. It can be any word you want. Just make sure it&#8217;s unique and somewhat long. Make it, like, your pets name or something random. Change ADMINFOLDER to the new folder name you want. Letters, numbers, underscores, and [...]<p><a href="http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/">Hide WordPress WP-Admin Login Page</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
]]></description>
			<content:encoded><![CDATA[<p>Here is a code which you can use to hide your wp-admin screen. Change YOURSECRETWORDHERE to something else. It can be any word you want. Just make sure it&#8217;s unique and somewhat long. Make it, like, your pets name or something random. Change ADMINFOLDER to the new folder name you want. Letters, numbers, underscores, and dashes only. That ^ in front of it is on purpose. Don&#8217;t delete that. Back up your original .htaccess file before making any changes. I am not responsible for any mess up.</p>
<p><span id="more-502"></span></p>
<p><4>.htaccess Code</h4>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">RewriteEngine On
RewriteBase / 
##### ABOVE THIS POINT IS ALREADY INSERTED BY WORD PRESS
##### Michi’s code is BELOW #####
RewriteCond %{REQUEST_URI} wp-admin/
RewriteCond %{QUERY_STRING} !YOURSECRETWORDHERE
RewriteRule .*.php [F,L]
RewriteCond %{QUERY_STRING} !YOURSECRETWORDHERE
RewriteRule ^ADMINFOLDER/(.*) wp-admin/$1?%{QUERY_STRING}&amp;YOURSECRETWORDHERE [L]
##### Michi’s code is ABOVE #####
##### BELOW THIS POINT IS ALREADY INSERTED BY WORD PRESS
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</pre></div></div>

<p><a href="http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/">Hide WordPress WP-Admin Login Page</a> is a post from: <a href="http://www.phpmagicbook.com">PHP Magic Book - Free PHP Scripts, Tutorials and Downloads</a></p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li><a href="http://www.phpmagicbook.com/php-custom-search-for-static-website/" title="PHP Custom Search For Static Website">PHP Custom Search For Static Website</a></li><li><a href="http://www.phpmagicbook.com/using-external-javascript-files/" title="Using External Javascript Files">Using External Javascript Files</a></li><li><a href="http://www.phpmagicbook.com/header-redirect-location/" title="Header Redirect Location in PHP">Header Redirect Location in PHP</a></li><li><a href="http://www.phpmagicbook.com/php-file-read/" title="PHP &#8211; File Read">PHP &#8211; File Read</a></li><li><a href="http://www.phpmagicbook.com/htaccess-mod-rewrite-practical-essential-important-solutions-update/" title="Htaccess Mod Rewrite Practical Essential Important Solutions &#8211; Update">Htaccess Mod Rewrite Practical Essential Important Solutions &#8211; Update</a></li><li><a href="http://www.phpmagicbook.com/protect-hotlink-the-right-way-using-htaccess/" title="Protect Hotlink the Right Way Using htaccess">Protect Hotlink the Right Way Using htaccess</a></li><li><a href="http://www.phpmagicbook.com/random-number-verification-simple-form-authentication/" title="Random Number Verification &#8211; Simple Form Authentication Using PHP">Random Number Verification &#8211; Simple Form Authentication Using PHP</a></li><li><a href="http://www.phpmagicbook.com/php-creating-a-file/" title="Creating A File Using PHP">Creating A File Using PHP</a></li><li><a href="http://www.phpmagicbook.com/change-prosilver-header-logo-phpbb/" title="Change Prosilver Header and Logo in PHPBB &#8211; Working Solution">Change Prosilver Header and Logo in PHPBB &#8211; Working Solution</a></li><li><a href="http://www.phpmagicbook.com/how-to-setup-vhosts-on-xamp/" title="How to Setup VHOSTS on Xamp">How to Setup VHOSTS on Xamp</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.phpmagicbook.com/hide-wordpress-wp-admin-login-page/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 3.834 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-03 09:11:39 -->
