AMBER!!! Image Map
Is your site a real pain because you have to change every page when you make a new layout? Or do you want to skin your site but it's in iframes and you think they're the easiest? You are so wrong there. Because believe me, php includes are the easiest in the world for me. Basically its when you have a header and a footer and an index.php. You add the header code and footer code on every page and thats it. All the pages are like the index.php. So when you want a new layout, you can just change the header and foter and voila! Done!


NOTE: This is NOT skinning. I haven't made a tutorial for that yet.


Firstly, code your layout how you would do on an everyday basis. Say you're coding a div layout. For example: My layout.


<html> <head> <title>V A N I L L A ~ S P L A S H</title> <link rel="stylesheet" type="text/css" href="http://yummi.sugar-frosted.net/skins/2/style.css"> </head> <body> <body background=back.bmp> <div id="layout" style="position: absolute; left: 50; top: 50; "> <img border="0" src="http://yummi.sugar-frosted.net/skins/2/laylay.gif" width="1160" height="801"></div> <div id="content" style="position: absolute; left: 827; top: 460; width: 172; height: 329; overflow:auto;"> SIDEBAR! </div> <div id="content" style="position: absolute; left: 407; top: 360; width: 376; height: 435; overflow:auto;"> BLOG!! </div> </body> </html>


Now we have to code this peice into two or more parts! Open your text editing program and paste ONLY the top part of the coding. This will be the top of ALL your pages. So up to the Div code for your blog. But don't add your blog writing YET! So mine would be:


<head> <title>V A N I L L A ~ S P L A S H</title> <link rel="stylesheet" type="text/css" href="http://yummi.sugar-frosted.net/skins/2/style.css"> </head> <body> <body background=back.bmp> <div id="layout" style="position: absolute; left: 50; top: 50; "> <img border="0" src="http://yummi.sugar-frosted.net/skins/2/laylay.gif" width="1160" height="801"></div> <div id="content" style="position: absolute; left: 827; top: 460; width: 172; height: 329; overflow:auto;"> SIDEBAR! </div> <div id="content" style="position: absolute; left: 407; top: 360; width: 376; height: 435; overflow:auto;">


This includes the Head, title, css coding and the layout image. This will be on EVERY page. Save this as header.php.


Get a new page in notepad and copy +paste the rest of the coding of the layout. Mine would be:


BLOG!! </div> </body> </html>


Save this file as footer.php. This will be on the bottom of all your pages. If you wanted to put back and forward links on your pages just pu it on the footer. SO much easier ;D


Now get a new page again and paste this:


< ? include("/home/user/public_html/folder/header.php"); ? > <br> < ? include("/home/user/public_html/folder/footer.php"); ? >


MAKE SURE YOU TAKE OF THE SPACE BEFORE THE QUESTION MARKS IN THE FIRST BIT THEN THE SPACE AFTER THE QUESTION MARK AT THE END. YOU HAVE TO DO THIS!!!
You will have to change USER and FOLDER to your own. For instance if the domain was chocolate and your subdomain was orange then it will be like this:


< ? include("/home/chocolate/public_html/orange/header.php"); ? > <BR> < ? include("/home/chocolate/public_html/orange/footer.php"); ? >


MAKE SURE YOU TAKE OF THE SPACE BEFORE THE QUESTION MARKS IN THE FIRST BIT THEN THE SPACE AFTER THE QUESTION MARK AT THE END. YOU HAVE TO DO THIS!!!
Save this as index.php. Now just upload all of this to your site and test it: http://yourste.com/index.php and it should work! Now on all your pages you just add < ? include("/home/chocolate/public_html/orange/header.php"); ? > on the top and < ? include("/home/chocolate/public_html/orange/footer.php"); ? > at the bottom.
MAKE SURE YOU TAKE OF THE SPACE BEFORE THE QUESTION MARKS IN THE FIRST BIT THEN THE SPACE AFTER THE QUESTION MARK AT THE END. YOU HAVE TO DO THIS!!!

And thats it! It may not work at first but try again and it SHOULD work. Believe me Php includes are SOOOO much easier and help a lot. I hope you have FUN!
|





CHANGE SKIN
Myspace Glitter Graphics, Cartoon Dolls, HQ Doll Makers, Free Downloads, HTML Tutorials & More @ Freewebs.Com/Ferny-Dust