Test plugins as loaded modifier, block t update

Update old block t data to match new block t class type

Test if we can load plugin parts, this is a side test for if we want
to not add them to the main Smarty load class

Remove old test source code, no longer needed
This commit is contained in:
2024-08-20 10:56:59 +09:00
parent ea4162dfa6
commit 077b9f28ad
6 changed files with 51 additions and 1700 deletions

View File

@@ -27,6 +27,15 @@ $l10n = new \CoreLibs\Language\L10n(
$encoding
);
// $smarty_ml = new \CoreLibs\Template\SmartyExtend($l10n, 'Smarty5TestCache', 'Smarty5TestCompile');
// $smarty_ml->setTemplateDir('includes/templates/frontend');
// $smarty_ml->setConfigDir('configs');
// $smarty_ml->setCompileDir('templates_c');
// $smarty_ml->setCacheDir('cache');
// $smarty_ml->setSmartyPaths();
// $smarty_ml->setSmartyVarsFrontend();
// $smarty_ml->renderSmarty();
$locale = $l10n->getLocaleAsArray();
\CoreLibs\Language\L10n::loadFunctions();
_setlocale(LC_MESSAGES, $locale['locale']);
@@ -52,10 +61,15 @@ $smarty->registerPlugin(\Smarty\Smarty::PLUGIN_MODIFIER, 'getvar', [&$smarty, 'g
require 'plugins/block.t.php';
$smarty->registerPlugin(\Smarty\Smarty::PLUGIN_BLOCK, 'tp', 'smarty_block_t');
require 'plugins/function.popup_init.php';
require 'plugins/function.popup.php';
$smarty->registerPlugin(\Smarty\Smarty::PLUGIN_FUNCTION, 'popinit', 'smarty_function_popup_init');
$smarty->registerPlugin(\Smarty\Smarty::PLUGIN_FUNCTION, 'pop', 'smarty_function_popup');
// $smarty->testInstall();
$CONTENT_DATA = [
'BASE' => BASE,
// 'TEST_INSTALL' => $smarty->testInstall(),
'HTML_TITLE' => 'Smarty v5 tst',
// smarty test