Well of Stars

PHP Includes and Skinning Tutorial

I've used php to skin The Golden Wood, Shadows of Twilight and Mirrored Dreams, and various people have asked me how it is done. There are a variety of skinning tutorials already online - I learnt a lot from the tutorials at Domesticat.net and Bouncy Bubbles, and I'd advise you to look at those too.

This tutorial covers converting a site to php, and skinning. This site, for example, uses php includes although it is not skinned, which makes managing the layout much easier ;). If you're interested in learning PHP includes, you should read the first two sections, and also look over the 'tips and troubleshooting' section. If you want to skin your site, you could skip the second section, though it may be useful to test out the php includes first if you've never done that. The method of skinning which I've described in this tutorial is one I've learnt from other sites, although I've made a few modifications. I've also included some tips on solutions to problems that I've encountered. I hope you find it useful :) Please let me know if you have any feedback, or anything is unclear.

Before you start

Basic stuff, but I probably need to say this...

You'll need to have some familiarity with working directly with html coding. If you've only worked with templates or premade layouts, you may not be ready for php. Webpage composers such as Frontpage that allow you to build a page with no knowledge of html coding can also cause problems. It is best to use a good HTML code editor, or basic text editor such as Notepad, to edit and save your files.

You'll also need to have some knowledge of css. When you're skinning a site, you need to take any styling elements (font face, font size, colours etc) out of the body of your pages, and define these in your page head or in an external css file. The more you can define in a css file, the better - fonts, colours, even table widths, may be things that you want to vary between different skins.

On with the tutorial...

1. Preparing the layout (read this first whether you're interested in php includes or skinning!)
2. PHP includes
3. Skinning
4. Tips and Troubleshooting

5. Skinning a tagboard

:back: