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

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

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...

List posts in the topic

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

msg# 1.1
depth:
1
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

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!