Extending features of pico by smarty plugins(1)

Date 2007-09-23 15:41:58 | Category: XOOPS

in englishin japanese
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"}>


Also, you have to make a content like this.

<form>
  name: <input type="text" name="name" class="required" /><br />
  email: <input type="text" name="youremail" class="email" />
  <input type="submit" />
</form>

This content ID(number) will be specified the former content.
You can make a variety of forms, and specify their numbers as you like.

Of course, you can make form contents into the other pico module instance.
You can specify the form content by "dirname" parameter.h
<{pico id="(conent ID)" dirname="(dirname)"}>

Now we look long parameters of <{formmail}>.
Their parameters controls "mail actions".

legend)
mail_body_pre: specifying body part before the query content. (from XOOPS to adminmail)
from_name: specifying sender name
cc_field_name: specifying a field name for sending "confirming mail" to form poster.
cc_mail_subject: specifying Subject of "confirming mail"
cc_mail_body_pre: specifying body part before the query content of "confirming mail"




You can read more news at PEAK XOOPS.
http://xoops.peak.ne.jp

The URL for this story is:
http://xoops.peak.ne.jp/md/news/index.php?page=article&storyid=443