Username: Password: lost p/w?
home | help | subscribe | search | register
Skinning: How do I get started?
Skins are a new feature at DMusic - this can be technical, so grab a coffee or something. ;) (Wink)


Before you get started you will need be familiar with HTML and CSS, and have access to somewhere where you can test your layouts. Ideally this will be a Smarty installation (which is the templating system we will be using), else an ordinary webserver will do (this can even be your own machine).

Skins consist of three things:

A stylesheet file
A main template
Additional template files for the pages in a site.

The very basic skins will consist of just a stylesheet file and a main template file.

We will be uploading a template skin for you to download shortly, you can take a look inside and you should see most of the information you will require. Feel free to ask on the forums if you need help about other aspects.


Naming conventions:

Your style sheet file must be named after the name of your skin. So let's say I am creating a skin called 'Minimal' (the example skin) - the stylesheet will be named minimal.css.

Your main template will be called 'base.tpl' - if you decide to add wide-mode support for your skin (a good idea for fixed-width layouts, like the default DMusic skin) then you can also submit a file called 'base-wide.tpl'

If you have included any images with your layout, submit them in a directory named 'img'

Smarty variables:

Here are some variables you might need to use in your template:

{$user.is_logged_in} - true if we are logged in
{$user_icon} - users' avatar (comes preformatted)
{$profile_pic} - users' profile picture (comes preformatted)
{$skin_name} - the name of your skin
{$skin_author} - your name + dmusic address (will come preformatted)

[TODO: Add a better list]

There are others, as well as the capacity to add additional ones. Look in the example template for clues, and note Jack if you require additional values passing.


Note: I WILL be reviewing all the templates submitted when there is a procedure to do so, to check for nasty code before they made live on the site.


You can link to this item directly by using :faq100:

Last editted by: Coderjack on 2007-12-12 23:55:41.

Management
Add an entry: Add

 

 

 

© DMusic LLC - Advertising | Employment | TOS | Subscribe