Fandom Developers Wiki
m (Removing redlinks)
m ({{Script Install}} template cleanup)
Line 11: Line 11:
 
* [[MediaWiki:FAQ/style.css|style.css]] <small>(already included in code.js)</small>
 
* [[MediaWiki:FAQ/style.css|style.css]] <small>(already included in code.js)</small>
 
}}
 
}}
Adds a page to the wiki where user can find FAQ
+
'''FAQ''' dds a page to the wiki where user can find FAQ.
   
 
== Configuration ==
 
== Configuration ==
Line 39: Line 39:
   
 
== Installation ==
 
== Installation ==
{{Script Install/ImportJS|Use = GP}}
+
{{Script Install/Plain
  +
|codepage = FAQ/code.js
  +
|Use = GP
  +
}}
   
 
== Changelog ==
 
== Changelog ==

Revision as of 14:02, 24 June 2018

This script/stylesheet is for PERSONAL use only!

You are free to install this script/stylesheet for yourself, but it is not allowed to be used wiki-wide (e.g., in MediaWiki:ImportJS, MediaWiki:Common.js, MediaWiki:Common.css, MediaWiki:Fandomdesktop.js or MediaWiki:Fandomdesktop.css), as it would violate Fandom's Terms of Use.
(See the customization policy)

FAQ dds a page to the wiki where user can find FAQ.

Configuration

  • Target page defaults to "Project:FAQ" but you can change it by setting window.dev.faq.page to the preferred page
  • FAQ data are stored and loaded from in MediaWiki:Custom-FAQ.json, so put all your contents there in json format (example).

Dataset Structure

Key Type Remarks
id int Unique running number to identify
question  string
answer  string
related object
  • articles (string[]): Article Names
  • discussions (object)
    • title (string)
    • p (string): post id after /d/p/
keywords  string[]

Installation

Importing multiple scripts? This quick guide shows how to combine the imports.
  • For personal use, add the code snippet below to your global.js page (for use on all wikis) or your common.js page on your wiki (for use on a single wiki). Note that personal JS must be enabled for your account.
importArticles({
    type: 'script',
    articles: [
        'u:dev:MediaWiki:FAQ/code.js',
    ]
});

Changelog

2018-05-28
Added support for wikicode

Planned Features

  • Search for questions
    • by keywords
    • maybe grouping?
  • Add question
  • Edit/Delete question