Editing version 2 of page Script_Flow (the most recent revision is 4)
Use template:
None
API_Template
DevTrack_Template
Version_Template
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.
* **Init**\\This is the very first subroutine called. It calls the following:
** **InitScript**\\Determines $Url, $ShortUrl, $ScriptName and $ShortScriptName
** **InitConfig**\\Executes $ConfFile (default 'config.pl'), which sets user-configured variables
** **InitVars**\\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: [[APIs RegCommand|RegCommand]], [[APIs RegAdminPage|RegAdminPage]], [[APIs RegPostAction|RegPostAction]], [[APIs RegSpecialPage|RegSpecialPage]]
*** **InitDirs**\\Initializes directories (if this is the first time Aneuch is ran)
** **LoadPlugins**\\This is where all plugins get loaded. Plugins should end in the extensions '.pl' or '.pm', and be in the $PluginDir directory.
** **DoPostInit**\\Calls any sub that has been registered using [[APIs RegPostInitSub|RegPostInitSub]].
* **DoRequest**\\Handles the current request. The following are called as part of this:
** **IsBlocked**\\Checks if the current user is blocked.
*** **ErrorPage**\\If the user is blocked, call ErrorPage with a 403 error.
** **DoSurgeProtection**\\If this returns true, call:
*** **ErrorPage**\\Called with 503 error.
** **ReadIn**\\Checks if the script is getting POST data.
*** **DoPosting**\\If ReadIn return true (1), call DoPosting.
**** If the 'doing' element of the submitted data exists in %PostingActions, then execute it.
** **CanView**\\Checks if the user can view (**$SiteMode** < 3, or authenticated). If not, redirect to login page.
** Checks if the "do" parameter is "random", and if so, execute **$Comands{'random'}**.
** 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.
** **DoHeader**\\This prints out everything that belongs to the theme's header.
** 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:
*** **Markup**\\Send the text from $Page to Markup, which should return properly formatted HTML.
**** **MarkupBuildLink**\\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
** **DoSpecialPage**\\If the current $Page matches something defined via [[APIs RegSpecialPage|RegSpecialPage]], execute its associated subroutine.
** **DoFooter**\\This prints out everything that belongs to the theme's footer.
* **DoVisit**\\Records the details of the current browse request to $VisitorLog
* **DoMaint**\\Calls any subroutines defined to %MaintActions, which are used to clean up temp files, $VisitorLog, etc.
This page is a template
This file is locked by 52.15.174.103 (ec2-52-15-174-103.us-east-2.compute.amazonaws.com) since Sun Apr 27 04:12:02 UTC 2025 . Lock should expire by Sun Apr 27 04:17:02 UTC 2025, and it is now Sun Apr 27 04:13:48 UTC 2025.
Upload a file
By contributing to this wiki, you acknowledge that you waive your right to claim copyright of your individual contributions. The text of this site is uncopyrighted and released to the public domain.
Show markup help Styling **bold **, //italic //, __underline __, --strikethrough--, `teletype ` Headers = Level 1 =, == Level 2 ==, === Level 3 ===, ==== Level 4 ====, ===== Level 5 ===== (ending ='s optional) Lists * Unordered List, # Ordered List, ** Level 2 unordered, ### Level 3 ordered (up to 5 levels, NO SPACES IN FRONT) Links [[Page]], [[Page|description]], [[http://link]], [[http://link|description]] Images {{image.jpg}}, {{right:image.jpg}} (right aligned), [[link|{{image.jpg}}]] (image linked to link), {{image.jpg|alt text}} Extras ---- (horizonal rule), ~~~~ (signature)