Giter Site home page Giter Site logo

dlh / mediawiki-recentchangesoption Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 352 KB

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

License: MIT License

PHP 100.00%

mediawiki-recentchangesoption's Introduction

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.

mediawiki-recentchangesoption's People

Contributors

dlh avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

seanrclayton

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.