MediaWiki extensions manual
RecentChangesOption
Release status: unmaintained
Implementation Special page
Description Adds options to manage the default visibility of certain log types or namespaces on the Recent Changes page
Author(s) dlhtalk
MediaWiki 1.18+
Database changes No
License MIT License
Download

GitHub:

Note:
No localisation updates are
provided by translatewiki.net .


README
Hooks used
  • SpecialRecentChangesFilters
  • SpecialRecentChangesQuery
  • LocalisationCacheRecache

The RecentChangesOption extension adds options to manage the default visibility of certain log types or namespaces on the Recent Changes page.

RecentChangesOption will provide messages in the requesting user's language preference. MediaWiki provides translations for log types and namespace names, so the messages can be automatically generated.

Installation

  • Download and place the file(s) in a directory called RecentChangesOption in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    require_once "$IP/extensions/RecentChangesOption/RecentChangesOption.php";
    
  • Set the default visibility of certain log types or namespaces by creating an instance of the RecentChangesOption class. Refer to the documentation for log types (the letype list), namespace constants, and the examples below.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Examples

// Hide the User creation log by default
RecentChangesOption::create()->filterLogType("newusers");

// Do not hide the User creation log by default, but still provide an easy
// way for users to hide it
RecentChangesOption::create(/* $hideDefault */ false)->filterLogType("newusers");

// Hide the Template namespace by default
RecentChangesOption::create()->filterNamespace(NS_TEMPLATE);

// Hide the Template namespace and its associated talk page by default
RecentChangesOption::create(true, /* $filterAssociatedNamespace */ true)->filterNamespace(NS_TEMPLATE);

// Hide the User creation log, Block log; Template, MediaWiki namespaces
// (and their talk pages) by default
RecentChangesOption::create(true, true)->filterLogType("newusers", "block")->filterNamespace(NS_TEMPLATE, NS_MEDIAWIKI);

// Hide all public logs
RecentChangesOption::create()->filterLogType("");
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.