mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/template-events] Really basic template hook implementation.
PHPBB3-9550
This commit is contained in:
@@ -870,6 +870,26 @@ class phpbb_template_filter extends php_user_filter
|
||||
var_dump($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
|
||||
// 2. obtain mods' template fragments
|
||||
// 3. compile template fragments
|
||||
|
Reference in New Issue
Block a user