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)
(products introducing section)
<{capture}>
<{pico id="(content ID describing the form)"}>
<{/capture}>
<{formmail4fleamarket mail_body_pre="A query from visitor exists\nContact him/her soon as possible\n\n" from_name="Product manager" cc_field_name="youremail" cc_mail_subject="A confirmation for your query" cc_mail_body_pre="Thank you for querying us.\nThis is the content you have queried\n"}>
<form>
name: <input type="text" name="name" class="required" /><br />
email: <input type="text" name="youremail" class="email" />
<input type="submit" />
</form>
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..
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() ;
}
}