Lecteur Markdown
Referpage Documentation En
BeamReactor — Module referpage (Page Recommendation) #
Version: 1.15.0
Author: Treveur Bretaudière
Since: 2002
Last updated: 2015-06-21
referpage (Page Recommendation) #Version: 1.15.0
Author: Treveur Bretaudière
Since: 2002
Last updated: 2015-06-21
The referpage module allows visitors to send a link to a page on the site to one or more recipients by email. It is a recommendation / referral system of the "send to a friend" type.
It relies on three files:
| File | Role |
|---|---|
| referpage.php | Main logic: form, validation, email sending |
| referpage_conf_inc.php | Module configuration (display, access level) |
| referpage_fr_inc.php | French locale (+ EN, DE locales available) |
BASE_LEVEL_USER access.mail() function must be operational on the server.getlocale('referpage').frameheader / framefooter) must be active.censor(), Parser::sanitize() and Parser::check() must be available.1. Form display — The user enters their name, email address and one or more recipient addresses separated by semicolons.
2. Validation — The module checks for the name, validity of the sender email and validity of each recipient address.
3. Sending — An email is sent to each valid recipient via mail(). The message contains a link to the recommended page and explanatory text.
4. Result — A summary shows successful and failed sends.
The module can receive a specific page to recommend via the GET parameters query (Base64-encoded URL) and id (MD5 verification hash using $cfg[17] as salt). Without these parameters, the default URL is $cfg[0] (site root URL).
| Variable | Value | Role |
|---|---|---|
| $basedatadisplay | 'no' | No base data display |
| $basedisplevel | BASE_LEVEL_USER | Minimum access level |
The email is sent as plain text (text/plain) with 8bit encoding and includes:
$cfg[0] and $cfg[1])$cfg[19] (additional description)Subject: [locale label] {sender name} ({sender email})
Headers: From, Reply-To, X-Sender, X-Mailer, MIME, Content-Type, Content-Transfer-Encoding.
| Field | Validation |
|---|---|
| Sender name | Required, cleaned via Parser::sanitize($str, 'string', maxLength: 150), filtered by censor() |
| Sender email | Required, validated via Parser::check($email, 'email') |
| Recipient emails | Separated by ;, each individually validated, at least one required |