Extension:ArticleProtection

From MediaWiki.org
Jump to: navigation, search
shortcut: AP
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
ArticleProtection

Release status:Extension status beta

ImplementationTemplate:Extension#type Special page
DescriptionTemplate:Extension#description Introduces private ownership of individual pages, while keeping collaborative features of wiki. Owners can control which users can edit their pages.
Author(s)Template:Extension#username Nischay Nahata (Nischayn22talk)
Latest versionTemplate:Extension#version 0.1 beta (February 2015)
MediaWikiTemplate:Extension#mediawiki 1.24+
PHPTemplate:Extension#php 5.2+
Database changesTemplate:Extension#needs-updatephp Yes
LicenseTemplate:Extension#license MIT License
Download
README
Hooks usedTemplate:Extension#hook
ArticleInsertCompleteManual:Hooks/ArticleInsertComplete

Translate the ArticleProtection extension if it is available at translatewiki.net

Check usage and version matrix.

The ArticleProtection extension introduces private ownership of individual pages on a wiki. Each page becomes a single owner while keeping its collaborative capabilities, since owner can grant edit permissions to other users.

Description[edit]

This extension defines for each content page a single owner and a single or multiple editors. The remaining users not defined on extension are divided into sysops (MediaWiki administrators) and reader (regular users of wiki).

In other words, each single page divides users of wiki into four types of permission levels. Each permission level includes permissions of levels below it.

Permissions Sysop Owner Editor Reader
Can change ownership Yes check.svg Red x.svg Red x.svg Red x.svg
Can change editor(s) Yes check.svg Yes check.svg Red x.svg Red x.svg
Can edit article Yes check.svg Yes check.svg Yes check.svg Red x.svg
Can view article Yes check.svg Yes check.svg Yes check.svg Yes check.svg

Sysop

  • Sysops are MediaWiki administrators
  • Permission of this level: change ownership, add/remove edit permission, edit and view all pages on wiki.
    • Each page can only have a single owner.
    • On pages created after installation of extension, ownership is defined to user who first created it.
    • On pages created before installation of extension, only sysops can define ownership to an user.
  • They have all permissions of below levels: change editors, edit and view article

Owner

  • Permissions of this level: add or remove edit permissions, edit and view article
  • They have all permissions of below levels: edit and view article

Editor

  • Permissions of this level: edit and view article
  • Editor has a permission of the below level: view article
  • Editors are users that received edit permissions on a specific page.

Reader

  • Permission of this level: view article

Authors[edit]

ArticleProtection was originally written by Nischay Nahata, as WikiWorks consultant for Rhcastilhos.

Usage[edit]

This extension adds a new special page: Special:ArticleProtection, which can be accessed with or without parameters.

Special:ArticleProtection

  • "My pages": shows pages that current logged in user owns
  • "Pages that I can edit": shows pages that current logged in user has edit permission

Special:ArticleProtection/<Pagename>

  • Shows detailed informations of permissions about given Pagename
  • Shows owner, editor(s) and link to view permissions, view log
  • Shows modify permissions link if user is owner of page.

Special:ArticleProtection/Settings:<Pagename>

  • Shows textbox to add/remove users with edit permission on this page

Special:ArticleProtection/UserPermissions:<Username>

  • "Pages owned by <Username>": shows pages that given "Username" owns.
  • "Pages that <Username> can edit": shows pages that given "Username" has edit permission.

Log page

  • Logs events of modification of ownership and edit permissions.
  • Accessed through Special:Log&type=ArticleProtection&page=Pagename

Front-end modifications

  • New item "Pages" on usermenu (links to Special:ArticleProtection)
  • New tab "View editor(s)" on each page of MediaWiki (links to Special:ArticleProtection/<Pagename>)

Configuring[edit]

  • $articleProtectionNS = array( NS_MAIN, NS_USER, NS_PROJECT, NS_FILE, NS_TEMPLATE ); — Defines which namespaces will have private ownership of pages.
  • $apMaxEditors = 20; — Defines the maximum number of editors allowed for each page.

Limitations[edit]

  • Only edit protection
    • View protection is not implemented yet.
  • Only sysops can change ownership of owned pages
    • Ownership of page still can't be transferred from its owner to another user.

Features planned for future versions[edit]

Ownership features

  • Ownership transfer
  • Buy/sell ownership (with bitcoins/altcoins)
  • Multiple ownership (multiple owners for a page)
    • Owner may give shared ownership to other users
    • Set how many % of page each user owns

Editing

  • Opening private pages to public editing, like a traditional wiki
    • Option to allow all users of wiki to edit page, while being able to ban users
  • Edit permission in section: Allow owner to grant edit permission only in specific sections of a page
  • Allow edit suggestions
    • Done by users with or without edit permission
    • Owner decides if suggested edit will be published

Edit permission granting

  • Username suggestions (autocomplete) while text is being typed

View permission

  • View protection

Front-end

  • Mobile frontend

Installation[edit]

  • Download and place the file(s) in a directory called ArticleProtection in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/ArticleProtection/ArticleProtection.php";
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

See also[edit]