DiscordModule adds a module in the right rail that will lead to a Discord server. This is different from DiscordIntegrator.
Installation
Configuration
You can insert ID of your server or configure module through MediaWiki:Custom-Discord-Module-Settings
.
Events
DiscordModule fires 2 events: discordmodule.fill
and discordmodule.modal.show
. Both events propagated via mw.hook
interface.
discordmodule.fill
- fires once the module content is rendered. Callback function may recieve module content as first param (type: jQuery object).
discordmodule.modal.show
- fires once the modal window is shown. Callback function may recieve modal window content as first param (type: jQuery object).
CSS Snippets
"Refresh" button image
.discord-refresh {
background-image: url("//");
background-size: contain;
font-size: 0px;
width: 20px;
height: 20px;
}
Change // to desired URL.
User-defined settings
There are some settings (1 at this moment), that might be used on per-user basis via window.dev.discordmodule
object.
Use nicknames
The script can render nickname of the user instead of the username. Add the usenick
param to your personal JS:
(window.dev = window.dev || {}).discordmodule = {usenick: true};
Using configuration options with Fandom Developers Wiki scripts
The instructions on this page describe how to use configuration options with a script. Here on the Fandom Developers Wiki, many scripts provide optional configuration settings as a mean to alter or enhance the default behavior of the script. When installing configuration options in your JavaScript file, please note that they need to go above the import statement in order to work — unless the directions say otherwise. In case MediaWiki:ImportJS
is used to load the scripts, it will be executed last.
// 1. AjaxRC import statement
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AjaxRC.js'
]
});
// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
// 1. AjaxRC configuration option
window.ajaxRefresh = 30000;
// 2. AjaxRC import statement
importArticles({
type: 'script',
articles: [
'u:dev:MediaWiki:AjaxRC.js'
]
});
Add-ons
List of available add-ons.
Linked users
Linked users addon shows usernames (excepts for bots) as links to local user profile. Fits ideally for servers where nicks are same as usernames on the wiki. Works better with the usenick
option. Installation: