Glype
Glype Templating
Change template
/includes/settings.php
$CONFIG['theme'] = 'wp'; - 'default' and 'simple' are default values
Basic template files
/templates/wp/main.php - homepage e.g. www.webproxy.loc
To replace some tags in theme use /templates/wp/config.php.
Basic templating functions
A) loadTemplates($file, $vars=array()) in /includes/init.php
This function loads templating file, for example: loadTemplate('main', $vars) load /templates/simple/main.php .
The parameters mean:
- $file - calls view (template) file
- $vars - is array for for title, description, ...
Function loadTemplate($file, $vars=array()) is used in
- init.php - call template on error echo loadTemplate('main', $vars2);
- index.php - calls homepage template with echo loadTemplate('main', $vars);
- browse.php -template for browsing external site $insert = loadTemplate('framedForm.inc', $vars);
Notice: browse.php executes after homepage form is submitted, e.g. the form on index.php
B) replaceThemeTags($template) in init.php
This function is called from inside loadTemplate() function, and doesn't apper anywhere else!
It replace some tags inside template.