Skip to main content Help Control Panel

Aubagne HipHop

Tout le Hip Hop d'Aubagne et des alentours

Home «   Server software «  

Documentation: articles/edit.php

articles/edit.php - Create a new article or edit an existing one

This is the main script used to post a new page, or to modify 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.

This script attempts to validate the new or updated article description against a standard PHP XML parser. The objective is to spot malformed or unordered HTML and XHTML tags. No more, no less.

Advanced options are available in a folded division.

If a publication date is provided, YACS will wait for the given date before listing the page - automatically. Note that no external server will be pinged with this way of publishing pages. Pings require either to use the publishing script (articles/publish.php), or to trigger explicit ping (servers/ping.php).

Note that in Wiki mode (i.e. with_auto_publish set to 'Y'), or in forum sections (i.e. with option 'auto_publish'), posted pages are published as well.

Optional publication and expiration dates are automatically translated from and to the surfer time zone and the server time zone.

The permission assessment is based upon following rules applied in the provided orders:

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.

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:

If no anchor data is provided, a list of sections is proposed to let the surfer select one of them.

There is also a special invocation format to be used for direct blogging from bookmarklets, such as the one provided by YACS for each section (see sections/view.php), or the one dedicated to users of Internet Explorer (see articles/ie_bookmarklet.php).

This format is aiming to provide to YACS every necessary parameters, but through a single GET or POST call. Following parameters have to be provided:

If no authentication data is provided (account and password), the surfer is redirected to the login page at users/login.php.

Data submitted from a bookmarklet is saved as session data. Therefore information is preserved through any additional steps, including user authentication and section selection.

Also, session data is purged on successful article post.

This design allows for a generic bookmarklet (i.e., not restricted to a section) bound only to the web site.

This bookmarklet is proposed as a direct link to any authenticated member:

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:

Testeurs:

Reste à faire:

Tools
Browse the source of this script
Server software