Sign up and get sponsored free and support your cause!!!


BASIC HTML
Coding & PHP
Computers
Layout Building
Making Graphics
Photoshop
Stylesheet/CSS
Wordpress
VIDEO TUTORIALS
EXTRAS



« Go back to Trixinity.net

Skinning Your Website

You should make 2 or 3 layouts (as many skins as you want, you can add more later anytime you want) code them like you code every layout you make (assuming you use div layers or tables). If you don't I suggest you you learn before you start skinning. Remember aswell your server must include PHP to be able to do this.

Break the coding of each layout into 3 parts for skinning, header.php, footer.php, body.php, this is the middle part, the part of coding which is NOT common for all pages, header.php is the part which is common in all pages, its the top of your layout coding, body.php will be the main content and footer.php will be the rest of part towards end of coding which is also common in all pages, it may include your navigation...and the copyright notice.

This depends on the way you break the coding. The beginning of tables or div position of main content etc. The body.php for pages have the main stuff of that page, and footer.php has the navigation, the copyright notice and back stuff.

Cookie Check

Open notepad (Start, Programs, Accessories, Notepad) . Start a new document and copy & paste the following code there:



You have to change the variables shown in capital letters, the total number of skins, the default skin (look towards top of the code), the path which says TRIXINITY.NET, change it to your own domain name, if you are hosted, just add your subdomain in front of it (example: sparkledollz.trixinity.net or trixinity.net/sparkledollz). Remeber do not take the . (small dot) off from in front of the domain name, you'll see it when you edit it. It's right before my TRIXINITY.NET and dont put a trailing slash (the slash in end..i.e: don't put your path like this, trixinity.net/), see the / don't put that. Now save this file as cookiecheck.php to whereever you'll remember on your server.

The Pages

Open the body.php file you made, right on the top (before any code) add this line:

<?php include ("/home/USER/public_html/skins/cookiecheck.php");?>

Change USER to your username, if you are hosted, ask your host for the username...also change the path accordingly

( /home/USER/public_html/sparkledollz/skins/cookiecheck.php )

if your subdomain is sparkledollz then that is what you'd put, remember that must be changed to whatever your subdomain actually is. Copy & paste the code below in body.php right after the above code:

<? include($headervar.$extension); ?>


Now add the below code to body.php:

<? include($footervar.$extension); ?>


Those 2 codes have to go on EVERY page of your site

All these codes should be in this order:
Cookiecheck
Header code
Content
Footer code

Save body.php. you wont upload it to the server, you save it on your computer, everytime you make a new page, open it change the content part and save the page somewhere else on your server, then you can upload your new page to your site. So girl.php acts as a template for making new pages easily once you have skinned your site. Open it (body.php), in the content part, put the content there and save as index.php. Then upload it. (Remeber that body.php is not required it's just easy to have to make new pages.)

Server

Connect to FTP, on your server make a folder called skins. Upload the cookiecheck.php in that folder. If you have 3 skins, inside the skins folder, make 3 new folders names 1, 2 & 3. Upload the header.php and footer.php (if needed, the css files, images etc. too) to each one of these folders (you should have 3 for each because all the layouts are different)

Come to the main directory of your subdomain or domain (where you put the index.html or index.php files when your site was not skinned). Upload the index.php there. Go to your site: http://yourdomain.com/index.php
If you see the default skin of your site (the one you made default in the cookiecheck.php file) then everything is good. If you see some errors the first time, try again. When everything is right, you can change your skins now. To change the skins use this tag:

<a href="http://yourdomain.com/index.php?newskin=1">Skin 1 </a> <a href="http://yourdomain.com/index.php?newskin=2">Skin 2 </a> <a href="http://yourdomain.com/index.php?newskin=3">Skin 3 </a> <a href="http://yourdomain.com/index.php?newskin=4">Skin 4 </a>
Change the skin number (newskin=1) to 2, 3 etc. and put those links on your navigation everytime you add a new skin.
You have to change the total number of skins in cookiecheck.php everytime you add a new skin.

If you would like to add a page that when the person changes the skin it says "You have just changed skins" or something then make a page called index2.php and upload in your skins directory. Put in that page "You have successfully changed skins". (Some people do it, and some don't, it's not nessecary)

Anyways, that's all. :) You've skinned your site, and I hope this tutorial helped you, if it didn't work then try again, most people rarely get it there first time, so keep trying and good luck!







Back to TutorialsHomeHelpContactPrivacy
© Copyright 2008. Nicky - Trixinity.net. All Rights Reserved.