FANDOM


MessageBlock adds a checkbox in the Special:Block page that allows you to send a message with the block reason and duration to the blocked user's talk page directly from the block page.

Installation

Message and others features

To add the title and the text of this new message, just add this in MediaWiki:Common.js (or before the import statements if using for personal use):

var MessageBlock = {
  title : 'Block',
  message : 'You have been blocked.'
};

Then, just change title by the title of the message and message by the text you want.

Include duration and block reason

If you want to include either the duration or the reason of the block, type in the message $1 (for the reason) and/or $2 (for the duration). For example, your message can be : "You have been blocked for $2 because you have $1".

Auto-check the checkbox

By default, the checkbox isn't checked and have to be checked manually. If you want to check it by default, just put this before import statements :

var MessageBlock = {
  title : 'Block',
  message : 'You have been blocked for $2 because you have $1',
  autocheck : true
};

Example of code

var MessageBlock = {
  title : 'Blocage',
  message : 'Vous avez été bloqué pour $2 car vous avez : "$1"',
  autocheck : true
};
importArticles({
    type: 'script',
    articles: [
        'u:dev:MessageBlock/code.js'
    ]
});

Updates

2014/11/25 : Solve minor issues and add improvements

Community content is available under CC-BY-SA unless otherwise noted.

Fandom may earn an affiliate commission on sales made from links on this page.

Stream the best stories.

Fandom may earn an affiliate commission on sales made from links on this page.

Get Disney+