Code Monkey home page Code Monkey logo

mw-editwarning's Introduction

================================================
 MediaWiki Extension: EditWarning
================================================

Author: Thomas David ([email protected])
Version: 0.4
Date: 2011-10-28
Licence: GNU GPL 2.0 or later

If the user opens a page for editing which is being edited by another user
at the same time this extension displays a warning on the editing page.

Notice: It's not recommended to use this extension if anonymous users
are allowed to edit pages, because it ignores anonymous page edits.

If you want to improve or extend this extension, fork it at github:
https://github.com/nemphis/mw-editwarning

===== Installation =====

1.) Move the folder "EditWarning" to the "extensions" folder of your
    MediaWiki installation.

2.) Execute the following SQL statements in your MediaWiki database:

CREATE TABLE IF NOT EXISTS editwarning_locks (
  user_id int(10) unsigned NOT NULL,
  user_name varchar(255) NOT NULL,
  article_id int(10) unsigned NOT NULL,
  timestamp int(11) unsigned NOT NULL,
  section int(2) unsigned NOT NULL,
  KEY user_id (user_id),
  KEY article_id (article_id)
);

ALTER TABLE editwarning_locks
  ADD CONSTRAINT editwarning_locks_ibfk_1 FOREIGN KEY (user_id) REFERENCES user (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT editwarning_locks_ibfk_2 FOREIGN KEY (article_id) REFERENCES page (page_id) ON DELETE CASCADE ON UPDATE CASCADE;

3.) Add this line to your LocalSettings.php:

require_once("$IP/extensions/EditWarning/EditWarning.php");

4.) Optional: The default timeout is set to 10 minutes. If you want to change
              this setting, add this line to your LocalSettings.php
              (Note: The value is the number of minutes):

$EditWarning_Timeout = 5;

Optional: The extension hides everything except the editor area. If you don't
like this behavior, add this line to your LocalSettings.php:

$EditWarning_OnlyEditor = "false";

mw-editwarning's People

Contributors

nemphis avatar

Watchers

Marcin Cieślak avatar James Cloos avatar  avatar

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.