|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
prec Smarty n00b
Joined: 08 Sep 2003 Posts: 2
|
Posted: Mon Sep 08, 2003 12:41 pm Post subject: Problems with register_modifier or alike! |
|
|
As i see it, the following code should work:
Code: |
<?php
class test
{
function test2() {
echo "test";
}
}
$test = new test;
require_once("lib/Smarty.class.php");
$Smarty = new Smarty;
$Smarty->register_function("test", array(&$test, "test2"));
$Smarty->display("test.tpl");
?>
|
but it returns:
Fatal error: Smarty error: [in test.tpl line 1]: [plugin] function 'test' is not implemented (Smarty.class.php, line 2462) in D:\wwwroot\goldenarrow\lib\Smarty.class.php on line 2652
Is this a bug, or me? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Sep 08, 2003 12:43 pm Post subject: |
|
|
you need Smarty-2.6.0-RC1 for that. |
|
Back to top |
|
prec Smarty n00b
Joined: 08 Sep 2003 Posts: 2
|
Posted: Mon Sep 08, 2003 12:50 pm Post subject: |
|
|
I updated to 2.6-RC1
now it returns:
Fatal error: Call to undefined function: _load_plugins() in D:\wwwroot\goldenarrow\templates_c\%%183\%%1836865061\test.tpl.php on line 3 |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Sep 08, 2003 12:51 pm Post subject: |
|
|
you have to wipe out everything in "templates_c/" and in "cache/" after upgrading. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|