dev

Tartışmalar API'si resmi olarak desteklenmemektedir. API her an değişebilir ve komut dosyasının bozulmasına neden olabilir.

DiscussionsEmbed, tartışmaların etkin olduğu vikilerde trend olan gönderileri veya en son gönderileri içeren gömülebilir bir modüldür. Farklı sayıda girişe izin verecek şekilde (varsayılan: 5) veya yalnızca belirli bir forumdan gönderileri gösterecek şekilde yapılandırılabilir.

Installation

Usage

Tartışmalar modülünü bir sayfaya yerleştirmek için, kaynağına <div class="discussions-embed"></div> ekleyin.

Configuration

Betik, bir vikinin MediaWiki:Common.js dosyasında ayarlanabilen üç yapılandırma değişkenine sahiptir

Değişken Varsayılan Açıklama
window.discussEmbedLimit
5 Modülde yer alacak giriş sayısı.
window.discussEmbedForum
Hiçbiri Modülün göstermesi istenen forumun kimliği. Ayarlanmadan bırakılırsa, modül tüm forumlardan gönderileri görüntüler. Kimlik, istenen forumu görüntüleyen sayfaya giderek https://viki.fandom.com/f?catId=KİMLİK biçiminde bulunabilir. catID= sorgusundan sonraki sayı, girilmesi gereken sayıdır. Yuvarlamayı önlemek için bu sayıyı tırnak içine alın.
window.discussEmbedSortTrending
0 1 olarak ayarlanırsa, modül trend olan gönderileri gösterecektir. Aksi takdirde, modül en son gönderileri gösterecektir.

Örnek:

window.discussEmbedLimit = 10;
window.discussEmbedForum = "1234567890";
window.discussEmbedSortTrending = 1;

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.

Configuration options load too late, don't work
// 1. AjaxRC import statement
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:AjaxRC.js'
    ]
});

// 2. AjaxRC configuration option
window.ajaxRefresh = 30000;
Proper placement of configuration options
// 1. AjaxRC configuration option
window.ajaxRefresh = 30000;

// 2. AjaxRC import statement
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:AjaxRC.js'
    ]
});

Demo