This page will attempt to explain the process flow of the Aneuch script. It might be useful to both contributors to the mainline Aneuch source, as well as plugin developers.
This is the very first subroutine called. It calls the following:
Determines $Url, $ShortUrl, $ScriptName and $ShortScriptName
Executes $ConfFile (default 'config.pl'), which sets user-configured variables
Initializes default variables. If a variable was set in the previous step (InitConfig) it will not be over-written. This is also where several "special" things get declared via:
This is where all plugins get loaded. Plugins should end in the extensions '.pl' or '.pm', and be in the $PluginDir directory.
Initializes the template (see Themes). If no $Template is set (which should be the name of a directory in the $TemplateDir), use the default template (which is at the end of the script, in the DATA section.
Handles the current request. The following are called as part of this:
Checks if the current user is blocked.
If the user is blocked, call ErrorPage with a 403 error.
Checks if the script is getting POST data.
If ReadIn return true (1), call DoPosting.
- If the 'doing' element of the submitted data exists in %PostingActions, then execute it.
- Check if page requested (or if a command, if the command is defined), and if not, set $HTTPStatus to 404 error.
- If the command is 'revision', check if the requested page revision exists, and if not, set $HTTPStatus to 404 error.
This is called on $Header, which replaces any variables in the content of $Header with their respective values.
- If a command is being called (GetParam('do')), and it is defined, execute the command.
- OR if the page does not exist, send out the contents of $NewPage (default 'It appears that there is nothing here.')
- OR if the page does exist, and Markup exists:
Send the text from $Page to Markup, which should return properly formatted HTML.
Takes any text between two ['s and two ]'s and returns an HTML anchor element (<a>).
- IF Markup does not exist:
- Send the text from $Page out to the browser
If the current $Page matches something defined via RegSpecialPage, execute its associated subroutine.
This is called on $Footer, which replaces any variables in the content of $Footer with their respective values.
Records the details of the current browse request to $VisitorLog
Calls any subroutines defined to %MaintActions, which are used to clean up temp files, $VisitorLog, etc.