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 picoのsmarty pluginによる機能拡張(1)
Summary "HTMLでValidateするフォームメール" という記事を何回か連続で書いてきましたが、この意味がなかなか判りづらいかもしれません。「POSTデータ処理を行うための基準を、HTMLフォームそのものに求める」と書いても、判らない人には判らないでしょう。というわけで、もう少...

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  先任軍曹   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!