X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=docs%2Fhooks.txt;h=2d1001ba52df78bb8ec522caf208e3004ab32660;hb=d93f3fa9f1a957f10289d855ec4975a500cfd945;hp=5d6a6e420aeae845b7e830b955f839f64385ef88;hpb=565b65d5e4cc74fe80b8e524bfb08e412ff4af25;p=lhc%2Fweb%2Fwiklou.git diff --git a/docs/hooks.txt b/docs/hooks.txt index 5d6a6e420a..2d1001ba52 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1077,6 +1077,7 @@ change the tables headers. 'ExtractThumbParameters': Called when extracting thumbnail parameters from a thumbnail file name. +DEPRECATED: Media handler should override MediaHandler::parseParamString instead. $thumbname: the base name of the thumbnail file &$params: the currently extracted params (has source name, temp or archived zone) @@ -1222,6 +1223,16 @@ $out: OutputPage object (to check what type of page the user is on) $user: User whose preferences are being modified. &$preferences: Preferences description array, to be fed to an HTMLForm object +'GetRelativeTimestamp': Pre-emptively override the relative timestamp generated +by MWTimestamp::getRelativeTimestamp(). Return false in this hook to use the custom +output. +&$output: string for the output timestamp +&$diff: DateInterval representing the difference between the timestamps +$timestamp: MWTimestamp object of the current (user-adjusted) timestamp +$relativeTo: MWTimestamp object of the relative (user-adjusted) timestamp +$user: User whose preferences are being used to make timestamp +$lang: Language that will be used to render the timestamp + 'getUserPermissionsErrors': Add a permissions error when permissions errors are checked for. Use instead of userCan for most cases. Return false if the user can't do it, and populate $result with the reason in the form of @@ -1879,6 +1890,7 @@ $action : Action being performed &$result : Whether or not the action should be prevented Change $result and return false to give a definitive answer, otherwise the built-in rate limiting checks are used, if enabled. +$incrBy: Amount to increment counter by 'PlaceNewSection': Override placement of new sections. Return false and put the merged text into $text to override the default behavior.