Re: custom function failure

From: Date: Tue, 27 Mar 2001 19:20:27 +0000
Subject: Re: custom function failure
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-455@lists.php.net to get a copy of this message
Ok, i did what you said, but now i get one menu-"point" with "H". Nothing more. I did the following: I looked at other custom functions. in every function you do: extract(func_get_arg(0)); so i added it to my code, it's what you said, right? ----- Original Message ----- From: "Andrei Zmievski" <andrei@ispi.net> To: <taliku@balcab.ch> Cc: <smarty@lists.ispi.net> Sent: Tuesday, March 27, 2001 9:05 PM Subject: [smarty] Re: custom function failure On Tue, 27 Mar 2001, taliku@balcab.ch wrote: > The i registred it in Smarty.class.php: > > 'makemenu' => 'smarty_func_makemenu' > > > Now i call the function in my template like this: > > {makemenu > menu="home_/_news","projects","downloads","gaming","my_n-theme","site_info" > qstring=$qstring} > > > But it dont work: i get the half-menu and following errors: > > Warning: Missing argument 2 for smarty_func_makemenu() in > e:\htdocs\n-theme.com\site\smarty.add.php on line 349 > Warning: REG_EMPTY:½empty (sub)expression in > e:\htdocs\n-theme.com\site\smarty.add.php on line 361 > Warning: REG_EMPTY:½empty (sub)expression in > e:\htdocs\n-theme.com\site\smarty.add.php on line 361 > > > Does anyone know the problem? what can i do? The custom functions get passed all the parameters in an array, that is: function myfunc($params) { extract($params); // do stuff here } -Andrei "I still find each day too short for all the thoughts I want to think, all the walks I want to take, all the books I want to read, and all the friends I want to see." -John Burroughs --- You are currently subscribed to smarty as: taliku@balcab.ch To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/

« previous php.smarty.general (#455) next »