Changes between Version 7 and Version 8 of WebTemplateProposal


Ignore:
Timestamp:
Jan 28, 2012, 4:02:54 AM (12 years ago)
Author:
Christian Beer
Comment:

updates to reflect the current development

Legend:

Unmodified
Added
Removed
Modified
  • WebTemplateProposal

    v7 v8  
    1616
    1717Problems to avoid:
    18  * find out how to tell the smarty compiler what language is currently used so cached files are useable (use [http://www.smarty.net/docs/en/caching.multiple.caches caching multiple caches] feature)
    19  * allow project specific template enhancements or replacement without tampering the standard templates (can be done by specifying two template directories)
     18 * smarty has to know what language is currently used so files are compiled and cached for each language (using [http://www.smarty.net/docs/en/caching.multiple.caches caching multiple caches] feature)
     19 * allow project specific template enhancements or replacement without tampering the standard templates (is done by specifying two template directories)
    2020 * HTML is used widely in .php and .inc files and is echo'ed by a lot of functions directly, this must be changed so that functions in /inc return a string to the calling script or function
    2121 * As this is a lengthy task and development and bug fixing goes on with the normal source code it will get difficult to merge changes with already transformed code
     
    2424 * No HTML-Tags in any .php or .inc files needed (read: allowed)
    2525 * Output of .php must be assigned to Smarty-variables that are then replaced in the template files
    26  * Ouptut of lists must be assigned to arrays that can then be iterated by Smarty within the template (Sample follows)
     26 * Output of lists must be assigned to arrays that can then be iterated by Smarty within the template (Sample follows)
    2727
    2828DONE list:
    2929 * write a tra block plugin to translate template text directly using the pre-compiled php files in /languages/compiled/ (no need to use gettext as we do not use it anywhere else at the moment)
    3030 * transform sample_index.php into a smarty_index.php and index.tpl (possibly also header.tpl and footer.tpl) as a proof-of-concept
     31 * create sample files (e.g.: project_description.php/.tpl) to store project specific content (e.g.: project description, text about the group behind the project)
     32 * enable usage of a MEMCACHE server via the [http://www.smarty.net/docs/en/caching.custom.tpl custom cache implementation]
    3133
    3234TODO list:
    33  * create sample files (e.g.: project_description.php/.tpl) to store project specific content (e.g.: project description, text about the group behind the project)
    34  * enable usage of a MEMCACHE server via the [http://www.smarty.net/docs/en/caching.custom.tpl custom cache implementation]
     35 * extend the current script that creates the language.pot files to also check the template files
    3536 * document available Smarty functions/modifiers to be used in templates, best practice for using Smarty within PHP files
    3637 * find a suitable way to transform all other files
     
    5657 /libs/:: contains smarty library (file smarty.class.php needs to be required by each .php file), should be secured to prevent direct access
    5758 /cache/:: contains smarty cache, should be secured to prevent direct access
    58  /configs/:: contains config files to alter smarty behaviour (should probably go into /project/project.inc if applicable)
     59 /project/configs/:: contains config files to alter smarty behaviour (should probably go into /project/project.inc if applicable)
    5960 /templates/:: contains .tpl files that specify the look of the individual pages, should be secured to prevent direct access
    6061 /project/templates/:: contains .tpl files that override the general templates, should be secured to prevent direct access
     
    6465 * .php files in /user gather all the data that should be shown to the user and assign this data to smarty-variables (using $smarty->assign()), at the end they call a template to be used to show this page ($smarty->display()). NO html code should be used here!
    6566 * .tpl files specify what smarty-variables are shown where in HTML source code. NO php code should be used here. There are special modifiers and functions provided by smarty to automate lists, forms and other stuff.
    66  * to make text translateable in .tpl files the {tra} block can be used which is replaced by smarty compiler with the information from the language directory. This plugin has to be written and should use the funtions from /inc/translation.inc
     67 * to make text translateable in .tpl files the {tra} block can be used which is replaced by smarty compiler with the information from the language directory.