Home « Server software «
Documentation: articles/mail.php
articles/mail.php - Mail an article
This script has a form to post a mail message based on an existing article.If the article has been published, is not hidden, and is still alive, then we can assume that the surfer wants to send a link to someone else. In this case the message recipient it still empty, and a link to the page is inserted into the content field.
Else we will assume that the surfer wants to provide some feed-back to the article creator. In this case the message recipient is filled with author's address, if any, and the body of the message is made of the content of the article.
Long lines of the message are wrapped according to Dan's suggestion.
Surfer signature is appended to the message, if any. Else a default signature is used instead, with a link to the site front page.
Senders can select to get a copy of messages.
Messages are sent using utf-8, and are base64-encoded.
Restrictions apply on this page:
- associates and editors are allowed to move forward
- creator is allowed to view the page
- permission is denied if the anchor is not viewable
- article is restricted ('active' field == 'R'), but the surfer is an authenticated member
- public access is allowed ('active' field == 'Y'), and the surfer has been authenticated
- permission denied is the default
If a secret handle has been provided, and if the surfer has not been authenticated, he is automatically logged in as the article creator. This is necessary to authorize the handling of items attached to the anchor, such as comments, file, links or actions.
If the file
demo.flag
exists, the script assumes that this instance
of YACS runs in demonstration mode, and no message is actually posted.The edition time is not limited at all. Some Javascript code polls the server in the background to ensure that session data is not lost during all the time the browser window is opened.
Accepted calls:
- mail.php/<id>
- mail.php?id=<id>
If this article, or one of its anchor, specifies a specific skin (option keyword '
skin_xyz
'),
or a specific variant (option keyword 'variant_xyz
'), they are used instead default values.This script is a reference file of this system.
Voir aussi:
Licence: GNU Lesser General Public License
Auteurs:
- Bernard Paques bernard.paques@bigfoot.com
Testeurs:
- Guillaume Perez