PEAK XOOPS - Re: Extending features of pico by smarty plugins(1) in englishin japanese

Top  >  Comments  >  News comment ()

Re: Extending features of pico by smarty plugins(1)

  • As this forum is only for commentation, you cannot open a new topic
  • Guests cannot post into this forum
Target News
Subject Extending features of pico by smarty plugins(1)
Summary Now, I show a practical examples how to use pico's formmail system.Case 1:"Implant forms after product presentation pages"You can easily achive it using pico's smarty plugisn "pico" and "formmail".Make a content like this. (Turn "Smarty" filter on) (p...
Previous post - Next post | Parent - Children.1 .2 | Posted on 2007/9/29 7:41 | Last modified
gigamaster  Sergeant From: Geneva, Switzerland  Posts: 94
After translation, i start to play with Pico,
as you all know now, my favorite module

And as usual i start to put my self in troubles
changing "formmail4fleamarket" to "formvalidation"
I had to go through phpmyadmin to fix smarty bug..

Finally I reset everything and start with a new form.
Please, check the following : example.
Votes:1 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2007/9/30 6:11 | Last modified
GIJOE  Gunnery Sergeant   Posts: 4110
hi gigamaster.

Quote:

And as usual i start to put my self in troubles
changing "formmail4fleamarket" to "formvalidation"
I had to go through phpmyadmin to fix smarty bug..
If you copy the smarty plugin like "formmail" with different name, you have to change the code of the plugin.

function smarty_function_formmail( $params , &$smarty )
{
	$controller =& new PicoFormProcessBySmartyFormmail() ;
	$controller->parseParameters( $params ) ;

	// toEmails from 'adminmail'
	if( empty( $controller->toEmails ) ) {
		if( trim( $GLOBALS['xoopsConfig']['adminmail'] ) != '' ) {
			$controller->toEmails[] = $GLOBALS['xoopsConfig']['adminmail'] ;
		}
	}

	$controller->execute( $params , $smarty ) ;
}


class PicoFormProcessBySmartyFormmail extends PicoFormProcessBySmartyBase
{
	function __construct()
	{
		$this->mypluginname = 'formmail' ;
	}

	function executeLast()
	{
		$this->sendMail() ;
	}

}
Votes:3 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2007/9/30 6:43 | Last modified
gigamaster  Sergeant From: Geneva, Switzerland  Posts: 94
Hi Gijoe,

My fault. I was waiting to finish modules translation and start to play with Pico.
So, I did not read the "README" file and i put myself in troubles with my smarty bug

I promise. Next time i will try to calm and start with README - that is also why that file exist !

Votes:3 Average:3.33

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!