Localisation updates for core and extension messages from translatewiki.net
[lhc/web/wiklou.git] / docs / hooks.txt
index 48b1510..d33bd7a 100644 (file)
@@ -540,7 +540,8 @@ $article: Article object
 viewing.
 &$article: the article
 &$pcache: whether to try the parser cache or not
-&$outputDone: whether the output for this page finished or not
+&$outputDone: whether the output for this page finished or not. Set to a ParserOutput
+object to both indicate that the output is done and what parser output was used.
 
 'ArticleViewRedirect': before setting "Redirected from ..." subtitle when
 follwed an redirect
@@ -1188,6 +1189,20 @@ $cache: The LocalisationCache object
 $code: language code
 &$alldata: The localisation data from core and extensions
 
+'LogEventsListShowLogExtract': called before the string is added to OutputPage. Returning false will prevent the string from being added to the OutputPage
+&$s: html string to show for the log extract
+$types: String or Array Log types to show
+$page: String or Title The page title to show log entries for
+$user: String The user who made the log entries
+$param: Associative Array with the following additional options:
+ - lim Integer Limit of items to show, default is 50
+ - conds Array Extra conditions for the query (e.g. "log_action != 'revision'")
+ - showIfEmpty boolean Set to false if you don't want any output in case the loglist is empty if set to true (default), "No matching items in log" is displayed if loglist is empty
+ - msgKey Array If you want a nice box with a message, set this to the key of the message. First element is the message key, additional optional elements are parameters for the key that are processed with wgMsgExt and option 'parse'
+ - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset
+ - wrap String Wrap the message in html (usually something like "<div ...>$1</div>").
+ - flags Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)
+
 'LoginAuthenticateAudit': a login attempt for a valid user account either
 succeeded or failed. No return data is accepted; this hook is for auditing only.
 $user: the User object being authenticated against
@@ -1303,19 +1318,10 @@ displayed
        in the message (bool)
 
 'OldChangesListRecentChangesLine': Customize entire Recent Changes line.
-you will also need to use the EnhancedChangesListRecentChangesLine to alter
-the output for user of enhanced recent changes.
 &$changeslist: The OldChangesList instance.
 &$s: HTML of the form "<li>...</li>" containing one RC entry.
 &$rc: The RecentChange object.
 
-'RecentChangesListRecentChangesLine': Customize entire Recent Changes line.
-you will also need to use the OldChangesListRecentChangesLine to alter
-the output for user of regular recent changes.
-&$changeslist: The EnhancedChangesList instance.
-&$s: HTML of the form "<li>...</li>" containing one RC entry.
-&$rc: The RecentChange object.
-
 'OpenSearchUrls': Called when constructing the OpenSearch description XML.
 Hooks can alter or append to the array of URLs for search & suggestion formats.
 &$urls: array of associative arrays with Url element attributes
@@ -1459,7 +1465,6 @@ to ensure that tests continue to run properly.
 
 'PersonalUrls': Alter the user-specific navigation links (e.g. "my page,
 my talk page, my contributions" etc).
-
 &$personal_urls: Array of link specifiers (see SkinTemplate.php)
 &$title: Title object representing the current page
 
@@ -1499,15 +1504,6 @@ $errorMsg: an html message string of an error
 $article: the page the form is shown for
 $out: OutputPage object
 
-'ResourceLoaderRegisterModules': Right before modules information is required, such as when responding to a resource
-loader request or generating HTML output.
-&$resourceLoader: ResourceLoader object
-
-'ResourceLoaderGetStartupModules': Run once the startup module is being generated. This allows you
-to add modules to the startup module. This hook should be used sparingly since any module added here
-will be loaded on all pages. This hook is useful if you want to make code available to module loader 
-scripts. 
-
 'RawPageViewBeforeOutput': Right before the text is blown out in action=raw
 &$obj: RawPage object
 &$text: The text that's going to be the output
@@ -1521,6 +1517,15 @@ configuration variables to JavaScript. Things that depend on the current
 page/request state must be added through MakeGlobalVariablesScript instead.
 &$vars: array( variable name => value )
 
+'ResourceLoaderGetStartupModules': Run once the startup module is being generated. This allows you
+to add modules to the startup module. This hook should be used sparingly since any module added here
+will be loaded on all pages. This hook is useful if you want to make code available to module loader 
+scripts. 
+
+'ResourceLoaderRegisterModules': Right before modules information is required, such as when responding to a resource
+loader request or generating HTML output.
+&$resourceLoader: ResourceLoader object
+
 'RevisionInsertComplete': called after a revision is inserted into the DB
 &$revision: the Revision
 $data: the data stored in old_text.  The meaning depends on $flags: if external
@@ -1661,6 +1666,10 @@ $checkEdit: Whether or not the action=edit query should be added if appropriate.
 'SkinTemplateToolboxEnd': Called by SkinTemplate skins after toolbox links have
 been rendered (useful for adding more)
 $sk: The QuickTemplate based skin template running the hook.
+$dummy: Called when SkinTemplateToolboxEnd is used from a BaseTemplate skin,
+  extensions that add support for BaseTemplateToolbox should watch for this dummy
+  parameter with "$dummy=false" in their code and return without echoing any html
+  to avoid creating duplicate toolbox items.
 
 'SoftwareInfo': Called by Special:Version for returning information about
 the software
@@ -1818,6 +1827,11 @@ Each key maps to an associative array with a 'msg' (message key) and a 'default'
 &$join_conds: join conditions for the tables
 &$fields: array of query fields
 
+'TestCanonicalRedirect': called when about to force a redirect to a canonical URL for a title when we have no other parameters on the URL. Gives a chance for extensions that alter page view behavior radically to abort that redirect or handle it manually.
+$request: WebRequest
+$title: Title of the currently found title obj
+$output: OutputPage object
+
 'TitleArrayFromResult': called when creating an TitleArray object from a
 database result
 &$titleArray: set this to an object to override the default object returned
@@ -2001,6 +2015,10 @@ $user: User to get groups for
 'UserGetAllRights': after calculating a list of all available rights
 &$rights: Array of rights, which may be added to.
 
+'UserGetDefaultOptions': after fetching the core default, this hook is ran
+right before returning the options to the caller.
+&$defaultOptions: Array of preference keys and their default values. 
+
 'UserGetEmail': called when getting an user email address
 $user: User object
 &$email: email, change this to override local email
@@ -2149,6 +2167,13 @@ One, and only one hook should set this, and return false.
 &$opts: Options to use for the query
 &$join: Join conditions
 
+'wfShellMaintenanceCmd': Called when generating a shell-escaped command line
+       string to run a maintenance script.
+&$script: MediaWiki maintenance script path
+&$parameters: Array of arguments and options to the script
+&$options: Associative array of options, may contain the 'php' and 'wrapper'
+       keys
+
 'wgQueryPages': called when initialising $wgQueryPages, use this to add new
 query pages to be updated with maintenance/updateSpecialPages.php
 $query: $wgQueryPages itself