mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 11:28:55 +00:00
[feature/template-events] Really basic template hook implementation.
PHPBB3-9550
This commit is contained in:
parent
09aae1ea30
commit
66232031e4
1 changed files with 20 additions and 0 deletions
|
@ -870,6 +870,26 @@ class phpbb_template_filter extends php_user_filter
|
||||||
var_dump($tag_args);
|
var_dump($tag_args);
|
||||||
}
|
}
|
||||||
$location = $tag_args;
|
$location = $tag_args;
|
||||||
|
|
||||||
|
if ($this->phpbb_extension_manager)
|
||||||
|
{
|
||||||
|
$finder = $this->phpbb_extension_manager->get_finder();
|
||||||
|
|
||||||
|
$files = $finder
|
||||||
|
->extension_prefix($location)
|
||||||
|
->extension_suffix('.html')
|
||||||
|
->extension_directory("/styles/universal/template")
|
||||||
|
->get_files();
|
||||||
|
|
||||||
|
$all_compiled = '';
|
||||||
|
foreach ($files as $file)
|
||||||
|
{
|
||||||
|
$compiled = $this->template_compile->compile_file($file);
|
||||||
|
$all_compiled .= $compiled;
|
||||||
|
}
|
||||||
|
return '?>' . $all_compiled . '<?php';
|
||||||
|
}
|
||||||
|
|
||||||
// 1. find all mods defining hooks for location
|
// 1. find all mods defining hooks for location
|
||||||
// 2. obtain mods' template fragments
|
// 2. obtain mods' template fragments
|
||||||
// 3. compile template fragments
|
// 3. compile template fragments
|
||||||
|
|
Loading…
Add table
Reference in a new issue