This page, or parts of it, are still untranslated. Please translate it to the appropriate language (беларуская).
DiscordBanner дадае банар з Discord API, які спасылаецца на сервер Discord. Ён таксама адлюстроўвае колькасць карыстачоў анлайн.
Installation
Configuration
ID вашага сервера захоўваецца ў MediaWiki:Custom-DiscordBanner-id. Усе астатнія опцыі захоўваюцца ў зменнай window.DiscordBannerSettings.
| Зменная | Апісанне | Значэнне па змаўчанні | Дапушчальныя значэнні | Дадаткова |
|---|---|---|---|---|
bannerStyle
|
Стыль банара | 3
|
1, 2, 3, 4
|
X |
inviteLink
|
Спасылка на сервер Discord | Vgfu9qb (сервер Fandom Developers Wiki)
|
Кожная запрашальная спасылка для Discord (павінна быць сталай і для сервера са старонкі Custom-DiscordBanner-id) | X |
prependToRail
|
Змяшчае банар паўзверх правай часткі старонкі | true
|
true, false
|
|
noRail
|
Whether the rail module should be disabled | false
|
true, false
|
Ніжэй прыведзены прыклад налады скрыпту:
window.DiscordBannerSettings = {
bannerStyle: '2',
inviteLink: 'Vgfu9qb', // Fandom Developers Wiki, EXAMPLE CONFIGURATION
prependToRail: false
};
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'
]
});
Template configuration
| Option | Type | What it changes | Default |
|---|---|---|---|
id
|
String | Your server's ID. For more information on how to get your server's ID, please see here. This parameter is required. | N/A |
invite
|
String | The second half of your server's invite link. (discord.gg/Vgfu9qb) This parameter is required. The invite must be permanent.
|
N/A |
style
|
String | The banner style. | N/A |
For example, the following would produce a working template for the Fandom International server:
{{DiscordBanner
| id = 160718156787220480
| invite = CWbREjG
| style = 2
}}
You are either viewing on FandomMobile or you disabled your JavaScript via browser.
FAQ
- Як атрымаць ID майго сервера?
- Клікніце па назве свайго сервера, выберыце «Налады сервера» > «Віджэт» і скапіюйце ID сервера. Дэталёвую інструкцыю можна знайсці тут.
faq-title-2 = Як выглядаюць розныя варыянты афармлення банара?
- What do the banner styles look like?
- Даступныя наступныя банары Discord:
See also
- DiscordIntegrator - дадае віджэт у правую частку старонкі або ж проста на старонку
- DiscordModule - дадае модуль, што вядзе на сервер у Discord
- DiscordChat - adds a widget replacing the chat rail module



