Difference between revisions of "Template:FA number/doc"

From blackwiki
Jump to navigation Jump to search
imported>Andrybak
m (+category sort key)
imported>WOSlinker
m (change source to syntaxhighlight)
 
Line 10: Line 10:
 
Logged-in users can use the [[mw:API|MediaWiki API]] to verify the featured article count. Go to [{{SERVER}}{{SCRIPTPATH}}/api.php?action=query&format=xml&list=categorymembers&cmtitle=Category:Featured_articles&cmlimit=5000], type
 
Logged-in users can use the [[mw:API|MediaWiki API]] to verify the featured article count. Go to [{{SERVER}}{{SCRIPTPATH}}/api.php?action=query&format=xml&list=categorymembers&cmtitle=Category:Featured_articles&cmlimit=5000], type
  
<source lang="JavaScript">javascript:alert(document.getElementsByTagName("cm").length)</source>
+
<syntaxhighlight lang="JavaScript">javascript:alert(document.getElementsByTagName("cm").length)</syntaxhighlight>
  
 
into your browser's [[address bar]], and press enter.
 
into your browser's [[address bar]], and press enter.

Latest revision as of 12:58, 7 July 2020

This template returns the number of featured articles as recorded at Wikipedia:Featured articles. The count at Wikipedia:Featured articles is scrupulously updated and due to chronic server issues it is in general more accurate than {{PAGESINCATEGORY:Featured articles}}.

Usage

  • {{FA number}} = {{Wikipedia:Featured articles}}

Method for verifying accuracy

Logged-in users can use the MediaWiki API to verify the featured article count. Go to [1], type

javascript:alert(document.getElementsByTagName("cm").length)

into your browser's address bar, and press enter.