aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template/template.php
Commit message (Collapse)AuthorAgeFilesLines
* [feature/template-events] Changes per imkingdavid's review.Oleg Pudeyev2012-11-171-1/+1
| | | | PHPBB3-9550
* [feature/template-events] Make style names private on template.Oleg Pudeyev2012-11-171-1/+13
| | | | PHPBB3-9550
* [feature/template-events] Convert a single style name to array of them.Oleg Pudeyev2012-11-171-6/+5
| | | | | | | This allows template code to know the entire style hierarchy for templates being rendered. PHPBB3-9550
* [feature/template-events] Cosmetic changes.Oleg Pudeyev2012-11-171-2/+2
| | | | PHPBB3-9550
* [feature/template-events] Rename template_name to style_name.Oleg Pudeyev2012-11-171-4/+5
| | | | | | | "Style name" makes a lot more sense and should be in line with recent style/template changes. PHPBB3-9550
* [feature/template-events] Chase template/style renames and changes.Oleg Pudeyev2012-11-171-1/+1
| | | | PHPBB3-9550
* [feature/template-events] Pass top-level template name to template filter.Oleg Pudeyev2012-11-171-1/+11
| | | | | | This will be used to invoke template-specific hooks. PHPBB3-9550
* [feature/template-events] Inject extension manager into template class.Oleg Pudeyev2012-11-171-2/+11
| | | | | | | | | | | | | | Template class passes extension manager to template compiler. Template compiler passes extension manager to template filter. Template filter will use extension manager to locate hooks as it is compiling templates. All extension manager arguments are optional. If an extension manager is not given, template hooks will not be invoked. PHPBB3-9550
* Merge remote-tracking branch 'p/ticket/10933' into developIgor Wiedler2012-11-171-75/+0
|\ | | | | | | | | | | | | | | | | | | | | | | * p/ticket/10933: [ticket/10933] Prose for get_first_file_location. [ticket/10933] Remaining documentation for added functions in resource locator [ticket/10933] Update template locator test to use style resource locator. [ticket/10933] Dispose of locate function in template class. [ticket/10933] Add mutators for template_path to style resource locator. [ticket/10933] Delete template_path assignment. [ticket/10933] Delete template_path from template class. [ticket/10933] Add get_first_template_location.
| * [ticket/10933] Dispose of locate function in template class.Oleg Pudeyev2012-11-021-54/+0
| | | | | | | | | | | | It had no callers other than the test suite. PHPBB3-10933
| * [ticket/10933] Delete template_path from template class.Oleg Pudeyev2012-11-021-7/+0
| | | | | | | | | | | | template_path is now only present in style resource locator. PHPBB3-10933
| * [ticket/10933] Add get_first_template_location.Oleg Pudeyev2012-11-021-15/+1
| | | | | | | | | | | | | | | | This localizes template_path to style resource locator. locate function on template will be removed in a subsequent commit. PHPBB3-10933
* | Merge remote-tracking branch 'EXreaction/ticket/11189' into developAndreas Fischer2012-11-101-2/+2
|\ \ | | | | | | | | | | | | | | | * EXreaction/ticket/11189: [ticket/11189] Replace DEBUG_EXTRA with DEBUG [ticket/11189] Always log critical errors when in cron or in image output
| * | [ticket/11189] Replace DEBUG_EXTRA with DEBUGNathaniel Guse2012-11-101-2/+2
| |/ | | | | | | PHPBB3-11189
* | Merge pull request #881 from Fyorl/ticket/10970Nils Adermann2012-11-101-1/+5
|\ \ | |/ |/| Allow INCLUDE template macros to accept paths of the form {FOO}/a/{BAR}/c
| * [ticket/10970] Fixed a problem with prepending root pathsFyorl2012-07-241-1/+5
| | | | | | | | PHPBB3-10970
* | [ticket/10933] Dependency inject template context.Oleg Pudeyev2012-11-021-2/+3
| | | | | | | | PHPBB3-10933
* | [ticket/10933] Useful documentation for template locate functionOleg Pudeyev2012-11-021-2/+34
| | | | | | | | PHPBB3-10933
* | [ticket/10933] Typo fixesOleg Pudeyev2012-11-021-1/+1
| | | | | | | | PHPBB3-10933
* | [ticket/10933] Initialize template context when template is constructed.Oleg Pudeyev2012-11-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | There is no apparent reason for either initializing or clearing the context in set_style/set_custom_style. Initially the initialization there was added in 0501640d5db158a010741e27803191ab469834c4, for reasons that presently I do not see. This permits making context property back private. PHPBB3-10933
* | [ticket/11043] Allow call_hook() to be called from more than one location.Andreas Fischer2012-08-031-5/+6
| | | | | | | | | | | | | | | | Allow the helper function call_hook() of class phpbb_template to be called from more than once location and thus for more than one hook (although there is only one) by adding the method name as a parameter. PHPBB3-11043
* | [ticket/11012] Normalize $phpEx member vars to $php_extIgor Wiedler2012-07-211-4/+4
|/ | | | PHPBB3-11012
* [ticket/10799] Removing global variable from includejsVjacheslav Trushkin2012-05-011-1/+6
| | | | | | Removing global $phpbb_root_path from includejs implementation PHPBB3-10799
* [ticket/10756] Fixing variable declarations in style and template classesVjacheslav Trushkin2012-04-191-6/+12
| | | | | | Fixing variable declaration, removing function from template locator that does not belong there PHPBB3-10756
* [ticket/10756] Renaming phpbb_style_template to phpbb_templateVjacheslav Trushkin2012-04-191-0/+509
| | | | | | Renaming phpbb_style_template to phpbb_template PHPBB3-10756
* [feature/merging-style-components] Moving template classes to styleVjacheslav Trushkin2012-03-141-504/+0
| | | | | | Moving includes/template/ to includes/style/, adding template_ prefix to classes that deal only with templates PHPBB3-10632
* [feature/append_var] Adding append_var template class functionVjacheslav Trushkin2012-03-051-1/+16
| | | | | | Adding append_var template class function PHPBB3-10666
* [ticket/10652] Fixing typo in template classVjacheslav Trushkin2012-02-151-1/+1
| | | | | | Fixing typo in template class that prevents template inheritance from working PHPBB3-10652
* Merge pull request #526 from p/ticket/10500Igor Wiedler2012-02-141-1/+1
|\ | | | | Ticket/10500 Miscellaneous issues in the new template engine
| * [ticket/10500] Use correct class name in @uses.Oleg Pudeyev2011-12-031-1/+1
| | | | | | | | PHPBB3-10500
* | [ticket/9916] Updating header license and removing Version $Id$Unknown2011-12-311-1/+1
|/ | | | PHPBB3-9916
* [feature/extension-manager] Make sure named styles are loaded from root dirNils Adermann2011-09-291-1/+1
| | | | PHPBB3-10323
* [feature/extension-manager] Fallback template might not always be setNils Adermann2011-09-291-4/+8
| | | | PHPBB3-10323
* [feature/extension-manager] Refactoring the structure of extension providerNils Adermann2011-09-291-1/+1
| | | | PHPBB3-10323
* [feature/extension-manager] Add support for templates in extensions.Nils Adermann2011-09-291-34/+33
| | | | | | | | | | | | | | | | | | This commit adds a template path provider to separate the process of locating (cached) paths in extensions from the template engine. The locator is supplied with a list of paths from the path provider. Admin templates can now be created in ext/<ext>/adm/style/ and regular templates go into ext/<ext>/styles/<style>/template/. Extension templates override regular templates. So if an extension supplies a file with a name used in phpBB, the extension's file will be used. A side-effect of this commit: Locator and Provider are now able to deal with arbitrary levels of template inheritance. So we can expose this through phpbb_template if we choose to, and allow styles to inherit from inherited styles. PHPBB3-10323
* [ticket/10375] Rework $source_file setting.Chris Smith2011-09-211-3/+12
| | | | | | Only set the file if an mtime check or recompile are required. PHPBB3-10375
* [ticket/10375] Make _tpl_load() a little leaner.Chris Smith2011-09-211-19/+6
| | | | | | | | - Removed duplicate variables - Set $source_file earlier for cache checks - Fixed useless mtime check PHPBB3-10375
* [ticket/10375] Use existing method to generate cache file name.Chris Smith2011-09-211-2/+1
| | | | PHPBB3-10375
* [ticket/10374] Remove 'custom template' cache prefix.Chris Smith2011-09-201-1/+1
| | | | PHPBB3-10374
* [feature/template-engine] Delete _get_locator function.Oleg Pudeyev2011-08-131-13/+0
| | | | | | It is no longer needed as locator is injected into template. PHPBB3-9726
* [feature/template-engine] Need to call set_template on template.Oleg Pudeyev2011-08-091-1/+1
| | | | PHPBB3-9726
* [feature/template-engine] Dependency inject locator into template.Oleg Pudeyev2011-08-091-2/+3
| | | | PHPBB3-9726
* [feature/template-engine] Delete useless code from set_template.Oleg Pudeyev2011-08-091-7/+1
| | | | | | | set_custom_template performs these calls, repeating them in set_template is not needed. PHPBB3-9726
* [feature/template-engine] Use template engine class in bbcode class.Oleg Pudeyev2011-08-071-0/+13
| | | | PHPBB3-9726
* [feature/template-engine] More documentation for template class.Oleg Pudeyev2011-08-071-8/+35
| | | | PHPBB3-9726
* [feature/template-engine] Create load_and_render to reduce code duplication.Oleg Pudeyev2011-08-071-7/+13
| | | | PHPBB3-9726
* [feature/template-engine] Get rid of orig_tpl_* in template engine.Oleg Pudeyev2011-08-041-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | The origins of orig_tpl_* are not pretty. Please see the following commits and associated tickets: r9823, r9839, r9847, r10150, r10460. In short, multiple hacks were required due to template engine reading inheritance/storedb flags from $user (global) even when the template that was being looked up or rendered was not the "active style of the current user". We no longer store templates in the database, removing half of the problem. This commit fixes the second half of the problem by deleting set_template_path function from template locator, and moving that logic back into the template class' set_template. set_template now calls set_custom_template, the latter only taking the template path and the fallback paths as parameters. With this change template locator no longer uses $user and does not use phpbb root path either. All logic involving setting the user's "active" template is now encapsulated in a single template class's function, set_template. Setting other templates is done via set_custom_template and the caller is responsible for determining and passing in fallback/inheritance path, if any. PHPBB3-9726
* [feature/template-engine] Delete $style_name param from locator's ↵Oleg Pudeyev2011-08-041-3/+2
| | | | | | | | | set_custom_template. This parameter was unused, it was only used by template's set_custom_template to determine cache file prefix. PHPBB3-9726
* [feature/template-engine] Add constructor to template locator.Oleg Pudeyev2011-08-041-1/+1
| | | | PHPBB3-9726
* [feature/template-engine] Factor template locator out of template class.Oleg Pudeyev2011-07-301-118/+25
| | | | | | | | | | | Template locator is responsible for maintaining mapping from template handles to filenames and paths, and provides resolution services using these mappings. Template locator is aware of template inheritance and is capable of checking template file existence on the filesystem. PHPBB3-9726