Extension:CustomLogs

Other languages:
MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
CustomLogs
Release status: stable
Description Allows the user to add custom log types by editing LocalSettings.php and the MediaWiki namespace
Author(s) Megan Cutrofello (RheingoldRivertalk)
Latest version 0.1.0 (2019-09-11)
MediaWiki 1.25+
Database changes No
License GPL 2.0
Download
readme

  • $wgCustomLogsLogs
  • $wgCustomLogsMaxCustomParams

Check usage and version matrix.

InstallationEdit

  • Download and place the file(s) in a directory called CustomLogs in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'CustomLogs' );
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parametersEdit

$wgCustomLogsLogs - A list of the log types to add to the wiki. For example:

$wgCustomLogsLogs = ["ro-news","ro-tournament"]

$wgCustomLogsMaxCustomParams - The maximum number of custom params you will be allowed to specify when writing a custom log. Default is 3.

Writing logsEdit

This is governed by the user right writecustomlogs. By default all logged-in users have this right, but you can configure it like any user right. The API action is customlogswrite. Parameters include:

  • logtype - the type of log, as specified in wgCustomLogsLogs
  • title - the title of the page associated with the action (cannot be used with pageid)
  • pageid - the pageid of the page associated with the action (cannot be used with title)
  • summary - a text summary, which may have custom parameters substituted into it. Custom parameters are sent to the summary in order beginning with $4. See the readme on github for additional documentation. If blank, the default summary for the log will be used.
  • tags - a list of tags (these must actually exist on the wiki)
  • publish - whether or not to publish in recent changes
  • custom-1 - etc as many as specified by $wgCustomLogsLogs