1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-25 12:33:29 +01:00

64 Commits

Author SHA1 Message Date
Vjacheslav Trushkin
63b41913a4 [ticket/10799] Removing global variable from includejs
Removing global $phpbb_root_path from includejs implementation

PHPBB3-10799
2012-05-01 18:25:11 +03: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
d91abbb146 [ticket/10756] Renaming phpbb_style_template to phpbb_template
Renaming phpbb_style_template to phpbb_template

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
ef295a2860 [ticket/10756] Renaming template classes
Renaming template classes from phpbb_style_template_ to phpbb_template_

PHPBB3-10756
2012-04-19 04:15:11 +02:00
Vjacheslav Trushkin
733018f99a [ticket/10756] Moving template classes
Moving template class files from includes/style/ to includes/template/ and removing template_ file prefix

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
Vjacheslav Trushkin
a98117b229 [feature/append_var] Adding append_var template class function
Adding append_var template class function

PHPBB3-10666
2012-03-05 02:41:42 +02:00
Vjacheslav Trushkin
5aad71b220 [ticket/10652] Fixing typo in template class
Fixing typo in template class that prevents template inheritance from working

PHPBB3-10652
2012-02-15 18:46:27 +02:00
Igor Wiedler
dd495e7a14 Merge pull request #526 from p/ticket/10500
Ticket/10500 Miscellaneous issues in the new template engine
2012-02-14 15:41:15 -08:00
Unknown
7a04c9048c [ticket/9916] Updating header license and removing Version $Id$
PHPBB3-9916
2011-12-31 13:32:52 +00:00
Oleg Pudeyev
552df1f6eb [ticket/10500] Use correct class name in @uses.
PHPBB3-10500
2011-12-03 21:15:29 -05: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
024a5e710e [feature/extension-manager] Correctly reset paths in set_template
PHPBB3-10323
2011-09-29 16:15:54 +02:00
Nils Adermann
e52022c572 [feature/extension-manager] Make sure named styles are loaded from root dir
PHPBB3-10323
2011-09-29 16:15:54 +02:00
Nils Adermann
4d08d769c2 [feature/extension-manager] Fallback template might not always be set
PHPBB3-10323
2011-09-29 16:15:53 +02:00
Nils Adermann
703fcae382 [feature/extension-manager] Reset all template paths after a set_templates call
PHPBB3-10323
2011-09-29 16:15:53 +02:00
Nils Adermann
520a5f9295 [feature/extension-manager] Refactoring the structure of extension provider
PHPBB3-10323
2011-09-29 16:15:53 +02:00
Nils Adermann
482a8c47ea [feature/extension-manager] Don't use the extension manager during install
Template needs to be able to work without extensions.

PHPBB3-10323
2011-09-29 16:15:53 +02: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
Andreas Fischer
af66fbb93b Merge branch 'develop' of git://github.com/phpbb/phpbb3 into develop
* 'develop' of git://github.com/phpbb/phpbb3:
  [ticket/10392] Alter parent namespace stripping.
  [ticket/10392] Test for magic loop variables with nested namespaces.
  [ticket/10392] Missed fix for S_BLOCK_NAME.
  [ticket/10392] Fix access to nested special block variables.
2011-09-27 20:24:16 +02:00
Chris Smith
1f14013093 [ticket/10392] Alter parent namespace stripping.
PHPBB3-10392
2011-09-27 01:06:43 +01:00
Chris Smith
02a24e2439 [ticket/10392] Missed fix for S_BLOCK_NAME.
PHPBB3-10392
2011-09-27 00:50:53 +01:00
Chris Smith
0f589d9ce4 [ticket/10392] Fix access to nested special block variables.
PHPBB3-10392
2011-09-26 20:52:07 +01:00
Andreas Fischer
d01c028c1c Merge remote-tracking branch 'cs278/ticket/10384' into develop
* cs278/ticket/10384:
  [ticket/10384] Language variable replacements should not check for var prefix.
  [ticket/10384] Update unit tests to test for failing variable.
2011-09-24 22:21:05 +02:00
Chris Smith
e9392bbdde [ticket/10384] Language variable replacements should not check for var prefix.
PHPBB3-10384
2011-09-24 20:50:35 +01:00
Chris Smith
95d24e6fb7 [ticket/10375] Rework $source_file setting.
Only set the file if an mtime check or recompile are required.

PHPBB3-10375
2011-09-21 13:24:04 +01:00
Chris Smith
9d5e9af54b [ticket/10375] Make _tpl_load() a little leaner.
- Removed duplicate variables
- Set $source_file earlier for cache checks
- Fixed useless mtime check

PHPBB3-10375
2011-09-21 13:17:51 +01:00
Chris Smith
25aee49ca5 [ticket/10375] Use existing method to generate cache file name.
PHPBB3-10375
2011-09-21 13:17:10 +01:00
Chris Smith
903bc5b78a [ticket/10374] Remove 'custom template' cache prefix.
PHPBB3-10374
2011-09-20 23:33:08 +01:00
Patrick Webster
b5a79009ce [ticket/10322] Separate template varref resolution from output generation
Most template variables can now have their PHP variable name resolved instead
of only compiling directly. This allows for the use of block vars in INCLUDE
statements. This does not work for language variables since they require
multiple checks. Added tests for the new types of allowed INCLUDEs.

PHPBB3-10322
2011-09-16 01:46:42 -05:00
Patrick Webster
fbec7c9b2b [ticket/10322] Fix dynamic template includes
Dynamic template includes from variables was not implemented in the new
templating system.

PHPBB3-10322
2011-09-08 16:51:22 -05:00
Vjacheslav Trushkin
0cb539ed72 [ticket/10350] Fix for class phpbb_template_renderer_eval
Fixing bug in class phpbb_template_renderer_eval

PHPBB3-10350
2011-09-04 23:25:54 +03:00
Oleg Pudeyev
41de09e408 [feature/template-engine] Delete _get_locator function.
It is no longer needed as locator is injected into template.

PHPBB3-9726
2011-08-13 23:49:54 -04:00
Oleg Pudeyev
fb8a1d999f [feature/template-engine] Need to call set_template on template.
PHPBB3-9726
2011-08-09 23:33:47 -04:00
Oleg Pudeyev
acb767f14d [feature/template-engine] Dependency inject locator into template.
PHPBB3-9726
2011-08-09 23:28:40 -04:00
Oleg Pudeyev
66232035aa [feature/template-engine] Delete useless code from set_template.
set_custom_template performs these calls, repeating them in
set_template is not needed.

PHPBB3-9726
2011-08-09 23:20:54 -04:00
Oleg Pudeyev
df46a576e9 [feature/template-engine] Use template engine class in bbcode class.
PHPBB3-9726
2011-08-07 19:26:28 -04: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
02fc533066 [feature/template-engine] More documentation for template class.
PHPBB3-9726
2011-08-07 15:42:04 -04:00
Oleg Pudeyev
0b381516a0 [feature/template-engine] Create load_and_render to reduce code duplication.
PHPBB3-9726
2011-08-07 15:35:35 -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
Oleg Pudeyev
4126a571ac [feature/template-engine] Delete $files_template property.
This seems to have been used for db storage of templates.
We no longer offer db storage of templates, and thus currenty
$files_template is only written to but not read anywhere.

PHPBB3-9726
2011-07-30 15:20:25 -04:00
Oleg Pudeyev
e116561348 [feature/template-engine] Rename is_absolute to phpbb_is_absolute.
PHPBB3-9726
2011-07-24 13:37:46 -04:00
Igor Wiedler
bf34264f4f [feature/template-engine] Docblocks, no more constructor for filter
Add docblocks for phpbb_template_filter, remove the useless constructor.

PHPBB3-9726
2011-07-16 15:24:14 +02:00
Oleg Pudeyev
e43d8732d4 [feature/template-engine] Add ampersands to return refs by reference.
PHPBB3-9726
2011-07-10 03:45:57 -04:00