Hello Group.
My set up is as follows:
In folder libs
Savant3 //folder
tpl // template folder
ini.php // the brain behind it all
Savant3.php
___________________________________________________
In ini.php:
$path = dirname(__FILE__);
require_once 'Savant3.php';
$config = array('template_path' => $path.'/tpl/', 'plugins' =>
$path.'????');
$tpl = new Savant3($config);
$tpl->title = 'zee title';
$tpl->keywords = 'keywords...';
$tpl->description = 'el description';
___________________________________________________
In index.php // the file that display the error below.
require_once 'libs/ini.php';
$tpl->assign('rows',$rows); // $rows from db, works fine
$tpl->title = 'local title...';
$tpl->display('index.tpl.php');
____________________________________________________
In index.tpl.php
<?php foreach($this->rows as $key => $val): ?>
<div><?php $this->_($val['id']) ?></div>
<div><?php echo $this->_($val['str']) ?></div>
<?php endforeach; ?>
_________________________________________________
I get the following error:
Savant3_Error: Array ( [code] => ERR_PLUGIN [info] => Array ( [method]
=> _ ) [level] => 256 [trace] => Array ( [0] => Array ( [file] => /
chroot/home/anonco/
anon.com/html/wb/libs/Savant3.php [line] => 1296
[function] => __construct [class] => Savant3_Error [type] => ->
[object] => Savant3_Error Object ( [code] => ERR_PLUGIN [info] =>
Array ( [method] => _ ) [level] => 256 [trace] => Array *RECURSION* )
[args] => Array ( [0] => Array ( [code] => ERR_PLUGIN [info] => Array
( [method] => _ ) [level] => 256 [trace] => 1 ) ) ) [1] => Array
( [file] => /chroot/home/anonco/
anon.com/html/wb/libs/Savant3.php
[line] => 290 [function] => error [class] => Savant3 [type] => ->
[object] => Savant3 Object ( [__config:protected] => Array
( [template_path] => Array ( [0] => /chroot/home/anonco/
anon.com/html/
wb/libs/tpl/ [1] => ./ ) [resource_path] => Array ( [0] => /chroot/
home/anonco/
anon.com/html/wb/libs/Savant3/resources/ ) [error_text] =>
template error, examine fetch() result [exceptions] => [autoload] =>
[compiler] => [filters] => Array ( ) [plugins] => Array ( ) [template]
=> [plugin_conf] => Array ( ) [extract] => [fetch] => /chroot/home/
anonco/
anon.com/html/wb/libs/tpl/index.tpl.php [escape] => Array ( [0]
=> htmlspecialchars ) ) [title] => local title... [keywords] =>
keywords... [description] => el description [rows] => Array ( [0] =>
Array ( [id] => 1 [0] => 1 [str] => zxsxzx [1] => zxsxzx ) ) ) [args]
=> Array ( [0] => ERR_PLUGIN [1] => Array ( [method] => _ ) ) ) [2] =>
Array ( [file] => /chroot/home/anonco/
anon.com/html/wb/libs/
Savant3.php [line] => 180 [function] => plugin [class] => Savant3
[type] => -> [object] => Savant3 Object ( [__config:protected] =>
Array ( [template_path] => Array ( [0] => /chroot/home/anonco/
anon.com/
html/wb/libs/tpl/ [1] => ./ ) [resource_path] => Array ( [0] => /
chroot/home/anonco/
anon.com/html/wb/libs/Savant3/resources/ )
[error_text] => template error, examine fetch() result [exceptions] =>
[autoload] => [compiler] => [filters] => Array ( ) [plugins] => Array
( ) [template] => [plugin_conf] => Array ( ) [extract] => [fetch] => /
chroot/home/anonco/
anon.com/html/wb/libs/tpl/index.tpl.php [escape] =>
Array ( [0] => htmlspecialchars ) ) [title] => local title...
[keywords] => keywords... [description] => el description [rows] =>
Array ( [0] => Array ( [id] => 1 [0] => 1 [str] => zxsxzx [1] =>
zxsxzx ) ) ) [args] => Array ( [0] => _ ) ) [3] => Array ( [function]
=> __call [class] => Savant3 [type] => -> [object] => Savant3 Object
( [__config:protected] => Array ( [template_path] => Array ( [0] => /
chroot/home/anonco/
anon.com/html/wb/libs/tpl/ [1] => ./ )
[resource_path] => Array ( [0] => /chroot/home/anonco/
anon.com/html/wb/
libs/Savant3/resources/ ) [error_text] => template error, examine
fetch() result [exceptions] => [autoload] => [compiler] => [filters]
=> Array ( ) [plugins] => Array ( ) [template] => [plugin_conf] =>
Array ( ) [extract] => [fetch] => /chroot/home/anonco/
anon.com/html/wb/
libs/tpl/index.tpl.php [escape] => Array ( [0] => htmlspecialchars ) )
[title] => local title... [keywords] => keywords... [description] =>
el description [rows] => Array ( [0] => Array ( [id] => 1 [0] => 1
[str] => zxsxzx [1] => zxsxzx ) ) ) [args] => Array ( [0] => _ [1] =>
Array ( [0] => zxsxzx ) ) ) [4] => Array ( [file] => /chroot/home/
anonco/
anon.com/html/wb/libs/tpl/index.tpl.php [line] => 6 [function]
=> _ [class] => Savant3 [type] => -> [object] => Savant3 Object
( [__config:protected] => Array ( [template_path] => Array ( [0] => /
chroot/home/anonco/
anon.com/html/wb/libs/tpl/ [1] => ./ )
[resource_path] => Array ( [0] => /chroot/home/anonco/
anon.com/html/wb/
libs/Savant3/resources/ ) [error_text] => template error, examine
fetch() result [exceptions] => [autoload] => [compiler] => [filters]
=> Array ( ) [plugins] => Array ( ) [template] => [plugin_conf] =>
Array ( ) [extract] => [fetch] => /chroot/home/anonco/
anon.com/html/wb/
libs/tpl/index.tpl.php [escape] => Array ( [0] => htmlspecialchars ) )
[title] => local title... [keywords] => keywords... [description] =>
el description [rows] => Array ( [0] => Array ( [id] => 1 [0] => 1
[str] => zxsxzx [1] => zxsxzx ) ) ) [args] => Array ( [0] =>
zxsxzx ) ) [5] => Array ( [file] => /chroot/home/anonco/
anon.com/html/
wb/libs/Savant3.php [line] => 1072 [args] => Array ( [0] => /chroot/
home/anonco/
anon.com/html/wb/libs/tpl/index.tpl.php ) [function] =>
include ) [6] => Array ( [file] => /chroot/home/anonco/
anon.com/html/
wb/libs/Savant3.php [line] => 1004 [function] => fetch [class] =>
Savant3 [type] => -> [object] => Savant3 Object ( [__config:protected]
=> Array ( [template_path] => Array ( [0] => /chroot/home/anonco/
anon.com/html/wb/libs/tpl/ [1] => ./ ) [resource_path] => Array ( [0]
=> /chroot/home/anonco/
anon.com/html/wb/libs/Savant3/resources/ )
[error_text] => template error, examine fetch() result [exceptions] =>
[autoload] => [compiler] => [filters] => Array ( ) [plugins] => Array
( ) [template] => [plugin_conf] => Array ( ) [extract] => [fetch] => /
chroot/home/anonco/
anon.com/html/wb/libs/tpl/index.tpl.php [escape] =>
Array ( [0] => htmlspecialchars ) ) [title] => local title...
[keywords] => keywords... [description] => el description [rows] =>
Array ( [0] => Array ( [id] => 1 [0] => 1 [str] => zxsxzx [1] =>
zxsxzx ) ) ) [args] => Array ( [0] => index.tpl.php ) ) [7] => Array
( [file] => /chroot/home/anonco/
anon.com/html/wb/libs/Savant3.php
[line] => 991 [function] => getOutput [class] => Savant3 [type] => ->
[object] => Savant3 Object ( [__config:protected] => Array
( [template_path] => Array ( [0] => /chroot/home/anonco/
anon.com/html/
wb/libs/tpl/ [1] => ./ ) [resource_path] => Array ( [0] => /chroot/
home/anonco/
anon.com/html/wb/libs/Savant3/resources/ ) [error_text] =>
template error, examine fetch() result [exceptions] => [autoload] =>
[compiler] => [filters] => Array ( ) [plugins] => Array ( ) [template]
=> [plugin_conf] => Array ( ) [extract] => [fetch] => /chroot/home/
anonco/
anon.com/html/wb/libs/tpl/index.tpl.php [escape] => Array ( [0]
=> htmlspecialchars ) ) [title] => local title... [keywords] =>
keywords... [description] => el description [rows] => Array ( [0] =>
Array ( [id] => 1 [0] => 1 [str] => zxsxzx [1] => zxsxzx ) ) ) [args]
=> Array ( [0] => index.tpl.php ) ) [8] => Array ( [file] => /chroot/
home/anonco/
anon.com/html/wb/index.php [line] => 24 [function] =>
display [class] => Savant3 [type] => -> [object] => Savant3 Object
( [__config:protected] => Array ( [template_path] => Array ( [0] => /
chroot/home/anonco/
anon.com/html/wb/libs/tpl/ [1] => ./ )
[resource_path] => Array ( [0] => /chroot/home/anonco/
anon.com/html/wb/
libs/Savant3/resources/ ) [error_text] => template error, examine
fetch() result [exceptions] => [autoload] => [compiler] => [filters]
=> Array ( ) [plugins] => Array ( ) [template] => [plugin_conf] =>
Array ( ) [extract] => [fetch] => /chroot/home/anonco/
anon.com/html/wb/
libs/tpl/index.tpl.php [escape] => Array ( [0] => htmlspecialchars ) )
[title] => local title... [keywords] => keywords... [description] =>
el description [rows] => Array ( [0] => Array ( [id] => 1 [0] => 1
[str] => zxsxzx [1] => zxsxzx ) ) ) [args] => Array ( [0] =>
index.tpl.php ) ) ) )
Can anyone see what I am missing?