This page, or parts of it, are still untranslated. Please translate it to the appropriate language (日本語).
DiscussionsRailModule ディスカッションのためのレールモジュールをレールに追加し、wikiのディスカッションポストのフィードをリストアップします。 このスクリプトはアクティビティフィードタグと同じ設定オプションを提供します。
<div class="discussions-rail-theme"></div>
Installation
Configuration
埋め込みのみの使用
スクリプトを使用して、レールモジュールを無効にし、記事の埋め込みモジュールのスタイルを設定することができます。 window.discussionsModuleEmbed あなたのwikiのオブジェクト MediaWiki:Common.js:
window.discussionsModuleEmbed = true;
ポジショニング
ディスカッションレールモジュールは、Wikiアクティビティモジュールまたはフォーラムアクティビティモジュールの下に配置されています(使用可能な場合)。または、レールの下部に追加されます。
モジュールを任意の位置に調整するには、discussionsModule.added あなたのwikiのフック MediaWiki:Common.js.
For example, this code will position the module above the Insights module.
mw.hook('discussionsModule.added').add(function($module) {
// Module addition
if ($('.insights-module').exists()) {
$module.insertBefore('.insights-module');
} else {
$module.appendTo('#WikiaRail');
}
});
後処理
モジュールの内容は、ロード後に変更することができます。discussionsModule.loaded フック。
スタイリング
The header text is adjustable with the following CSS (replacing <TITLE> with your text):
.discussions-rail-theme .embeddable-discussions-module .embeddable-discussions-heading:after {
content: '<TITLE>';
}
コンテンツフィルタリング
レールモジュールのフィードコンテンツは、オプションの window.discussionsModuleConfig オブジェクト MediaWiki:Common.js:
window.discussionsModuleConfig = {
'size' : 'number 3-6',
'mostrecent' : 'true/false',
'catid' : [
'first category id',
'second category id',
'etc.'
]
}
| Option | Description | Default |
|---|---|---|
size
|
Number of posts in the post list. |
4
|
mostrecent
|
Controls feed sorting by latest or trending posts.
Accepts |
false
|
catid
|
Specific categories to return posts from. | None |
Changelog
| Date | Notes | Author |
|---|---|---|
| May 30, 2017 | Initial revision. | MACH-59330 |
| May 31, 2017 | Initial release on Fandom Developers Wiki. | Rappy |
| June 23, 2017 | Full rewrite of initial version. | KockaAdmiralac |
| July 29, 2017 | Addition of WDS spinner. | MACH-59330 |
| July 7, 2017 | Addition of Discussions default avatar SVG. | MACH-59330 |
| July 29, 2017 | Removal of .module class.
|
MACH-59330 |
| September 5, 2017 | Object-based rewrite and feature additions. Populating empty post titles (from Discussions alpha stage). |
MACH-59330 |
| November 29, 2017 | I18n support for module header. | MACH-59330 |
| March 18, 2018 | Content embedding patches, DRY for logic, preventing race conditions. | MACH-59330 |
| May 28, 2019 | Compatible with FDS and the other rail-modules. | TapeJIKa c ne4eHbKou |
| June 22, 2021 | Rewrite to support UCP | BoyAliveInside |