- Template: .html file, gets compiled to php code.
- Original stylesheet: a .css file in styles directory. It may contain variables in braces, commonly used for localized images.
- Theme: original stylesheet + images referenced in stylesheet
- Final stylesheet: a valid .css file served to browsers, generated from original stylesheet with all variables substituted
Under some circumstances templates and stylesheets may be stored in the database. These circumstances are:
- Admin edits a template but board has no write access to templates.
- Stylesheet references images which have text, and therefore can be localized.
- Admin edits a stylesheet but board has no write access to stylesheets.
Storing templates and stylesheets in the database creates the following problems:
- When admin "refreshes" a template or theme (actually stylesheet is what gets refreshed) any changes the admin previously made that were stored in the database are lost.
- During version updates the updater does not handle stylesheets or templates stored in the database. This either creates a partially updated board or changes get lost per #1.
- Dynamic generation of final stylesheets makes proper caching of them difficult/impossible.
- In the ACP template editor, changes will be persisted to disk only. This requires either writable template directories or ftp/sftp credentials to be defined such that phpbb can connect to itself over network and write the changes as if an admin uploaded them to the right files.
- Final stylesheets should be generated for all possible variable replacements for all original stylesheets and stored on the disk rather than original stylesheets being stored in the database and substituted dynamically.
Ticket
http://tracker.phpbb.com/browse/PHPBB3-9741
Pull Request
https://github.com/phpbb/phpbb3/pull/377