1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-25 04:23:38 +01:00

13 Commits

Author SHA1 Message Date
Oleg Pudeyev
7fdab9c5d7 [ticket/10933] Prose for get_first_file_location.
Also rewrite get_first_template_location prose a little to be
less repetitive with get_first_file_location.

PHPBB3-10933
2012-11-02 19:45:02 -04:00
Vjacheslav Trushkin
ed9a58a6cc [ticket/10756] Fixing variable declarations in style and template classes
Fixing variable declaration, removing function from template locator that does not belong there

PHPBB3-10756
2012-04-19 04:25:25 +02:00
Vjacheslav Trushkin
ea3a2ef223 [ticket/10756] Creating locator interface
Creating locator interface to be used in template class

PHPBB3-10756
2012-04-19 04:15:11 +02:00
Vjacheslav Trushkin
7d414d04ca [feature/merging-style-components] Moving template classes to style
Moving includes/template/ to includes/style/, adding template_ prefix to classes that deal only with templates

PHPBB3-10632
2012-03-14 22:57:58 +02:00
Unknown
7a04c9048c [ticket/9916] Updating header license and removing Version $Id$
PHPBB3-9916
2011-12-31 13:32:52 +00:00
Nils Adermann
7cdc4bba25 [feature/extension-manager] Clear up docs of extension related template changes
PHPBB3-10323
2011-11-18 15:29:32 +01:00
Nils Adermann
ea46feb115 [feature/extension-manager] Add support for templates in extensions.
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
2011-09-29 16:15:53 +02:00
Oleg Pudeyev
db257956aa [feature/template-engine] Corrected an error message in template locator.
PHPBB3-9726
2011-08-07 19:17:22 -04:00
Oleg Pudeyev
f3befa4b29 [feature/template-engine] Remaining documentation.
PHPBB3-9726
2011-08-07 19:07:27 -04:00
Oleg Pudeyev
52f208900f [feature/template-engine] Get rid of orig_tpl_* in template engine.
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
2011-08-04 21:45:42 -04:00
Oleg Pudeyev
1a6250d8b6 [feature/template-engine] Delete $style_name param from locator's set_custom_template.
This parameter was unused, it was only used by template's set_custom_template
to determine cache file prefix.

PHPBB3-9726
2011-08-04 21:24:40 -04:00
Oleg Pudeyev
13536f2be5 [feature/template-engine] Add constructor to template locator.
PHPBB3-9726
2011-08-04 21:23:06 -04:00
Oleg Pudeyev
05b71ca04e [feature/template-engine] Factor template locator out of template class.
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
2011-07-30 17:06:22 -04:00