|
Cookbook /
TellAFriendSummary: Gives Form to Send Page to Friend
Version: 2.1.3 (3.0.0 under development)
Prerequisites:
Status: Beta
Maintainer: BenWilson
Categories:
Discussion: TellAFriend-Talk
File: tellafriend-2.1.phpΔ Stable
File: tellafriend-3.0.0.zipΔ (Development)
AbstractWhen visitors visit a page they find interesting, they share the page with others. PmWiki does not provide native support for sharing pages with others via a web form. This recipe allows the site administrator to create a form interface allowing visitors to share pages, including robust email validation. Significant Changes of Version 3.0.0Version 3.0 is a ground-up rewrite of this recipe. This recipe relies on
the XPertMailer package to send
the email, rather than PHP's This version also introduces a three-tiered approach to validating both the sender's email and the email addresses of recipients. This is done first by validating the format of the email address. Then, the domain of each email address is queried to determine whether it has a valid MX record. Having a valid MX record tells us that the domain receives email. If no such MX record exists, then the software seeks to verify that the domain itself exists. If the email address is validly formed and has either an MX record or valid domain, then the address is accepted. Previous versions of this recipe required the site administrator to know HTML in order to define a different form than the one provided. Version 3 uses a wiki page instead, which allows the site administrator to write the form using PmWiki markup. InstallationInstalling the Software. To use Tell-A-Friend, you will need to expand the compressed file (i.e.
the '.zip' file) in your wiki's cookbook directory (typically
Setting Key Variables. Key variables to set include Create Form Page. Finally, the site administrator must create the
form page. No form is provided by default. The default location for this
is
{$TAFErrors}
(:table id=taf border=0:)
(:cellnr:)Your Name
(:cell:)(:input form id=taf method=post:)
(:input text name='name' size=30:)
(:cellnr:)Your Email
(:cell:)(:input text name='email' size=30:)
(:cellnr:)Send To:
(:cell:)(:input text name='to' size=40:)
(:cellnr:)Send Copy to Self:
(:cell:)(:input checkbox chkSendSelf 1:)
(:cellnr:)Message:
(:cell:)(:input textarea name='text' cols=40 rows=5 noscroll=noscroll:)
(:input hidden name='ip' value='':)
(:input hidden name='action' value='taf':)
(:input submit name=post value="Go":)
(:input end:)
(:tableend:)
Locating the Form. Tell-A-Friend uses the standard PmWiki
directive markup to position the form. In order to place the form, use
the Known Issues
History
Contributors
See Also
User notes?: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |