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 picoのsmarty pluginによる機能拡張(1)
Summary "HTMLでValidateするフォームメール" という記事を何回か連続で書いてきましたが、この意味がなかなか判りづらいかもしれません。「POSTデータ処理を行うための基準を、HTMLフォームそのものに求める」と書いても、判らない人には判らないでしょう。というわけで、もう少...
Previous post - Next post | Parent - Children.1 .2 | Posted on 2007/9/29 7:41 | Last modified
gigamaster  三等軍曹 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  先任軍曹   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  三等軍曹 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!