| 16 | |
| 17 | Problems to avoid: |
| 18 | * make internationalization work with caching (different approaches possible: [http://smarty.incutio.com/?page=SmartyGettext Smarty gettext], [http://smarty.incutio.com/?page=SmartyMultilanguageSupport MultiLanguage support]) |
| 19 | * allow project specific template enhancements or replacement without tampering the standard templates |
| 20 | |
| 21 | What using Smarty means: |
| 22 | * No HTML-Tags in any .php or .inc files needed (read: allowed) |
| 23 | * Output of .php must be assigned to Smarty-variables that are then replaced in the template files |
| 24 | * Ouptut of lists must be assigned to arrays that can then be iterated by Smarty within the template (Sample follows) |
| 25 | |
| 26 | Steps to migrate to Smarty: |
| 27 | 1. develop a directory structure to separate PHP files, Smarty files, Template files (including Stylesheets) and Image files |
| 28 | 1. document available Smarty functions/modifiers to be used in templates, best practice for using Smarty within PHP files |
| 29 | 1. develop templates based on Grid system for all public visible files (TODO: find a way to test Templates with Smarty but without BOINC server) |
| 30 | 1. implement new directory structure, Smarty and templates into BOINC source |
| 31 | 1. change PHP files to use Smarty templates |