Total Users Online: 0 üye, 147 guest | Tarih/Saat: 2025-04-29 07:50
Skins and tags, overview
All about the templating system and the HTML output.
Skins and tags, overview
All about the templating system and the HTML output.

Skins :

Basically a "skin" is a set of TPL files, TPL stands for "templates".
By default there's 36 TPL files in a default skin.
A TPL file is made of HTML code, plus placeholders named "tags".

In almost all pages, the HTML send to the client browser is made of 3 TPLs, added one after the other, in this order :

1: header.tpl
2: A TPL that depends of the page being displayed
3: footer.tpl

As sample, for the home page, Seditio will use : header.tpl + index.tpl + footer.tpl
For the forums home it will be : header.tpl + forums.sections.tpl + footer.tpl
etc

All skins are loading a \2 in header.tpl

So if you plan to build your own skin, the fastest and easiest way is to go with an official skin and first start to tweak header.tpl, footer.tpl and the CSS file. By editing those only 3 files you can quickly get interesting results.

For some reasons, the popups for the ratings and the polls do not follows this, those standalone pages have their own header and footer in their main TPL file.


Tags :

Tags are looking like this : {XXX_YYY}

In short, a tag is an object dynamically created by the PHP code, inside there's values such as strings, HTML code, URLs, pictures, etc
Note that tags that are not "global" will only work in a given TPL file. The name of the tag often tells where this tag is valid.
There's a tool that lists all the default tags, it's the Tags HQ.


Global tags :

Global tags are a special kind of tags, valid in all skin files.
Most of the time, those tags are coming from PHP code variables, or from the configuration table, or from global plugins.

All global tags are looking like this : {PHP.tagnamehere}

Click here to display the list of all default global tags.

Sample, some fairly common global tags :

{PHP.cfg.adminemail}
{PHP.cfg.maintitle}
{PHP.cfg.version}
{PHP.cfg.mainurl}
{PHP.usr.name}
{PHP.usr.level}
{PHP.out.copyright}


Tips'n tricks :

Nesting TPL files :


You can recursively gets the content of a file in a TPL file with a tag : {FILE "filename.tpl"}

As sample, the icons at bottom of topics page in LDU forums are inserted using this method.
forums.topics.tpl contains a tag {FILE "skins/.../forums.icons.tpl"}, and forums.icons.tpl contains the HTML table with posts icons and descriptions.

Henüz yorum yapılmamıştır.
Skins and tags, overview
Author: Kaan
Date: 2009-12-28 11:34
Comments: (0)
Benzer SayfalarYorum
Error Skins0
Electronix Skins0
Etiket Tags Kurulum2
Seditio Decayed Skins0
 
Powered by Seditio © 2009-2012 All Rights Reserved