[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-general
Subject:    [SMARTY] problems registering block plugins
From:       Pupeno <pupeno () pupeno ! com ! ar>
Date:       2002-05-17 7:16:46
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

As I didn't found any ignore block tag I wanted to create mine and I wanted to 
do it with the plugin system and I couldn't do it.
I did it by hand this way:
$smarty->register_block("ignore", "smarty_block_ignore");
function smarty_block_ignore($params, $content, &$smarty){
// preaty simple function, hu?
}
and it didn't work, I've got errors complaining aganst ignore and /ignore:

Notice code: E_USER_WARNING
Notice message: Smarty plugin error: [in en/home.html line 1]: unknown tag - 
'ignore'
Script name: [...]/include/Smarty.class.php
Line number of the warning: 1808

and

Notice code: E_USER_WARNING
Notice message: Smarty plugin error: [in en/home.html line 14]: unknown tag - 
'/ignore'
Script name: [...]include/Smarty.class.php
Line number of the warning: 1808

and at the end:
Fatal error: Call to undefined function: () in 
[...]/templates_c/181/1815391471/0.php on line 5
 
and if you're intrested in thouse lines:
<?php /* Smarty version 2.1.1, created on 2002-05-17 02:58:55
         compiled from en/home.html */ ?>
<?php $this->_load_plugins(array(
array('function', 'ignore', 'en/home.html', 1, false),
array('function', '/ignore', 'en/home.html', 14, false),)); ?><?php 
$this->_plugins['function']['ignore'][0](array(), $this); if($this->_extract) 
{ extract($this->_tpl_vars); $this->_extract=false; } ?>
<html>
<head>
<title>
 
Did I do something wrong ?
While tryint to do it by files, I've created block.ignore.php with the same 
results.
Thank you.
- -- 
Pupeno: pupeno@pupeno.com.ar
http://www.pupeno.com.ar
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE85K5fWhjnmGRO4vQRAl7CAJ9ARH1SCbbQDY0Xryj1GO201DA/ggCfR4mY
t8gAPc+mlWt3A7B4cFuUn2A=
=u6Cq
-----END PGP SIGNATURE-----


-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic