<?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>NPSites.com &#187; Web Design</title>
	<atom:link href="http://www.npsites.com/category/howtos/web-design/feed" rel="self" type="application/rss+xml" />
	<link>http://www.npsites.com</link>
	<description>NPSites.com</description>
	<lastBuildDate>Wed, 25 Jan 2012 00:38:02 +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>Finding Your Current Directory With PHP</title>
		<link>http://www.npsites.com/37/finding-your-current-directory-with-php.html</link>
		<comments>http://www.npsites.com/37/finding-your-current-directory-with-php.html#comments</comments>
		<pubDate>Fri, 02 Jan 2009 05:49:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://htmlguide.npsites.com/?p=37</guid>
		<description><![CDATA[There are times when you are moving to a new host or just when you need to examine where the file you uploaded is located relative to your website. To do this you can use the PHP command getcwd() this will retreive the Current Working Directory or the location of the file that is being [...]]]></description>
			<content:encoded><![CDATA[<p>There are times when you are moving to a new host or just when you need to examine where the file you uploaded is located relative to your website.</p>
<p>To do this you can use the PHP command getcwd() this will retreive the Current Working Directory or the location of the file that is being executed.</p>
<p>Simply make a new text file named whereami.php</p>
<div id="excodebox">&lt;?php<br />
echo &#8220;you are here&#8221; . &#8220;n&#8221;;<br />
echo getcwd() . &#8220;n&#8221;;<br />
?&gt;</div>
<p>Upload this file to the directory that you need to get the path to and load it in your browser.</p>
<p>You should remove the file after it is no longer needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npsites.com/37/finding-your-current-directory-with-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo &#8211; Selecting The PHP Version</title>
		<link>http://www.npsites.com/49/howto-selecting-the-php-version.html</link>
		<comments>http://www.npsites.com/49/howto-selecting-the-php-version.html#comments</comments>
		<pubDate>Thu, 15 Jan 2009 15:30:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://htmlguide.npsites.com/?p=49</guid>
		<description><![CDATA[PHP is a Server Side programming language that you can use to develop Internet applications.Some applications will still work best with PHP Version 4 but because not all of the new options are available you will have to make a choice how your scripts are executed For Customers with access to both PHP 4.x and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-81" title="php" src="http://www.npsites.com/npsblog/wp-content/uploads/2009/01/php.jpg" alt="php" width="100" height="35" />PHP is a Server Side programming language that you can use to develop Internet applications.Some applications will still work best with PHP Version 4 but because not all of the new options are available you will have to make a choice how your scripts are executed</p>
<p>For Customers with access to both PHP 4.x and 5.x the easiest way to select the processing of your script is to modify the file extension to match the version of PHP that you need to run.</p>
<p>file.php4 will execute PHP version 4.x<br />
file.php5 will execute PHP version 5.x<br />
file.php will execute the default version of PHP</p>
<p>To find out which version of PHP is your default Version place the following lines of text in a file and upload it to your account.</p>
<p><strong>&lt;?php // Show all information, defaults to INFO_ALL<br />
phpinfo();<br />
// Show just the module information.<br />
// phpinfo(8) yields identical results.<br />
phpinfo(INFO_MODULES);<br />
?&gt;</strong></p>
<p>PHP will run phpinfo and provide you with the default version.<br />
To see the options for other versions rename the file extension.</p>
<p>If you need to override the default version of PHP running your scripts<br />
you can place a .htaccess file in your directory with the following line</p>
<p><strong>AddHandler application/x-httpd-php5 .php</strong></p>
<p>This tells the server to process all files with the .php extension with PHP version 5</p>
<h2>Setting The Default PHP version in cPanel</h2>
<p>Although you may already know this if you are using cPanel or another control panel you can set the default php version for your site and then override it with htaccess files in directories that scripts need other versions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npsites.com/49/howto-selecting-the-php-version.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo &#8211; Understanding Amazon Browse Nodes</title>
		<link>http://www.npsites.com/96/howto-understanding-amazon-browse-nodes.html</link>
		<comments>http://www.npsites.com/96/howto-understanding-amazon-browse-nodes.html#comments</comments>
		<pubDate>Mon, 02 Feb 2009 22:26:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.npsites.com/?p=96</guid>
		<description><![CDATA[If you run an Amazon Store from a script then you should make use of Browse Nodes to retrieve your content from their directory. Browse Nodes are how Amazon sorts their products. They are assigned IDs to categories within their database. The worst thing about working with Amazon&#8217;s Database is that they don&#8217;t seem to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-67" title="amazon_logo" src="http://www.npsites.com/npsblog/wp-content/uploads/2009/01/amazon_logo.jpg" alt="amazon_logo" width="204" height="52" />If you run an Amazon Store from a script then you should make use of Browse Nodes to retrieve your content from their directory.</p>
<p>Browse Nodes are how Amazon sorts their products. They are assigned IDs to categories within their database.</p>
<p>The worst thing about working with Amazon&#8217;s Database is that they don&#8217;t seem to have a grip on sorting items within their database by type. Its like going into your local department store and finding they put the baby food in with the garden tools. Not all of the Baby food, something you could count on day after day, just the stewed carrots&#8230; or sometimes the mashed pears.</p>
<p>Often what you want returned even if you go by their standard is accompanied with products that are way outside of the topic you are searching. This could be because they want to cross market products but it could also be because the initial input of products in different categories is managed poorly.</p>
<p>Anyway what you are left with is grabbing their feed with their api and sifting through the categories the best you can.</p>
<p>If you were to look up BrowseNodeId=1 which is Arts And Photography Books you would find it is  a parent category for about 18 other categories such as BrowseNodeId=1876 which is Art Books on Painting.  Under Painting Art Books you would find another group of nodes including BrowseNodeId=171126 which is Art Books on Oil Painting.</p>
<p>As you can see the organization of the numbers has no meaning.</p>
<p>And because Amazon has something like 120,000 nodes just for the USA and many others used only on its international sites Japan Canada Germany, the likely hood of them getting around to sorting them anytime soon is pretty low.</p>
<p>There useto be a pretty decent listing of the most popular Browse Nodes and a few sites that allowed searching of terms to find correct Node Numbers but as they have changed their API and moved to XML feeds the reliability of hard-coding the children of any parent is not very good.</p>
<p><strong>So, what can you do?</strong></p>
<p>First you can simply go to amazon and review their directory structure.</p>
<p>If you have a browse node ID, you can find the name of the browse node by putting                 the ID into one of the following URLs, depending on the locale:</p>
<div class="itemizedlist">
<ul type="disc">
<li>http://www.amazon.com/exec/obidos/tg/browse/-/[Browse Node ID]</li>
<li>http://www.amazon.com.ca/exec/obidos/tg/browse/-/[Browse Node ID]</li>
<li>http://www.amazon.com.uk/exec/obidos/tg/browse/-/[Browse Node ID]</li>
<li>http://www.amazon.com.fr/exec/obidos/tg/browse/-/[Browse Node ID]</li>
<li>http://www.amazon.com.de/exec/obidos/tg/browse/-/[Browse Node ID]</li>
<li>http://www.amazon.com.co.jp/exec/obidos/tg/browse/-/[Browse Node                     ID]</li>
</ul>
</div>
<p>Your store should have access to most if not all (98%) of the same data that Amazon uses for their own site.</p>
<p>You can also make use of older Browse Node Listings. . They don&#8217;t change a lot but you should check them. Use these nodes to grab the parent node and then within your script read in the children.</p>
<ul>
<li><a href="http://docs.amazonwebservices.com/AWSEcommerceService/2005-03-23/ApiReference/USSortValuesArticle.html">Amazon.com (US) Sort Values</a></li>
<li><a href="http://docs.amazonwebservices.com/AWSEcommerceService/2005-03-23/ApiReference/DESortValuesArticle.html">Amazon.de (DE) Sort Values</a></li>
<li><a href="http://docs.amazonwebservices.com/AWSEcommerceService/2005-03-23/ApiReference/JPSortValuesArticle.html">Amazon.co.jp (JP) Sort Values</a></li>
<li><a href="http://docs.amazonwebservices.com/AWSEcommerceService/2005-03-23/ApiReference/UKSortValuesArticle.html">Amazon.co.uk (UK) Sort Values</a></li>
<li><a href="http://docs.amazonwebservices.com/AWSEcommerceService/2005-03-23/ApiReference/FRSortValuesArticle.html">Amazon.fr (FR) Sort Values</a></li>
<li><a href="http://docs.amazonwebservices.com/AWSEcommerceService/2005-03-23/ApiReference/CASortValuesArticle.html">Amazon.ca (CA) Sort Values</a></li>
</ul>
<p>You can also make use of Amazons Developer Help Site.</p>
<p>http://aws.amazon.com/</p>
<p>And their user Form</p>
<p>http://developer.amazonwebservices.com/connect/forumindex.jspa</p>
<p>It is really more or less a self help site where other users help when they know something but most of the time you can get a good answer.</p>
<p><strong>Review</strong><br />
Remember that browse nodes are not constant and they can change from time to time without notice. For the most part you will see additions but there are always deletions too.</p>
<p>Write your code to make use of the Amazon API to retrieve the children and parent nodes.</p>
<p>Let your code read in the feed and your visitors to drill down and navigate dynamically.</p>
<p>Review Amazons own store if you need special nodes when building a specialty site.</p>
<p>Use Amazons sample code to understand the API.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npsites.com/96/howto-understanding-amazon-browse-nodes.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo &#8211; Using Browsershots.com To Check Your Site</title>
		<link>http://www.npsites.com/97/howto-using-browsershotscom-to-check-your-site.html</link>
		<comments>http://www.npsites.com/97/howto-using-browsershotscom-to-check-your-site.html#comments</comments>
		<pubDate>Mon, 02 Feb 2009 23:11:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.npsites.com/?p=97</guid>
		<description><![CDATA[As designers we often have customers with specific demands and although we do our best to provide cross browser compatibility there are so many browsers and platforms and versions that it can be difficult to get everything perfect. Well to help Browsershots.com has set up a series of computers with different browsers and they will [...]]]></description>
			<content:encoded><![CDATA[<p>As designers we often have customers with specific demands and although we do our best to provide cross browser compatibility there are so many browsers and platforms and versions that it can be difficult to get everything perfect.</p>
<p>Well to help Browsershots.com has set up a series of computers with different browsers and they will view your site and take an actual screen shot of your layout.</p>
<p>Doing this you can guess is processor intensive so remember to click an ad or give them a sponsor if you can.</p>
<p><strong>How Does It Work?</strong></p>
<p>Simply visit <a href="http://www.browsershots.com " target="_blank">www.browsershots.com </a>put in your url and select the browsers that you want screenshots from.</p>
<p>You should really limit your selection to about 5 or 6 browsers to cut them a break on load.</p>
<p>The service will que your website and generate the screenshots which can take 20 minutes or so and then you come back to the page and view the results.</p>
<p>Remember to save your images so you don&#8217;t need to regenerate.</p>
<p>This is really nice especially if your client uses SeaMonkey 1.1 browser because they think its really cool but you don&#8217;t have the resources or need to install 25 different browsers on your test machine.</p>
<p>And the neet thing is if you have a bunch of old computers you can setup your own browsershots server because they give you the source.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npsites.com/97/howto-using-browsershotscom-to-check-your-site.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo &#8211; Setting Up Your Site To Allow Downloads To Your PCS Vision Phone</title>
		<link>http://www.npsites.com/109/howto-setting-up-your-site-to-allow-downloads-to-your-pcs-vision-phone.html</link>
		<comments>http://www.npsites.com/109/howto-setting-up-your-site-to-allow-downloads-to-your-pcs-vision-phone.html#comments</comments>
		<pubDate>Fri, 06 Feb 2009 14:34:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.npsites.com/?p=109</guid>
		<description><![CDATA[A friend of mine had a Samsung phone that he wanted to use to grab content from his website. The setup is pretty easy with only a couple edits of your .htaccess file to include mimetypes once done you setup your phone to access a directory on your server set aside for the content you [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of mine had a Samsung phone that he wanted to use to grab content from his website.</p>
<p>The setup is pretty easy with only a couple edits of your .htaccess file to include mimetypes once done you setup your phone to access a directory on your server set aside for the content you want to download like images or midi files.</p>
<p>First make a directory on your website named phone or something else creative.</p>
<p>Open a text editor and make a <strong>.htaccess</strong> file for uploading to that directory.<br />
You may need to name it htaccess.txt and rename it once it is uploaded.</p>
<p>in this file place</p>
<p><code>AddType text/x-pcs-gcd gcd</code></p>
<p>Since the phone can not directly access files you will need to <strong>make a .gcd file for each item</strong> in the directory that you want to access and place them  in the /phone/ directory.</p>
<p>a .gcd file has a format like this</p>
<p><code>Content-Type: </code><code>image/jpeg</code><br />
<code> Content-Name: flower<br />
Content-Version: 1.0<br />
Content-Vendor: ARB<br />
Content-URL:  http://yourWebSite/phone/flower.jpg<br />
Content-Size: 12000</code></p>
<p><strong>Name the file flower.gcd</strong></p>
<p>Do the same for each file you want access to but change the Content-Type and other information to match the file you want to download.</p>
<p><strong>Available types include</strong><br />
<code>MID: audio/midi<br />
JPG: image/jpeg<br />
TXT: text/plain<br />
QCP: audio/vnd.qcelp<br />
JAD: text/vnd.sun.j2me.app-descriptor<br />
JAR: application/java-archive<br />
PNG: image/png<br />
PMD: application/x-pmd<br />
WBMP: image/vnd.wap.wbmp</code></p>
<p>Note do not use underscores _ in your file names or you will endup with errors.</p>
<p><strong>Now you need to set your phone up to access the directory on your server.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npsites.com/109/howto-setting-up-your-site-to-allow-downloads-to-your-pcs-vision-phone.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo &#8211; PHPXref To Help Document Your PHP Project</title>
		<link>http://www.npsites.com/105/howto-phpxref-to-help-document-your-php-project.html</link>
		<comments>http://www.npsites.com/105/howto-phpxref-to-help-document-your-php-project.html#comments</comments>
		<pubDate>Fri, 06 Feb 2009 15:40:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.npsites.com/?p=105</guid>
		<description><![CDATA[PHPXref is a Perl application that helps you document a large php project. By Large that means scripts that require more then a couple pages and files of code. Because it is so simple to use you could probably download it and get it working before you can read the rest of this article but [...]]]></description>
			<content:encoded><![CDATA[<p>PHPXref is a Perl application that helps you document a large php project.</p>
<p>By Large that means scripts that require more then a couple pages and files of code.</p>
<p>Because it is so simple to use you could probably download it and get it working before you can read the rest of this article but lets cover what you need.</p>
<p>You need Perl and this can be on Windows Linux or whatever</p>
<p>and you need a web browser that has JavaScript enabled.</p>
<p>The resulting pages generated are in plain HTML so you don&#8217;t have to worry about transfering the info to a friend or taking it with you on the road.</p>
<p><strong>What does it do?</strong></p>
<p>PHPXref will read your project files and then make comments that are presented along with the original code. Pretty much this is a way to introduce new people to the code and reference any additions.</p>
<p>To find more info visit the project site at<br />
<a href="http://phpxref.sourceforge.net/" target="_blank">http://phpxref.sourceforge.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npsites.com/105/howto-phpxref-to-help-document-your-php-project.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo &#8211; Using Includes To Divide PHP Pages Into Manageable Sections</title>
		<link>http://www.npsites.com/113/howto-using-includes-to-divide-php-pages-into-manageable-sections.html</link>
		<comments>http://www.npsites.com/113/howto-using-includes-to-divide-php-pages-into-manageable-sections.html#comments</comments>
		<pubDate>Sat, 07 Feb 2009 17:35:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.npsites.com/?p=113</guid>
		<description><![CDATA[When designing your website it is a great idea to turn your template design into manageable sections by separating your header, footer, sidebars and maybe menus or other constant areas. The idea is that headers and footers will not often change. The same is true for sidebars that often have the same content across your [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-81" title="php" src="http://www.npsites.com/npsblog/wp-content/uploads/2009/01/php.jpg" alt="php" width="100" height="35" />When designing your website it is a great idea to turn your template design into manageable sections by separating your header, footer, sidebars and maybe menus or other constant areas.</p>
<p>The idea is that headers and footers will not often change.</p>
<p>The same is true for sidebars that often have the same content across your site&#8230; maybe a search box and a couple ads or a link to a script that shows content on all pages of your site.</p>
<p>Site Wide Menus if you are generating them manually will need to be updated every time you add a page to the site and editing one menu.php file instead of every page on your site when you add a new page to the menu is a lot easier.</p>
<p>Context menus are different if they are only used on a few pages or if they are use in categories. In this case you may want to make a context menu for each category of pages that you have.</p>
<p>Anyway the idea is to create a skeleton template that you will use for adding new pages to your site and within that template you will only put content specific to that page.</p>
<p>You will then include these other files to display your header footer menus and sidebars.</p>
<p>an example might look something like this (and yea we&#8217;re going to use tables for ease of idea)</p>
<p><strong>Page Skeleton page.php</strong></p>
<p>&lt;Doctype&gt;<br />
&lt;html&gt;&lt;head&gt;&lt;title&gt;mypage&lt;/title&gt;&lt;/head&gt;<br />
&lt;table&gt;<br />
&lt;tr&gt;&lt;td&gt;&lt;?php include=(/includes/header.php);&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;&lt;?php include=(/includes/leftsidebar.php);&gt;&lt;/td&gt;<br />
&lt;td&gt; your content would be here &lt;/td&gt;&lt;/tr&gt;<br />
&lt;tr&gt;&lt;td&gt;&lt;?php include=(/includes/footer.php);&gt;&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;<br />
&lt;/body&gt;&lt;/html&gt;</p>
<p><strong>header.php</strong></p>
<p>&lt;table&gt;<br />
&lt;tr&gt;&lt;td&gt;&lt;img src=&#8221;logo.jpg&#8221;&gt;&lt;/td&gt;&lt;td&gt;SearchBox&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;</p>
<p><strong>sidebar.php</strong></p>
<p>&lt;table&gt;&lt;tr&gt;<br />
&lt;td width=&#8221;160&#8243;&gt;<br />
&lt;searchbox code&gt;<br />
MENU<br />
&lt;a link&gt;page1&lt;/a&gt;&lt;br /&gt;<br />
&lt;a link&gt;page2&lt;/a&gt;&lt;br /&gt;<br />
&lt;a link&gt;page3&lt;/a&gt;&lt;br /&gt;<br />
&lt;a link&gt;page4&lt;/a&gt;&lt;br /&gt;<br />
&lt;adbanner code&gt;<br />
&lt;/td&gt;&lt;/tr&gt;<br />
&lt;/table&gt;</p>
<p><strong>This is the basic concept split the page into sections that you can modify independently then assemble the viewable pages by using includes inside a skeleton page.</strong></p>
<p>Your use will probably differ in layout and it will take some trial and error to get everything looking right.<strong><br />
</strong></p>
<p><strong>Note</strong><br />
It is always better to use a file based include instead of a http based one because even though the files are local to your server they will count against your traffic. Some hosts even restrict includes over http.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npsites.com/113/howto-using-includes-to-divide-php-pages-into-manageable-sections.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo &#8211; Adding A Site Wide Config File For Your PHP Pages</title>
		<link>http://www.npsites.com/112/howto-adding-a-site-wide-config-file-for-your-php-pages.html</link>
		<comments>http://www.npsites.com/112/howto-adding-a-site-wide-config-file-for-your-php-pages.html#comments</comments>
		<pubDate>Sun, 08 Feb 2009 16:01:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.npsites.com/?p=112</guid>
		<description><![CDATA[When you are developing a PHP based website there are many times when you end up repeating yourself for various simple things. A config file that is linked to in the header area of your php files can help you use shortcuts and also reduce the time it takes to make changes if you move [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-81" title="php" src="http://www.npsites.com/npsblog/wp-content/uploads/2009/01/php.jpg" alt="php" width="100" height="35" />When you are developing a PHP based website there are many times when you end up repeating yourself for various simple things.</p>
<p>A config file that is linked to in the header area of your php files can help you use shortcuts and also reduce the time it takes to make changes if you move your site or if you want to reuse your code for other projects.</p>
<p>This is a little different then setting up a functions file which will hold code snippets the basic idea is to set your vars and then refer to them in shorthand.</p>
<p>For instance in your config.php file you might put</p>
<p>$basepath = &#8216;/user/public_html/folder/&#8217;;<br />
$siteurl = &#8216;http://www.yoursite.com&#8217; ;<br />
$imgdir = &#8216;http://www.yoursite.com/images&#8217; ;<br />
$sitename = &#8220;jimmy&#8217;s sausage site&#8221;;<br />
$contactemail = &#8216;jimmy@sausageworld.com&#8217;;</p>
<p>then to use them in your files you simply include the config.php file at the top of any php file that you want to use it in like this.</p>
<p>&lt;?php include(&#8220;config.php&#8221;); ?&gt;</p>
<p>and use them like this</p>
<p>&lt;img src=&lt;?php echo &#8220;$imgdir&#8221;; ?&gt;/sausage.jpg&gt;</p>
<p>Now yes in some cases hard coding the info may be faster then adding in the php echo but if you want to change the location of your image directory all you need to do is make the directory on your server and edit your config.php file and everything will be working in just a couple seconds vs search and replace strings through out your site hoping that you got the string replace right.</p>
<p><strong>Other Note</strong></p>
<p>Some coders like to call this file a config.inc as a include file this is fine too.</p>
<p>The way you use this file is up to you.</p>
<p>you can get very creative and provide yourself site wide control through this one file but it does take some pre-planning and trial and error to get the file optimized for each site or application.</p>
<p>If you would like to reuse code within your scripts it is best to place that in a seperate functions.php file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.npsites.com/112/howto-adding-a-site-wide-config-file-for-your-php-pages.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColorMixers.Com Color Picker Pallet</title>
		<link>http://www.npsites.com/141/colormixerscom-color-picker-pallet.html</link>
		<comments>http://www.npsites.com/141/colormixerscom-color-picker-pallet.html#comments</comments>
		<pubDate>Sat, 28 Feb 2009 16:38:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Multimedia / Graphics]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.npsites.com/?p=141</guid>
		<description><![CDATA[When laying out your site you can sometimes get lost when it comes to choosing colors that match. ColorMixers provides an easy way to generate a relative pallet of colors based on a single base color. The process is pretty simple either enter the RGB values or use the slider to set the base color [...]]]></description>
			<content:encoded><![CDATA[<p>When laying out your site you can sometimes get lost when it comes to choosing colors that match.</p>
<p>ColorMixers provides an easy way to generate a relative pallet of colors based on a single base color.</p>
<p>The process is pretty simple either enter the RGB values or use the slider to set the base color and then 9 relative colors will be generated. The process is not always perfect or useful but it does give you a quick idea of how other colors relate to a base color.</p>
<p>When you complete your color selection you can save the url to the pallet you generated or you can export the values to Photoshop and Adobe Illustrator. You can also select export to text and a page of values will be provided for all of the color swatches you generated.</p>
<p>Colors will be saved showing RGB, HTML Hex Values and CMYK. CMYK is a printer value and probably not useful unless you are using the colors for desktop publishing and professional printing.</p>
<p>The colormixers website is difficult to navigate and since the main feature is the color tool they need to provide a direct link to it in their menu. Not doing so is really pretty lame so don&#8217;t get lost on the site.</p>
<p>Visit ColorMixers website<br />
<a href="http://colormixers.com/mixers/cmr/" target="_blank">http://colormixers.com/mixers/cmr/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npsites.com/141/colormixerscom-color-picker-pallet.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Thumbnailer Class v2.0</title>
		<link>http://www.npsites.com/147/php-thumbnailer-class-v20.html</link>
		<comments>http://www.npsites.com/147/php-thumbnailer-class-v20.html#comments</comments>
		<pubDate>Wed, 04 Mar 2009 17:33:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Multimedia / Graphics]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.npsites.com/?p=147</guid>
		<description><![CDATA[PHP Thumbnailer Class v2.0 A PHP image manipulation class, aimed at generating thumbnails. It features the ability to resize by width, height, and percentage, create custom crops, or square crops from the center, rotate the image, and create AppleTM-style reflections. It also features the ability to perform multiple manipulations per instance (also known as chaining), [...]]]></description>
			<content:encoded><![CDATA[<h3><strong><img class="alignright size-full wp-image-81" title="php" src="http://www.npsites.com/npsblog/wp-content/uploads/2009/01/php.jpg" alt="php" width="100" height="35" />PHP Thumbnailer Class v2.0</strong></h3>
<p>A PHP image manipulation class, aimed at generating thumbnails. It features the ability to resize by width, height, and percentage, create custom crops, or square crops from the center, rotate the image, and create Apple<sup>TM</sup>-style reflections. It also features the ability to perform multiple manipulations per instance (also known as chaining), without the need to save and re-initialize the class with every manipulation.</p>
<p>This class comes in both PHP 4 and 5 flavors</p>
<ul>
<li>You can now create custom crops, as well as square crops from the center of the image</li>
<li>You can also rotate the image clock-wise or counter clock-wise in 90° increments</li>
<li>You can now create those fancy Apple™-style reflections that are all the rage with the cool “web 2.0″ kids!</li>
</ul>
<p>For the uninitiated, the class still contains it’s old features:</p>
<ul>
<li>Works with gif,jpg, and png images</li>
<li>Ability to resize by percentage, width, or height</li>
<li>Ability to set quality of jpg images (0-100%)</li>
<li>Ability to perform multiple manipulations and saves without re-initializing class, or reloading original image</li>
<li>Ability to display manipulated image on the fly, enabling dynamic image generation in your scripts</li>
</ul>
<p><a href="http://www.gen-x-design.com/projects/php-thumbnailer-class/" target="_blank">http://www.gen-x-design.com/projects/php-thumbnailer-class/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.npsites.com/147/php-thumbnailer-class-v20.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
