Difference between revisions of "Template:Counter"

From blackwiki
Jump to navigation Jump to search
imported>Geometry guy
(Use ceil to make milestones easier to spot; also simplify #expr)
imported>Geometry guy
m (Fix precedence of ceil)
 
Line 4: Line 4:
 
|FL={{formatnum:{{#expr:{{PAGESINCATEGORY:Wikipedia_featured_lists|R}}-5}}}}
 
|FL={{formatnum:{{#expr:{{PAGESINCATEGORY:Wikipedia_featured_lists|R}}-5}}}}
 
|SUM={{formatnum:{{#expr:{{PAGESINCATEGORY:Wikipedia_good_articles|R}}-15+{{PAGESINCATEGORY:Featured_articles|R}}+{{PAGESINCATEGORY:Wikipedia_featured_lists|R}}-5}}}}
 
|SUM={{formatnum:{{#expr:{{PAGESINCATEGORY:Wikipedia_good_articles|R}}-15+{{PAGESINCATEGORY:Featured_articles|R}}+{{PAGESINCATEGORY:Wikipedia_featured_lists|R}}-5}}}}
|RGA={{formatnum:{{#expr:ceil {{NUMBEROFARTICLES:R}}/({{PAGESINCATEGORY:Wikipedia_good_articles|R}}-15)}}}}
+
|RGA={{formatnum:{{#expr:ceil({{NUMBEROFARTICLES:R}}/({{PAGESINCATEGORY:Wikipedia_good_articles|R}}-15))}}}}
|RFA={{formatnum:{{#expr:ceil {{NUMBEROFARTICLES:R}}/{{PAGESINCATEGORY:Featured_articles|R}}}}}}
+
|RFA={{formatnum:{{#expr:ceil({{NUMBEROFARTICLES:R}}/{{PAGESINCATEGORY:Featured_articles|R}})}}}}
|RFL={{formatnum:{{#expr:ceil {{NUMBEROFARTICLES:R}}/({{PAGESINCATEGORY:Wikipedia_featured_lists|R}}-5)}}}}
+
|RFL={{formatnum:{{#expr:ceil({{NUMBEROFARTICLES:R}}/({{PAGESINCATEGORY:Wikipedia_featured_lists|R}}-5))}}}}
|RSUM={{formatnum:{{#expr:ceil {{NUMBEROFARTICLES:R}}/({{PAGESINCATEGORY:Wikipedia_good_articles|R}}-15+{{PAGESINCATEGORY:Featured_articles|R}}+{{PAGESINCATEGORY:Wikipedia_featured_lists|R}}-5)}}}}
+
|RSUM={{formatnum:{{#expr:ceil({{NUMBEROFARTICLES:R}}/({{PAGESINCATEGORY:Wikipedia_good_articles|R}}-15+{{PAGESINCATEGORY:Featured_articles|R}}+{{PAGESINCATEGORY:Wikipedia_featured_lists|R}}-5))}}}}
 
|{{NUMBEROFARTICLES}}}}<noinclude>
 
|{{NUMBEROFARTICLES}}}}<noinclude>
 
{{template doc}}
 
{{template doc}}
 
</noinclude>
 
</noinclude>

Latest revision as of 17:07, 25 October 2008

286

50px Template documentation[view] [edit] [history] [purge]

Usage

Template {{Counter}} displays the number of Featured articles, the number of Featured lists and the number of Good articles (and their sum) on Wikipedia. In addition it displays the ratios of the total number of articles on Wiki to those numbers.

The template has the following options:

{{Counter|FA}}—the number of Featured articles (currently 0);
{{Counter|FL}}—the number of Featured lists (currently -5);
{{Counter|GA}}—the number of Good articles (currently -15);
{{Counter|SUM}}—their sum;
{{Counter|RFA or RFL or RGA or RSUM}}—the corresponding ratios;
when used without parameters it gives the total number of articles in Wikipedia.

See also