Jul 23, 2008

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

Free Web Hosting, No Ads > CONTRIBUTE > Tutorials

free web hosting

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

Waiting
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://www.codegrrl.com/forums/index.php?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 smile.gif. 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 smile.gif[/edit]

 

 

 


Reply

shadow skazi
Could you also tell us how to make a skin changer on a site? That would be very helpful smile.gif

Reply

ZUMZUM
genial

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : skinning, site, skin, website

  1. How To Make An Ultimate Game List.
    If you're making a site on video games or such. (0)
  2. Simple Stylesheet Tutorial
    Stylesheet embedded in your site. (2)
    Hi - ill show you how to make a simple style sheet that will be embedded into your site. OK make
    sure your site is set up already (like the standard tags) To start and end off a stylesheet you
    need to do the following CODE <style type="text/css"> </stlye> Ok
    lets start CODE <style type="text/css"> p { font-family: "Tahoma";
    font-size: 9; color: "red"; } </style> So when you come to put in
    CODE <p>Hi!</p> The text will appear red and will be in Tahom....
  3. How To Setup A Website After Your Forum
    (3)
    This tutorial is about how to setup a website after you have setup a forum. That means, you have a
    forum, and are wanting to add a website. This tutorial will show you how to create the website in
    your root directory(Example: http://domainname.com) , while your traffic gets redirected to your
    forum while you are creating it, until you're ready for guests to see it. This method is
    opposed to setting it up in another directory, then moving it(particularly more time consuming if
    you're site is PHP based). First of all, you are going to want to setup a redirect ....
  4. Creating Navigation For Html Websites
    Have a common navigation menu for the whole website! (12)
    Pre-requisite: HTML, inline frame tags 1 Attachment(.zip) included. Updates : 29-12-07: Doctype
    added in example files (Advised by jlhaslip) Designing a whole website takes a lot of planning
    and organization. Designing a proper navigation system is a basic step in building your website. If
    you are developing webpages in html you would have observed that as you go on creating pages it
    becomes difficult to maintain the links to the pages. This article will guide you in developing a
    common navigation menu for your website. It describes three ways, so if you don'....
  5. How To Set Up A Bookmarking System On Wii
    Use your favorite social bookmarking site. (0)
    This is a simple tutorial on a way to set up a bookmarking system on your Wii with greater stroage
    than the Favorites. It is more complicated than the Favorites and requires manual URL typing. Well
    let's dive on in. Items Required Nintendo Wii Internet Channel 3 Empty Favorites Internet
    Connection An account on a social bookmarking site I will be using delicious as an example.
    delicious Ok, if you do not have an account, read on. If you do have an account, go to the
    {account} section. Ok, first you need to register an account. This can be done by clicki....
  6. Create A Google Seach Result Page Embed Within Your Site Page.
    (12)
    Create a google seach result page embed within your site page. It is easier to create
    web page that embeded the google search result in it. The first step is to go to google apply an
    account for the google ad-sense. After that login to you account and choose the create ad-seach
    option. Most of time the google search box give all we have the great and powerfull seach ability.
    But, have you think every time users get seach with it. They do redirected to another page that is
    not within you site. It is easier to create web page that embeded the google sea....
  7. Php Word Filter
    Have you accidently sworn on your site? Or do you want to keep visitor (7)
    This is pretty simple but very useful if you don't want people to swear. We will be using
    str_replace for this. CODE <?php str_replace ("curseword,
    "replacemet"); ?> Thats pretty simple, just fill in the curse word and the
    replacement, and then repeat... heres what it would look like full size: CODE <?php
    str_replace("swear", "replacement"); str_replace("swear",
    "replacement"); str_replace("swear", "replacement");
    str_replace("swear", "....
  8. Css Scroll Bar Styles
    Change the color of your website scrollbar! (1)
    REQUIREMENTS 1. Must have limited to good knowledge of CSS. 2. Must have limited to good knowlege
    of HTML. THE ELEMENTS First of all, there are 7 different elements of a scrollbar. a) Scrollbar
    Arrow Color /cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" />
    Scrollbar Darkshadow Color c) Scrollbar Track Color d) Scrollbar Face Color e) Scrollbar Shadow
    Color f) Scrollbar Highlight Color g) Scrollbar 3dlight Color Bassically all that you need to do is
    change the colors like you normally do with any sort of CSS. Therefore, if you want the....
  9. Faux Ajax Loading - Css Only
    Pretend your site is Ajax based (3)
    Link: http://www.jlhaslip.trap17.com/samples/misc/ajax/index.html Check that out. The first page
    has information and the second and has the actual example of its use with sample CSS code. I find
    that when you visit a site which has a slow server and attempt to view 'large' Image files,
    it is pretty boring to sit and stare at a blank screen, so this little snippet of code can be used
    to give the visitor something to see to indicate that the image is being downloaded. I built a
    small animated gif that sits in the background of the space allocated for the image....
  10. Making A One Page Does All Website In Phph
    (2)
    Hello and Great Day or Night either one. Have you ever been to a site and seen a index page or any
    page at all control everything such as index.php?do=home&action=logout something similar to the
    above? Well I am going to show you how easy it is to make this all own your own, and only have to
    use one web template or design to make it work. Before we get started you need to go ahead and find
    the web design that you want to use. After you find the site you want to use go ahead and save
    it... and save it like this so we can work together, ok! Note* We are going to ....
  11. Adding Your Website To Google
    How to register with google (20)
    Hi everyone. Hopefully here im going to tell you how to register yourself with the Google search
    engine and get yourself in their results. Ill start the tutorial assuming you already have Meta
    tags or other search engine optimisation techniques in place. This tutorial is solely about
    registering with google. At one time i thought simply using meta tags etcetera would get you listed
    in Google, i then found out that didnt work, so i wondered why, and the fruits of my labour are what
    will go into this tutorial. the first step is to get a google account, this will get y....
  12. Making The Popular Id Browsing For Your Site.
    (17)
    Was just sitting and being bored but then I realized I could show how to create more or less popular
    ?id=page browsing. It's actually really easy. I know two ways how to do it. First one I learned
    was checking the variable and if it's true including the text/file/anything needed and so on. It
    was ok, but sometimes I just couldn't make it work so I switched to switch() function and
    that's what I'm going to show you guys right now. So, I made a test page which contains the
    code needed and here is its source. CODE <!DOCTYPE HTML PUBLIC ....
  13. Cpanel Useful Site Management Tools 2.1
    Part 3 of My 7 Part Tutorial (0)
    This Tutorial will be divided into 7 different parts, and this is the first part, when i get the
    other parts together, i will post the links under here /biggrin.gif" style="vertical-align:middle"
    emoid=":D" border="0" alt="biggrin.gif" /> Enjoy. Part 1: E-mail Management Part 2: Useful Site
    Management Tools Part 4: Analysis/Log Files Part 5: Advanced Tools Part 6: PreInstalled
    Scripts, Extras, and Cpanel Options Part 7: Fantastico Detailed Cpanel Tutorial Part 2.1:
    Useful Site Management Tools In this tutorial I will, in detail explain all of th....
  14. Cpanel Useful Site Management Tools
    Part 2 of My 7 Part Tutorial (0)
    This Tutorial will be divided into 7 different parts, and this is the first part, when i get the
    other parts together, i will post the links under here /biggrin.gif" style="vertical-align:middle"
    emoid=":D" border="0" alt="biggrin.gif" /> Enjoy. Part 1: E-mail Management Part 3: Useful Site
    Management Tools2.1 Part 4: Analysis/Log Files Part 5: Advanced Tools Part 6: PreInstalled
    Scripts, Extras, and Cpanel Options Part 7: Fantastico Detailed Cpanel Tutorial Part 2:
    Useful Site Management Tools In this tutorial I will, in detail explain all of t....
  15. Templating System Using Php Includes
    Building a Dynamic site using Includes and flat-files. (13)
    Php based Templating System http://jlhaslip.trap17.com/template/index.php The Source Code
    for the scripts are included (literally) on the different pages on the Demo, including the Contact /
    Email script. The only page not there yet is the Message Script. Maybe tonight I will upload that.
    This one uses a little bit of query-string checking to confirm that the contents of the page are
    actually available (file_exists())and an allowed page content before serving it up. The
    'allowed page content' is done by checking against a flat-file containing an array....
  16. Php Menu Bulding Script And Site Template
    available for download (0)
    A Php Menu-builder Tutorial This Sidebar Menu-builder code and the php scripts are adapted from
    a Tutorial on the Astahost.com Forum titled : CMS101 - Content Management System Design .
    Since the original tutorial's author (vujsa) did such a marvellous job of describing the system
    in the original Topic posting, I will not attempt to explain it here, rather, I invite you to have a
    look at his Topic and learn from it. The Basic tutorial provided coding for developing a table-based
    web-site template which used php includes and embedded data to create a &....
  17. Php Spy Code
    Spy on your site! (21)
    Code Spy Code Description Anyone who comes to ur forum's IP Adress, Site they came From,
    Their Browser and the time they came will get saved in a place that only the admin knows the
    location of... V.2 More features coming up in V.2!!! POst suggestions/problems...
    Preview:- http://s15.invisionfree.com/Spy/index.php ? REFRESH THE PAGE, AND GO HERE:-
    http://h1.ripway.com/programming/spy%20code/spy.html ^^^^^^^That shows all the IP's, Browsers,
    Time, site and stuff....^^^^^^^^ Code First of all, you'll need to host the files.... I sugg....
  18. How To: Make A Simple Php Site
    Making one file show up on all pages using php (21)
    I have looked all over the site and could not find anything that was like this simple, or just like
    this at all.. For some people i know that you are using a basic HTML site...and having a big menu
    if you want to add somthing you have to go into every one of the pages and add or remove or edit
    what you want to do, but with somthing verry simple all you would have to do is edit one file, and
    all of the pages that have the PHP script on them would suddenly change to what that one file is.
    So to start off if you are planning on using this little tirck, the page that you a....
  19. Checking Dns Settings For Website
    DNS Setting, Ping, Whois, Dnsreport etc (2)
    If you have recently purchased a domain and facing problems with the workings, the first thing which
    you should check is the DNS setting. Dns settings determine, how to domain is pointed to the Server
    and How the server is connected to the world (internet). Ensure, the DNS settings are perfect to
    make sure, things work smoothly and people across the globe don't have problems accessing your
    site. The basic check would be : PING Suppose you register your domain (example.com) at
    ComputingHost. You get an IP for your website. In this case, suppose its 64.69.35.170. Yo....
  20. Configuring Dns Settings For Website
    Nameserver, A-Address, DNS configuration (1)
    Most of the people have problems configuring their website. After registering their domain, many get
    confused in configuring their domain (basically the DNS settings). This small tutorial will help you
    get started with DNS settings configuration. A domain can be basically pointed to a server using 2
    main techniques. 1. Nameserver (the most recommended way) 2. A Address (Not recommended)
    Configuring using Nameservers ==================== Login to your domain Control panel provided by
    your DOMAIN NAME PROVIDER / REGISTRAR. Not your webhost. Search for settings like DN....
  21. Introduction To Templating
    Templating your website with PHP (1)
    Pre-note Hello and welcome. if your website doesn't use a templating function, you may have
    noticed it's pretty hard to update your website (layout) unless you dig through many files to
    update the images and such. The solution is templates. If you ever got curious and looked into
    phpBB codes or any other template based forum/CMS, you saw the .tpl files they use. I am not at a
    point where i base everything on .tpl (simply because i havent taken the time to see how it all
    works). But i do can tell you that it's the same principle, template your site using an....
  22. Phpbb Forum Site Transfer
    How to do it, step by step instructions (20)
    I'm sure many of you out there have used phpBB at some point. To those who enjoy running forums
    and online communities, specifically supporting phpBB, I am about to tell everyone how to restore
    the forums database from one website, to another. This is presuming you do not have any mods or
    hacks installed. Some of you may find this information useful. Here is the scenario: Let's say
    you have forums running phpBB version 2.0.17 (currently the latest one). You have decided that you
    want to move your forums to a whole new URL and provider, and as an added bonus, ch....
  23. Css And Javascript Combined For Dynamic Layout
    use of different CSS files at same site (9)
    This tutorial is meant for people that are dealing with problems while coding their site at 100% of
    width. Important notice: Some people has JavaScript disabled, so they will not be able to load CSS
    file (take this in account when creating your website). How this script works. In the HEAD of your
    HTML document will apply this command, so variable.js file will be load at start: CODE
    <script type="text/javascript" src="variable.js"></script> In
    browser JavaScript file variable.js is loaded. This Javascript file consist of this para....
  24. How To Make A Very Simple Wap Site
    A quick tutorial about WML language (40)
    WAP Site Tutorial : How to Make A Wap site? Before We begin.. Defination from the
    Web about Wap. QUOTE WAP is an open international standard for applications that use
    wireless communication . Its principal application is to enable access to the Internet from a
    mobile phone or PDA .A WAP browser provides all of the basic services of a computer based web
    browser but simplified to operate within the restrictions of a mobile phone. WAP is now the
    protocol used for the majority of the world's mobile internet sites, known as WAP sites ....
  25. Secure The Email Addresses On Your Website!
    Wonderful script and useful! And working (10)
    Just follow the instructions below: /* Secure Email Function by Juan Karlo Aquino de
    Guzman Website: http://www.karlo.ph.tc and http://www.abs-cbn.ph.tc E-mail:
    http://www.karlo.ph.tc/send.php Usage: showEmail("support@microsoft.com",0); OR
    showEmail("support@microsoft.com",1); Types: 0 = ordinary random 1 = more secure random To
    include to a script: include_once("email_secure.php"); */ And here is the code :
    CODE <?php /*     Secure Email Function by Juan Karlo Aquino de Guzman     Website:
    http://www.karlo.....
  26. Checking The Web Site Speed
    (10)
    Did you taking too much time to access your favorite sites? Probably the problem is on the server
    used by those sites. To make sure that is the problem, use Windows PING facility. Ping is a small
    program, which sends a 32-bit signal to the Web site server. Next, Ping record the time needed by
    the server to answer it. To activate Ping: Click on the Start-Run menus, type command, and then
    click OK. Type PING "site name" in the MS-DOS prompt window, for example PING www.yahoo.com. In a
    moment, the result will appear on the screen. A result less than 300ms is normal spee....
  27. How To Put A Phpbb Login Box On Your Main Site.
    Code and .php included!!! (18)
    I have included my coded file with this... Ok here is the code. CODE // //Create login area,
    replace the phpBB2 in /phpBB2/login.php with your forum's //directory // <form
    action="/phpBB2/login.php" method="post" target="_top"> <table
    width="25%" cellspacing="2" cellpadding="2" border="0"
    align="center">  <tr> <td align="left"
    class="nav"><a href="/phpBB2/index.php" class="nav">Prank Place
    Forum Index</a></td>....
  28. HTML tags and examples
    Condensed form of course from my site... (37)
    Well, I decided to try and help out some of the users here who might be unexperienced in HTML, so I
    condensed the begginer's HTML course at my website. Here it is... Lesson 1 HTML means Hyper
    Text Markup Language. HTML is a very common language used for many websites, is the base for more
    complicated and powerful langauges like php, HTML can seem hard, but you will find it is one of the
    easiest langauges one can learn. The core of HTML is the tag, a tage is just a set of two
    arrows-like brackets created by hitting Shift and the comma key, or Shift and the period....
  29. Php Quiz Script
    Make quizzes for your site. (20)
    Hello all, A little bit back I decided to make a quiz scriptjust out of no where lol. However it
    doesnt do anything special but I am going to make an email mod for it so that it will email results
    to your email address. So here is the basis of it. INSTRUCTIONS: Open a new page in your text
    editor and paste in the following code. CODE <?php $qid = "Quiz ID-00"; ?>
    <html> <head> <title><? echo "Gamers Pub $qid";
    ?></title> </head> <body> <p><h3><? echo "....
  30. Php Emailer/contact System
    An email or contact system for your site (20)
    Hello all, Here is an easy Emailer or Contact system that allows visitors or members of your site
    to email you just by filling out a form. So here is what you need to do to set it up. First open up
    a new page in your text editor and paste in the following code. CODE <?php $Name =
    $_POST['Name']; $Subject = $_POST['Subject'];
    $Email = $_POST['Email']; $Site =
    $_POST['Site']; $Message=$_POST['Message'];
    $align = $_POST[&#....

    1. Looking for skinning, site, skin, website

Searching Video's for skinning, site, skin, website
Similar
How To Make
An Ultimate
Game List. -
If
you're
making a
site on
video games
or such.
Simple
Stylesheet
Tutorial -
Stylesheet
embedded in
your site.
How To Setup
A Website
After Your
Forum
Creating
Navigation
For Html
Websites -
Have a
common
navigation
menu for the
whole
website!
How To Set
Up A
Bookmarking
System On
Wii - Use
your
favorite
social
bookmarking
site.
Create A
Google Seach
Result Page
Embed Within
Your Site
Page.
Php Word
Filter -
Have you
accidently
sworn on
your site?
Or do you
want to keep
visitor
Css Scroll
Bar Styles -
Change the
color of
your website
scrollbar
3;
Faux Ajax
Loading -
Css Only -
Pretend your
site is Ajax
based
Making A One
Page Does
All Website
In Phph
Adding Your
Website To
Google - How
to register
with google
Making The
Popular Id
Browsing For
Your Site.
Cpanel
Useful Site
Management
Tools 2.1 -
Part 3 of My
7 Part
Tutorial
Cpanel
Useful Site
Management
Tools - Part
2 of My 7
Part
Tutorial
Templating
System Using
Php Includes
- Building a
Dynamic site
using
Includes and
flat-files.
Php Menu
Bulding
Script And
Site
Template -
available
for download
Php Spy Code
- Spy on
your
site!
How To: Make
A Simple Php
Site -
Making one
file show up
on all pages
using php
Checking Dns
Settings For
Website -
DNS Setting,
Ping, Whois,
Dnsreport
etc
Configuring
Dns Settings
For Website
-
Nameserver,
A-Address,
DNS
configuratio
n
Introduction
To
Templating -
Templating
your website
with PHP
Phpbb Forum
Site
Transfer -
How to do
it, step by
step
instructions
Css And
Javascript
Combined For
Dynamic
Layout - use
of different
CSS files at
same site
How To Make
A Very
Simple Wap
Site - A
quick
tutorial
about WML
language
Secure The
Email
Addresses On
Your
Website!
- Wonderful
script and
useful!
And working
Checking The
Web Site
Speed
How To Put A
Phpbb Login
Box On Your
Main Site. -
Code and
.php
included!
;!!
HTML tags
and examples
- Condensed
form of
course from
my site...
Php Quiz
Script -
Make quizzes
for your
site.
Php
Emailer/cont
act System -
An email or
contact
system for
your site
advertisement



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



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE