|
|||||||
All pages are generated with Smarty Template Engine. You can download Smarty manual and read more about this powerful engine from Smarty Official Page. Smarty is very flexible and fast engine - it's built in very smart way and it's really fast. The main idea is to divide php code from html tags so site design can be changed fast and with no change of php files at all! This script works exactly this way - html is separate from php. Templates can be edited through web control panel (accessible by admin). Main goal of each template is to show variables it gets from php script. In other words, Template is common pure html with some special "tags" used to show variables or to implement simple logic (yes, Smarty have control structures and some of them are used in the system). Smarty contains such tags besided pure html:
Please study Smarty Manual to learn more about special tags. Don't be afraid of it - manual contains special section 'Smarty for template designers' and you don't have to know php at all to design your own smarty template. If you are well in learning by example then you can study our templates - they are simple but use power of Smarty. So, coming back to our script. Each page is shown with some template. Each template includes (using {include} command) header.tpl and footer.tpl - common header and footer. You can create another header and footer and use both of them just specify what file to include. Currently all templates use same header and footer. All templates have such variables that they can show (they are assigned to each template):
Each message you create through admin interface has it's own id.
To show message with id 'error' in template use smarty tag {$LNG.error}.
Please enter what language is active for your site on site settings page.
Site settings
Array contains all general site settings. The most important thing to use is {$CFG.webroot} in the beginning
of all image src, links etc because our script is located in 2 folder levels due to 'search-engine-friendly' urls
feature.
The most important thing is things to use are:
All other variables are template specific. Now we can divide all templates in 3 classes and 1 separate template:
Subtemplates are already described below and you can create your own, and definitely you should to make your site look more individual. Individual templates are (list of templates and list of variables assigned to each shown):
All other templates can exist in more than 1 instance. It means, you can create several news templates and assign specific template for special news. The common templates are news templates. You can assign to news any template which name starts with 'news_'.
|
WordPress GeoTargeting Pluginver 1.0.2
Use this wordpress plugin to output contents based on visitor's country or simply send all traffic from certain countries to other source. October 2009
New product: TheRedirector Plugin »»»
July 2008
Article Import Plugin ver 1.19 »»»
June 2008
Article Import Plugin ver 1.18 »»»
|
||||||||||||||||||||||||||||
|
||