Skip to main content Help Control Panel

Aubagne HipHop

Tout le Hip Hop d'Aubagne et des alentours

Home «   Server software «  

Documentation: agents/uploads.php

class Uploads - Process uploads

The hook 'tick' triggers periodic checks of the inbox/entries directory. If a file, uploaded from handx weblog, is found, its content is parsed, related pages are created, and it is then archived.

handx weblog generates one file per day, containing all entries for the day. YACS uses such files as input queues.

YACS parses input queues and uses regular expressions to split weblog entries. The date of the entry is taken from the file name. The hour is taken from the standard separator. The content may use standard yacs codes, plus specific elements <title>, <introduction> and <source>. If no title element is provided, the first sentence is used instead.

Note that YACS parser does not support customised separators. Please be careful to not change related parameters in weblog configuration.

Following parameters are used while processing uploaded weblog entries:

These parameters are set in agents/configure.php, and saved in agents/parameters.include.php.

Items processed by YACS are saved in backup queues. Backup queues have the same names than input queues, with an additional .bak extension. Basically, you just have to suppress the .bak extension to make YACS process related entries again.

This script is a reference file of this system.

Licence: GNU Lesser General Public License

Auteurs:

list_files() - List files into one directory

function list_files($path)

process_handx_entry() - Process one handx entry

function process_handx_entry($text, $stamp=NULL)

This function actually creates an article out an entry

process_handx_weblog() - Process one file uploaded by handx weblog

function process_handx_weblog($file)

tick_hook() - Process new uploads, if any

function tick_hook()

This function checks the input queue, and process new files on their arrival.

This function is aiming to run silently, therefore errors are logged in a file.
Tools
Browse the source of this script
Server software