Re: [SMARTY] Custom plug in : completely confused....
| From: | Luc Saint-Elie | Date: | Sat, 13 Apr 2002 21:16:47 +0000 |
| Subject: | Re: [SMARTY] Custom plug in : completely confused.... | ||
| References: | 1 2 3 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3684@lists.php.net to get a copy of this message | ||
Linus,
You're lucky :)
I get :
Notice: Undefined index: browser in T:\EasyPHP\www\projet1\templates_c\N77\N7790340\0.php on line 15
And this infamous line 15 is :
<?php
$this->_plugins['function']['sniff_browser'][0](array(), $this);
if($this->_extract) {
extract($this->_tpl_vars);
$this->_extract=false;
}
?>
<?php
echo $this->_tpl_vars['browser']['type'];?> Luc At 23:10 13/04/02 +0200, Linus McCabe wrote:
Hi! I tried to use your plugin, and it seems to work fine! WHat exactly is the problem you're having? This is what i did: Put the file in the plugindir. in my tpl, i write: {sniff_browser} {$browser.type} and i get 'Opera' on my page! I noticed though, that before I removedan error from the pluginfile (a comment had lined-wrapped) smarty just cut off output without any message. Not sure why. /l