X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fhooks.txt;h=a139a8e5f9e4b30dad9b3290f7f8636a8f2f91df;hb=27d800b4c4a4dd38dacab68ebec73c84f9ddd4d4;hp=0b64a3c6391364224dc146159e22fba0870bbc73;hpb=195157b2c2cfa5dcb9cfabf6c1e30f4f1c1ae4a3;p=lhc%2Fweb%2Fwiklou.git diff --git a/docs/hooks.txt b/docs/hooks.txt index 0b64a3c639..a139a8e5f9 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -282,7 +282,7 @@ fail, returning an error message or an tag if $resultArr was filled. $EditPage : the EditPage object $text : the new text of the article (has yet to be saved) -$resultArr : data in this array will be added to the API result +&$resultArr : data in this array will be added to the API result 'APIGetAllowedParams': use this hook to modify a module's parameters. &$module: Module object @@ -350,6 +350,12 @@ the database $article: the article (object) being loaded from the database $content: the content (string) of the article +'ArticleConfirmDelete': before writing the confirmation form for article + deletion +$article: the article (object) being deleted +$output: the OutputPage object ($wgOut) +&$reason: the reason (string) the article is being deleted + 'ArticleDelete': before an article is deleted $article: the article (object) being deleted $user: the user (object) deleting the article @@ -547,6 +553,11 @@ $user: the user who did the block (not the one being blocked) $isbn: ISBN to show information for $output: OutputPage object in use +'CacheHeadersAfterSet': after cache headers have been set in +OutputPage::sendCacheControl, so they can be overridden without +disabling output method +$this: OutputPage instance + 'CategoryPageView': before viewing a categorypage in CategoryPage::view $catpage: CategoryPage instance @@ -558,6 +569,9 @@ $catpage: CategoryPage instance $unpatrolled: Whether or not we are showing unpatrolled changes. $watched: Whether or not the change is watched by the user. +'ConfirmEmailComplete': Called after a user's email has been confirmed successfully +$user: user (object) whose email is being confirmed + 'ContribsPager::getQueryInfo': Before the contributions query is about to run &$pager: Pager object for contributions &queryInfo: The query for the contribs Pager @@ -621,7 +635,7 @@ $summary: Edit summary for page 'EditFilterMerged': Post-section-merge edit filter $editor: EditPage instance (object) $text: content of the edit box -$error: error message to return +&$error: error message to return $summary: Edit summary for page 'EditFormPreloadText': Allows population of the edit form when creating @@ -631,7 +645,7 @@ new pages 'EditPage::attemptSave': called before an article is saved, that is before insertNewArticle() is called -&$editpage_Obj: the current EditPage object +$editpage_Obj: the current EditPage object 'EditPage::importFormData': allow extensions to read additional data posted in the form @@ -773,6 +787,11 @@ $title: Title object of page $url: string value as output (out parameter, can modify) $query: query options passed to Title::getLocalURL() +'getOtherBlockLogLink': Get links to the block log from extensions which blocks + users and/or IP addresses too +$otherBlockLink: An array with links to other block logs +$$this->ip: The requested IP address or username + 'GetPreferences': modify user preferences $user: User whose preferences are being modified. &$preferences: Preferences description array, to be fed to an HTMLForm object @@ -815,6 +834,11 @@ $title: Title object, pages linked to this title are purged. $imagePage: ImagePage object ($this) $output: $wgOut +'ImagePageAfterImageLinks': called after the image links section on an image + page is built +$imagePage: ImagePage object ($this) +&$html: HTML for the hook to add + 'ImagePageFileHistoryLine': called when a file history line is contructed $file: the file $line: the HTML of the history line @@ -825,6 +849,20 @@ $page: ImagePage object &$file: File object &$displayFile: displayed File object +'ImgAuthBeforeStream': executed before file is streamed to user, but only when + using img_auth.php +&$title: the Title object of the file as it would appear for the upload page +&$path: the original file and path name when img_auth was invoked by the the web + server +&$name: the name only component of the file +&$result: The location to pass back results of the hook routine (only used if + failed) + $result[0]=The index of the header message + $result[1]=The index of the body text message + $result[2 through n]=Parameters passed to body text message. Please note the + header message cannot receive/use parameters. + + 'InitializeArticleMaybeRedirect': MediaWiki check to see if title is a redirect $title: Title object ($wgTitle) $request: WebRequest @@ -838,6 +876,9 @@ but after noinclude/includeonly/onlyinclude and other processing. &$text: string containing partially parsed text &$this->mStripState: Parser's internal StripState object +'InvalidateEmailComplete': Called after a user's email has been invalidated successfully +$user: user (object) whose email is being invalidated + 'IsFileCacheable': Override the result of Article::isFileCacheable() (if true) $article: article (object) being checked @@ -852,7 +893,7 @@ $addr: The e-mail address entered by the user 'isValidPassword': Override the result of User::isValidPassword() $password: The password entered by the user -&$result: Set this to either true (passes) or the key for a message error +&$result: Set this and return false to override the internal checks $user: User the password is being validated for 'LanguageGetMagic': DEPRECATED, use $magicWords in a file listed in @@ -1141,6 +1182,7 @@ $varCache: array to store the value in case of multiples calls of the same magic word $index: index (string) of the magic $ret: value of the magic word (the hook should set it) +$frame: PPFrame object to use for expanding any template variables 'ParserGetVariableValueTs': use this to change the value of the time for the {{LOCAL...}} magic word @@ -1202,6 +1244,23 @@ $user: User (object) changing his passoword $newPass: new password $error: error (string) 'badretype', 'wrongpassword', 'error' or 'success' +'ProtectionForm::buildForm': called after all protection type fieldsets are made in the form +$article: the title being (un)protected +$output: a string of the form HTML so far + +'ProtectionForm::save': called when a protection form is submitted +$article: the title being (un)protected +$errorMsg: an html message string of an error + +'ProtectionForm::showLogExtract': called after the protection log extract is shown +$article: the page the form is shown for +$out: OutputPage object + +'ProtectionFormGetApplicableTypes': Allows extensions to modify the types of protection + that can be applied. +$title: The title in question. +&$types: The types of protection available. + 'RawPageViewBeforeOutput': Right before the text is blown out in action=raw &$obj: RawPage object &$text: The text that's going to be the output @@ -1230,6 +1289,9 @@ $term : Search term string 'SetupAfterCache': Called in Setup.php, after cache objects are set +'ShowMissingArticle': Called when generating the output for a non-existent page +$article: The article object corresponding to the page + 'ShowRawCssJs': Customise the output of raw CSS and JavaScript in page views $text: Text being shown $title: Title of the custom script/stylesheet page @@ -1401,6 +1463,9 @@ $opts: FormOptions for this request target doesn't exist $title: title object generated from the text entred by the user +'SpecialSearchProfiles': allows modification of search profiles +&$profiles: profiles, which can be modified. + 'SpecialSearchResults': called before search result display when there are matches $term: string of search term @@ -1417,7 +1482,7 @@ $term: string of search term 'SpecialUploadComplete': Called after successfully uploading a file from Special:Upload -$form: The UploadForm object +$form: The SpecialUpload object 'SpecialVersionExtensionTypes': called when generating the extensions credits, use this to change the tables headers @@ -1462,16 +1527,20 @@ $article: article object removed $user: user that watched $article: article object that was watched -'UploadForm:initial': before the upload form is generated -$form: UploadForm object -You might set the member-variables $uploadFormTextTop and -$uploadFormTextAfterSummary to inject text (HTML) either before -or after the editform. +'UploadCreateFromRequest': when UploadBase::createFromRequest has been called +string $type: the requested upload type +&$className: the class name of the Upload instance to be created + +'UploadComplete': when Upload completes an upload +&$upload: an UploadBase child instance -'UploadForm:BeforeProcessing': at the beginning of processUpload() -$form: UploadForm object -Lets you poke at member variables like $mUploadDescription before the -file is saved. +'UploadFormInitDescriptor': after the descriptor for the upload form as been +assembled +array $descriptor: the HTMLForm descriptor + +'UploadFormSourceDescriptors': after the standard source inputs have been +added to the descriptor +array $descriptor: the HTMLForm descriptor 'UploadVerification': additional chances to reject an uploaded file string $saveName: destination file name @@ -1556,6 +1625,14 @@ $user: User object $user: User to get rights for &$rights: Current rights +'UserIsBlockedFrom': Check if a user is blocked from a specific page (for specific block + exemptions). +$user: User in question +$title: Title of the page in question +&$blocked: Out-param, whether or not the user is blocked from that page. +&$allowUsertalk: If the user is blocked, whether or not the block allows users to edit their + own user talk pages. + 'UserIsBlockedGlobally': Check if user is blocked on all wikis. &$user: User object $ip: User's IP address