Extension:DiscordNotifications

From MediaWiki.org
Jump to: navigation, search

Other languages:
English • ‎日本語
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Discord Notifications

Release status:Extension status stable

Discord mediawiki.jpg
ImplementationTemplate:Extension#type User interface, Notify
DescriptionTemplate:Extension#description Sends notifications of actions in MediaWiki like adding, removing or deleting an article into Discord channel
Author(s)Template:Extension#username Aleksi Postari (kulttuuritalk)
Latest versionTemplate:Extension#version 1.0.4 (2017-07-11)
MediaWikiTemplate:Extension#mediawiki 1.25+
PHPTemplate:Extension#php 5.2+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license MIT License
Download
ParametersTemplate:Extension#parameters
  • $wgDiscordIncomingWebhookUrl
  • $wgDiscordFromName
  • $wgDiscordSendMethod
  • $wgWikiUrl
  • $wgWikiUrlEnding
Hooks usedTemplate:Extension#hook
PageContentSaveCompleteManual:Hooks/PageContentSaveComplete
PageContentInsertCompleteManual:Hooks/PageContentInsertComplete
ArticleDeleteCompleteManual:Hooks/ArticleDeleteComplete
AddNewAccountManual:Hooks/AddNewAccount
BlockIpCompleteManual:Hooks/BlockIpComplete
UploadCompleteManual:Hooks/UploadComplete
TitleMoveCompleteManual:Hooks/TitleMoveComplete
ArticleProtectCompleteManual:Hooks/ArticleProtectComplete

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

Check usage and version matrix.

Integrate Discord with Mediawiki. The DiscordNotifications sends notifications of actions in MediaWiki like adding, removing or deleting an article into Discord channel.

Installation[edit]

  • Download and place the file(s) in a directory called DiscordNotifications in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/DiscordNotifications/DiscordNotifications.php";
    // Required. Your Discord incoming webhook URL. Read more from here: https://support.discordapp.com/hc/en-us/articles/228383668
    $wgDiscordIncomingWebhookUrl = "";
    // Required. Name the message will appear be sent from.
    $wgDiscordFromName = "Wiki";
    // URL into your MediaWiki installation with the trailing /.
    $wgWikiUrl		= "http://your_wiki_url/";
    // Wiki script name. Leave this to default one if you do not have URL rewriting enabled.
    $wgWikiUrlEnding = "index.php?title=";
    // What method will be used to send the data to Discord server. By default this is "curl" which only works if you have the curl extension enabled. This can be: "curl" or "file_get_contents". Default: "curl"
    $wgDiscordSendMethod = "curl";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters[edit]

Please read the project README file for more configuration options.