Home « Server software «
Documentation: comments/edit.php
comments/edit.php - Post a new comment or update an existing one
On anonymous usage YACS attempts to stop robots by generating a random string and by asking user to type it.A button-based editor is used for the description field. It's aiming to introduce most common codes supported by YACS. Also, sample smilies are displayed, and may be used to introduce related codes into the description field.
A preview mode is available before actually saving the comment in the database.
This script attempts to validate the new or updated comment against a standard PHP XML parser. The objective is to spot malformed or unordered HTML and XHTML tags. No more, no less.
Surfer signature is automatically appended to new comments, if any.
On new comment by a non-associate a mail is sent to the system operator. Also, a mail message is sent to the article creator if he/she has a valid address.
As a very first countermeasure against weblog spammers URI are not allowed into anonymous comments.
Associates have the opportunity to attach this comment to another article.
The permission assessment is based upon following rules applied in the provided orders:
- on modification, associates and authenticated editors are allowed to move forward
- on new post, associates and editors are allowed to move forward
- permission is denied if the anchor is not viewable
- surfer created the comment
- this is a new post and the surfer is an authenticated user
- this is a new post and anonymous posts have been allowed
- permission denied is the default
When permission is denied, anonymous (not-logged) surfer are invited to register to be able to post new comments.
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:
- edit.php/<type>/<id> create a new comment for this anchor
- edit.php?anchor=<type>:<id> create a new comment for this anchor
- edit.php/quote/<id> quote an existing comment
- edit.php?quote=<id> quote an existing comment
- edit.php/reply/<id> reply to an existing comment
- edit.php?reply=<id> reply to an existing comment
- edit.php/<id> modify an existing comment
- edit.php?id=<id> modify an existing comment
If the anchor for this item 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
- Vincent Noël
Testeurs:
- GnapZ
- Manuel López Gallego
- Eoin
Reste à faire:
- allow for a side post of an image