Difference between revisions of "Template:Draft article check/doc"
Jump to navigation
Jump to search
imported>HectorMoffet |
imported>HectorMoffet |
||
| Line 12: | Line 12: | ||
* 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]] | ||
| − | == | + | ==View content for Logged-in Users== |
| − | + | Currently, viewing DraftChecker links in Article space requires that you install the ShowOnlyToLoggedInUsers.js script. | |
Individual editors can install this on a per-user basis by adding the following line to their common.js file: | 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'); | + | :importScript('[[User:HectorMoffet/ShowOnlyToLoggedInUsers.js]]'); |
| − | + | In future, the ShowOnlyToLoggedInUsers.js script could be added as a gadget, or included in Wikipedia's default javascript. | |
==Test Cases== | ==Test Cases== | ||
Revision as of 15:27, 23 December 2013
| 40px | This is a documentation subpage for Template:Draft article check. It contains usage information, categories and other content that is not part of the original template page. |
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
- The messages displayed are stored in sub-templates /ArticleFound, /DraftFound, and /ArticleNotFound.
- This template calls two sub-templates: /CheckForDraft and /CheckForArticle
View content for Logged-in Users
Currently, viewing DraftChecker links in Article space requires that you install the ShowOnlyToLoggedInUsers.js script.
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');
In future, the ShowOnlyToLoggedInUsers.js script could be added as a gadget, or included in Wikipedia's default javascript.
Test Cases
- Draft:Example should show a link to the Wikipedia article Example
- Draft talk:Example should show a link to the Wikipedia article Example
- Talk:Example should show a link to Draft:Example
- The Wikipedia article Example should NOT show a link, but inspection of html source should show a link with "visiblity: hidden;".
- The Wikipedia article Example SHOULD show a link if you have the ShowOnlyToLoggedInUsers.js installed.
- Draft:DraftcheckerNullTest and Draft talk:DraftcheckerNullTest should report the non-existence of DraftcheckerNullTest.
- Kierkegaard (disambiguation) and Talk:Kierkegaard (disambiguation) should not report anything.
- Wikipedia:Example should not report anything.