Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:Hooks/LogEventsListShowLogExtract

From mediawiki.org
<Manual:Hooks
LogEventsListShowLogExtract
Available fromversion 1.19.0 (r97342,CodeReview archive)
Called before the result ofLogEventsList::showLogExtract() is added to OutputPage.
Define function:
publicstaticfunctiononLogEventsListShowLogExtract(&$s,$types,$page,$user,$param){...}
Attach hook:Inextension.json:
{"Hooks":{"LogEventsListShowLogExtract":"MediaWiki\\Extension\\MyExtension\\Hooks::onLogEventsListShowLogExtract"}}
Called from:File(s):logging/LogEventsList.php
Interface:LogEventsListShowLogExtractHook.php

For more information about attaching hooks, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:LogEventsListShowLogExtract extensions.


Details

[edit]

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 of log types of to show.
  • $page: String of the page title to show log entries for
  • $user: String of the user who made the log entries
  • $param: Associative array with the following additional options:
    • $params['lim']: Integer Limit of items to show, default is 50
    • $params['conds']: Array Extra conditions for the query (e.g. "log_action != 'revision'")
    • $params['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
    • $params['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'
    • $params['offset']: Set to overwrite offset parameter in $wgRequest set to '' to unset offset
    • $params['wrap']: String Wrap the message in html (usually something like "<div ...>$1</div>").
    • $params['flags']: Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Hooks/LogEventsListShowLogExtract&oldid=5070175"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp