Firefox PHP

Common Source for templates

Posted by fmon 
All files from this thread

File Name File Size   Posted by Date 2 KB open | download fmon 06/12/2007 Read message
Common Source for templates
June 12, 2007 02:55AM
This module allows you to have multiple template directories use a single common directory source for most of the .tpl files. The templates should have as a minimum a settings.tpl or css.tpl file along with info.php, and header.tpl. They may also have a footer.tpl. The rest of the required .tpl files will be fetched from a source designated in settings.tpl or css.tpl.

If you are developing or experimenting with many templates that differ from each other only in the settings, css, header and or footer.tpl files it is easier to manage the rest of the common .tpl files if there is only one copy of them in one directory. Without this module each template directory will need a complete set of files, even if there are no changes to them. When you do make a change, without this module you would need to update the other directories if the change is needed across the many templates.

Install the cs_template_manager.php file in your forums mods directory. In the administration panel go to modules and turn the module on. This module does not have settings or language files and is not installed in a subdirectory.

Each partial template directory must have at least a header.tpl, info.php and one or both of css.tpl and settings.tpl. They may also have a footer.tpl. In the settings.tpl or css.tpl (if you don't use a settings.tpl) file place the following line:

{var template_source directory_name}

Where "directory_name" is the name of the directory in the Phorum templates directory containing the rest of the .tpl files. This directory can be a complete Phorum template. If the partial template does not have a footer.tpl but needs the one in the "directory_name" directory then also add the following line:

{var use_common_footer 1}

If you use {var use_common_footer 0} or do not have this statement then the partial template MUST have a footer.tpl.
open | download - (2 KB)
Sorry, only registered users may post in this forum.

Click here to login