Skip to content

dlh/MediaWiki-RecentChangesOption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RecentChangesOption

A MediaWiki extension that 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.

Screenshot

Download

Using git:

git clone https://github.com/dlh/MediaWiki-RecentChangesOption.git RecentChangesOption

A zip file snapshot of the repository is also available on the project site.

Installation

RecentChangesOption has only been tested on MediaWiki 1.18+.

  1. Move the RecentChangesOption directory to your site's extensions directory.

  2. Edit LocalSettings.php and add the following line near the bottom:

     require_once("$IP/extensions/RecentChangesOption/RecentChangesOption.php");
    
  3. 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.

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("");

License

MIT license. See LICENSE.txt.

About

A MediaWiki extension that adds options to manage the default visibility of certain log types or namespaces on the Recent Changes page

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages