Jump to content
xisto Community
Sign in to follow this  
Waiting

[tutorial] Skinning Your Site a tutorial on how to skin your website

Recommended Posts

For this tutorial you are going to need to know how to use php includes. You are also going to need to rename all o your files to a .php extension.In your FTP or Cpanel make a folder in your public (main) directory and name it "skins". In the skins folder make another folder named "1".In the folder you names skins make a file called cookiecheck.php. Copy the code below and paste it into the cookiecheck.php file.<?$total_skins = 1;$default_skin = 1; if (isset($_REQUEST['newskin'])) { $newskin=(int)$_REQUEST['newskin']; if ( ($newskin<1) OR ($newskin>$total_skins) ) $newskin=$default_skin; } elseif (isset($_REQUEST['skin'])) { $newskin=(int)$skin; if ( ($skin<1) OR ($skin>$total_skins) ) $newskin=$default_skin; } else $newskin=$default_skin; $skin=$newskin; setcookie ('skin', "", time() - 3600); setcookie('skin',$newskin,time()+(86400*365),'/'); setcookie('skin',$newskin,time()+(86400*365),'/','.domain.com); $skin=$newskin; $headervar = "/home/USERNAME/public_html/skins/$newskin/header"; $footervar = "/home/USERNAME/public_html/skins/$newskin/footer"; $extension = ".php";?> This may look confusing but stay with me. Okay at the very top where it says total skins thats how many skins you have, you need to make sure you change the number to the totalt number of skins everytime you add a new skin or else they wont work.Now where it says default skin thats the skin number new visitors will see the first time they come to your site. Change it whatever skin number you want.Now leave everything alone until you get to the bit that says .DOMAIN.COM leave the . (period) infront of it and type your domain name NO TRAILING slash (/)Now below it is very important if you dont get it right the headers and footers wont work. Change the bit where it says USERNAME to your username, if you dont know what your path to file is ask your host or go <a href="http://girlswhogeek.com/forums?showtopic=3583; target=_blank>here</a>Now in the folder you named "1" Upload all the pictures and css plus all your html for your layout. For every skin add a new folder called 2,3,4,5, etc. Remember to change the total skins in the cokiecheck.php file to total of skin folders. If you havent already done so, Put all your content and layout images and css and everything in the header.php file DO NOT END YOUR HTML, DIV, OR TABLE TAGS this will mess up the content. All that is in the footer.php file is the ending of all your html and div or table tags. Do so for every skin in folders 1,2,3,4,5, etc.Now in EVERY page of your site you want to be skinned put this<?php include ("/home/USERNAME/public_html/skins/cookiecheck.php");?>content here<? include($headervar.$extension); ?>If this tutorial helped you i would love you forever if linked me :D. If you have any problems feel free to email me at x0xspicy_kissesx0x@yahoo.com.[edit] thanks to shadow skazi for reminding me that i forgot to tell how to auctally change to a new skin anyways to do this you just add this link code <a href="?newskin=2">Change skin</a> change the number to whatever skin you want to change it to :D[/edit]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.