Difference between revisions of "Template:Draft article check/doc"

From blackwiki
Jump to navigation Jump to search
imported>HectorMoffet
imported>HectorMoffet
Line 9: Line 9:
 
'''<nowiki>{{DraftChecker}}</nowiki>'''
 
'''<nowiki>{{DraftChecker}}</nowiki>'''
 
==Technical details==
 
==Technical details==
* The messages displayed are stored in sub-templates [[Template:DraftChecker/ArticleFound|/ArticleFound]], [[Template:DraftChecker/DraftFound|/DraftFound], and [[Template:DraftChecker/ArticleNotFound|/ArticleNotFound]].
+
* The messages displayed are stored in sub-templates [[Template:DraftChecker/ArticleFound|/ArticleFound]], [[Template:DraftChecker/DraftFound|/DraftFound]], and [[Template:DraftChecker/ArticleNotFound|/ArticleNotFound]].
 
* This template calls two sub-templates: [[Template:DraftChecker/CheckForDraft|/CheckForDraft]] and [[Template:DraftChecker/CheckForArticle|/CheckForArticle]]
 
* This template calls two sub-templates: [[Template:DraftChecker/CheckForDraft|/CheckForDraft]] and [[Template:DraftChecker/CheckForArticle|/CheckForArticle]]
  

Revision as of 13:54, 23 December 2013

DraftChecker is a template to alert editors to the existence of relevant articles or drafts.

  • In Draft or Draft_Talk, DraftChecker will check for an Article of the same title.
  • In Article_Talk, DraftChecker will check for a Draft of the same title.
  • In the Article namespace, Draftchecker will check for a Draft of the same title, but will only show a message if a custom javascript determines the user is logged in.

Usage

{{DraftChecker}}

Technical details

ShowOnlyToLoggedInUsers.js

Viewing DraftChecker links in Article space requires the installation of the ShowOnlyToLoggedInUsers.js

Individual editors can install this on a per-user basis by adding the following line to their common.js file:

importScript('User:HectorMoffet/ShowOnlyToLoggedInUsers.js');

Additionally, the ShowOnlyToLoggedInUsers.js script could be added as a gadget or in our default javascript.

Test Cases