1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-29 10:39:19 +02:00

168 Commits

Author SHA1 Message Date
Nathaniel Guse
040186418a [feature/twig] Forgot to set up $config in node/php.php
PHPBB3-11598
2013-06-25 20:52:04 -05:00
Nathaniel Guse
6c771a38de [feature/twig] Going back to Twig's handling of cache file names for now
My method was not working correctly, will work on it more later.

PHPBB3-11598
2013-06-25 19:24:32 -05:00
Nathaniel Guse
7a9aec5fda [feature/twig] No longer using the phpbb_template_locator
This functionality is handled by the Twig Filesystem Loader

PHPBB3-11598
2013-06-25 19:23:42 -05:00
Nathaniel Guse
3766b736da [feature/twig] Don't require phpbb_config, some tests pass null
PHPBB3-11598
2013-06-25 18:06:45 -05:00
Nathaniel Guse
1c8c03c4db [feature/twig] INCLUDEPHP token abs paths & fix test
PHPBB3-11598
2013-06-25 16:51:50 -05:00
Nathaniel Guse
8bccba1a2f [feature/twig] INCLUDEPHP token, replace variable usage with $context
I could find no better way to do this...

PHPBB3-11598
2013-06-25 16:27:58 -05:00
Nathaniel Guse
e227f05e9a [feature/twig] INCLUDEPHP token support
PHPBB3-11598
2013-06-25 15:02:55 -05:00
Nathaniel Guse
99b776a4e5 [feature/twig] Add a comment to tpl output if PHP used, but disabled
PHPBB3-11598
2013-06-25 14:59:41 -05:00
Nathaniel Guse
68225d9f29 [feature/twig] Pass parameters required to twig env via constructor
Instead of creating set functions

PHPBB3-11598
2013-06-25 14:58:55 -05:00
Nathaniel Guse
ea785efb30 [feature/twig] PHP token support
PHPBB3-11598
2013-06-25 14:22:40 -05:00
Nathaniel Guse
3ca99f8122 [feature/twig] Append assets_version to includejs tag
Some fixes for main template parser

PHPBB3-11598
2013-06-24 22:37:58 -05:00
Nathan Guse
a1f957af84 [feature/twig] Working on fixing tests
PHPBB3-11598
2013-06-24 15:28:54 -05:00
Nathan Guse
2819a2641b [feature/twig] Only set extensions if extension manager is loaded
PHPBB3-11598
2013-06-24 13:45:23 -05:00
Nathan Guse
309ed5e5c3 [feature/twig] Fixing file header copyrights
PHPBB3-11598
2013-06-24 13:37:22 -05:00
Nathan Guse
1a0819bdc4 [feature/twig] Changing INCLUDEJS behavior
Was:
<!-- INCLUDEJS template/foo.js -->

Now:
<!-- INCLUDEJS T_TEMPLATE_PATH ~ '/foo.js' -->

Reasons for this:
1. INCLUDEJS is 3.1-dev only

2. INCLUDEJS has odd behavior to begin with (arbitrary setting root path
to styles/name/ directory)

3. INCLUDEJS could not include files from outside directories or anywhere
else

4. It was easier to change INCLUDEJS behavior to something more flexible
and useful than hack around it to make it work as it was with Twig.

PHPBB3-11598
2013-06-24 13:32:31 -05:00
Nathan Guse
63143a1a57 [feature/twig] Fix <!-- .blah since the being node was changed
PHPBB3-11598
2013-06-24 12:52:55 -05:00
Nathan Guse
c958155fb6 [feature/twig] Able to set chain of namespaces to search for loadTemplate()
This is done so that when event template files are included, if they
include files themselves, that namespace is checked first, then __main__
is checked to include the correct template file.

Also, when template files are included from a particular namespace, this is
done so that the files from that namespace are included first, then the
main namespace is checked.

We may want to change this behavior in the future to allow choosing which
locations have priority, but for now, this is what I am doing to make sure
the behavior is simple and always the same.

PHPBB3-11598
2013-06-24 12:39:28 -05:00
Nathan Guse
4881085f13 [feature/twig] Use twig->display rather than echo twig->render
PHPBB3-11598
2013-06-24 11:19:54 -05:00
Nathan Guse
3bd281fa27 [feature/twig] Event template tag
PHPBB3-11598
2013-06-24 11:18:29 -05:00
Nathan Guse
62fda07dd4 [feature/twig] Changing method for begin node to not use anonymous function
The way it was setup would actually require PHP 5.4, which isn't an option
right now. Leaving the old code there, just commented out, for now at least.

PHPBB3-11598
2013-06-23 22:28:39 -05:00
Nathaniel Guse
93d94d5cbe [feature/twig] Setup the style chain/loader properly
PHPBB3-11598
2013-06-18 10:37:25 -05:00
Nathaniel Guse
c5db8be580 [feature/twig] Fix begin loops & subloops
PHPBB3-11598
2013-06-15 11:20:10 -05:00
Nathaniel Guse
8561e187f0 [feature/twig] Throw exceptions (don't catch and ignore)
PHPBB3-11598
2013-06-14 09:41:29 -05:00
Nathaniel Guse
9eb3ad4d90 [feature/twig] Add && and || support
PHPBB3-11598
2013-06-14 09:41:02 -05:00
Nathaniel Guse
30a1f21735 [feature/twig] Use twig loader filesystem with namespaces to add paths
Twig now handles loading style files on its own

PHPBB3-11598
2013-06-14 01:00:38 -05:00
Nathan Guse
fa86f45f62 [feature/twig] Use phpBB's resource locator to find templates
PHPBB3-11598
2013-06-12 13:26:20 -05:00
Nathan Guse
74f19830f3 [feature/twig] Some additional operators, more stuff for IF
PHPBB3-11598
2013-06-12 12:48:37 -05:00
Nathan Guse
95884edf08 [feature/twig] Correcting output of INCLUDEJS
PHPBB3-11598
2013-06-12 12:32:56 -05:00
Nathan Guse
612dbad63f [feature/twig] Fixing IF .blah correctly
PHPBB3-11598
2013-06-11 10:57:00 -05:00
Nathan Guse
9acde23a05 [feature/twig] Language output assignments, using context class again
PHPBB3-11598
2013-06-11 09:41:15 -05:00
Nathan Guse
b035697800 [feature/twig] Replace phpBB template with Twig
Move phpbb_template class to phpbb_template_phpbb
Changed phpbb_template class to an interface
Switch services.yml to load phpbb_template_twig instead of phpbb_template

PHPBB3-11598
2013-06-10 12:59:47 -05:00
Nathan Guse
eac3c1f75c [feature/twig] BEGIN loops now work
PHPBB3-11598
2013-06-10 11:57:51 -05:00
Nathan Guse
15114067e6 [feature/twig] Replace phpBB template code with Twig syntax, then parse w/Twig
Fixing begin token/node, adding includejs token/node

PHPBB3-11598
2013-06-10 11:17:11 -05:00
Nathan Guse
b775f67128 [feature/twig] More work on the lexer
Committing what I have now to save it as I'm trying another method next

PHPBB3-11598
2013-06-10 10:00:22 -05:00
Nathan Guse
9f8f500ba3 [feature/twig] Working on DEFINE
PHPBB3-11598
2013-06-10 00:59:06 -05:00
Nathan Guse
87cc8af265 [feature/twig] Support our old INCLUDE statements (no quotes)
Better code for handling IF .blah

PHPBB3-11598
2013-06-09 23:32:39 -05:00
Nathan Guse
1da4be04b0 [feature/twig] WIP extension/lexer/some tokenparsers/nodes
PHPBB3-11598
2013-06-09 22:11:12 -05:00
Nathan Guse
c84fc97e90 [ticket/11435] Create new template filter option (cleanup)
This allows us to only run cleanup on the last run of template compilation
and not cleanup during event parsing

PHPBB3-11435
2013-05-20 11:45:32 -05:00
Nathan Guse
9fab868f0f Merge remote-tracking branch 'remotes/cyberalien/ticket/11482' into develop
# By Vjacheslav Trushkin
# Via Vjacheslav Trushkin
* remotes/cyberalien/ticket/11482:
  [ticket/11482] Use double quotes for code
  [ticket/11482] Unit tests for advanced DEFINE
  [ticket/11482] Implementation of advanced DEFINE tag
2013-05-20 10:47:45 -05:00
Oleg Pudeyev
32f247ed60 [ticket/11435] Fit comment into 80 columns and link to php manual.
PHPBB3-11435
2013-05-01 17:21:49 -04:00
Vjacheslav Trushkin
8567aaed32 [ticket/11482] Use double quotes for code
Use double quotes for code to avoid excessive escaping

PHPBB3-11482
2013-04-10 20:12:03 +03:00
Vjacheslav Trushkin
29a5db25ec [ticket/11482] Implementation of advanced DEFINE tag
Implementation of advanced DEFINE tag and ENDDEFINE

PHPBB3-11482
2013-04-07 19:12:04 +03:00
Marc Alexander
1ebb17c698 [ticket/11323] Reduce additional code and revert regex to previous one
PHPBB3-11323
2013-02-26 21:43:39 +01:00
Marc Alexander
01a2622dc6 [ticket/11323] Correctly treat variables in template defines
Previously, any template variables that were used when defining a variable
were treated as strings. This is a regression to phpBB 3.0. With this
patch the template variables will be properly parsed.

PHPBB3-11323
2013-02-19 16:08:28 +01:00
David King
a9db155c28 Merge remote-tracking branch 'p/feature/template-events' into develop
# By Oleg Pudeyev (36) and others
# Via Oleg Pudeyev
* p/feature/template-events: (47 commits)
  [feature/template-events] Pass arguments in correct order.
  [feature/template-events] Order extensions in mock extension manager.
  [feature/template-events] Changes per imkingdavid's review.
  [feature/template-events] Make style names private on template.
  [feature/template-events] Test for event that is defined in parent style only.
  [feature/template-events] Specify style names, add inheritance tests.
  [feature/template-events] Normalize expected directory trees.
  [feature/template-events] Allow dataset to be correctly selectable.
  [feature/template-events] Dataset for template event testing with inheritance.
  [feature/template-events] Use style names array in template filter.
  [feature/template-events] Generate style names array in set_style.
  [feature/template-events] Convert a single style name to array of them.
  [feature/template-events] Chase dependency injection for template context.
  [feature/template-events] Adjust template events test to use the dataset.
  [feature/template-events] Create a dataset for template event tests.
  [feature/template-events] Indentation fix.
  [feature/template-events] Cosmetic changes.
  [feature/template-events] Wording: wrongly -> improperly.
  [feature/template-events] Indentation fix.
  [feature/template-events] Rename template_name to style_name.
  ...
2012-12-10 14:09:10 -05:00
Oleg Pudeyev
318140b4d6 [ticket/10103] Convert the rest of the tree to flock class.
PHPBB3-10103
2012-12-04 02:26:55 -05:00
Oleg Pudeyev
ec4343c744 [ticket/11227] @return void -> @return null, per coding guidelines.
PHPBB3-11227
2012-11-30 23:03:06 -05:00
Oleg Pudeyev
47a90f815d [feature/template-events] Changes per imkingdavid's review.
PHPBB3-9550
2012-11-17 16:43:40 -05:00
Oleg Pudeyev
da7d888448 [feature/template-events] Make style names private on template.
PHPBB3-9550
2012-11-17 16:43:38 -05:00
Oleg Pudeyev
af47779f51 [feature/template-events] Use style names array in template filter.
This provides a straightforward way of iterating over all styles
looking for templates in extensions.

PHPBB3-9550
2012-11-17 16:42:43 -05:00