Template:Category meter: Difference between revisions

MDFW - The Mystery Dungeon Tree of Information.
Jump to navigation Jump to search
(Imported from Two Worlds Wiki)
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<onlyinclude><div style="display: flex; align-items: center;">
<onlyinclude><div style="display: flex; align-items: center;">
<div alt="{{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages}} / {{NUMBEROFARTICLES}}" title="{{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages}} / {{NUMBEROFARTICLES}}" style="background: conic-gradient({{{color|{{{2|#69f}}}}}} 0 calc({{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages|R}}turn/{{NUMBEROFARTICLES:R}}), transparent calc({{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages|R}}turn/{{NUMBEROFARTICLES:R}}) 1turn); border: 2px solid {{{color|{{{2|#69f}}}}}}; border-radius: 50%; cursor: help; display: inline-block; font-size: 0; height: 32px; width: 32px; vertical-align: middle;">
<div alt="{{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages}} out of {{NUMBEROFARTICLES}}." title="{{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages}} out of {{NUMBEROFARTICLES}}." style="background: conic-gradient({{{color|{{{2|#69f}}}}}} 0 calc({{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages|R}}turn/{{NUMBEROFARTICLES:R}}), transparent calc({{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages|R}}turn/{{NUMBEROFARTICLES:R}}) 1turn); border: 2px solid {{{color|{{{2|#69f}}}}}}; border-radius: 50%; cursor: help; display: inline-block; font-size: 0; height: 32px; width: 32px; vertical-align: middle;">
{{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages}} / {{NUMBEROFARTICLES}}
{{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages}} out of {{NUMBEROFARTICLES}}.
</div>
</div>
<div>
<div>
<span style="display: inline-block; margin-left: 8px; vertical-align: middle;">{{#ifeq:{{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages|R}}|0|Looks like there aren't any pages in {{#if:{{{1|}}}{{#ifeq:{{NAMESPACE}}|{{ns:14}}||return if the current page isn't a category}}|the category "[[:Category:{{{1|{{PAGENAME}}}}}|{{{1|{{PAGENAME}}}}}]]"|this category}}.<br />|'''{{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages}}''' pages in {{#if:{{{1|}}}{{#ifeq:{{NAMESPACE}}|{{ns:14}}||return if the current page isn't a category}}|the category "[[:Category:{{{1|{{PAGENAME}}}}}|{{{1|{{PAGENAME}}}}}]]"|this category}} / '''{{NUMBEROFARTICLES}}''' total articles<br />Assuming most of the pages are articles, that's about '''{{#expr:100*{{PAGESINCATEGORY:{{{1|{{PAGENAME}}}}}|pages|R}}/{{NUMBEROFARTICLES:R}} round 1}}%''' of the wiki.}} [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=purge}} <span alt="Clear the cache, forcing the latest results to appear" title="Clear the cache, forcing the latest results to appear">Refresh</span>]</span>
<span style="display: inline-block; margin-left: 8px; vertical-align: middle;">{{#ifeq: {{PAGESINCATEGORY: {{{1|{{PAGENAME}}}}} | pages | R }} | 0 |
  Looks like there aren't any pages in {{#if: {{{1|}}} {{#ifeq: {{NAMESPACE}} | {{ns:14}} |
     
      |
      return if the current page isn't a category
    }} |
    the category "[[:Category:{{{1|{{PAGENAME}}}}}|{{{1|{{PAGENAME}}}}}]]"
    |
    this category
  }}.<br />
  |
  '''{{PAGESINCATEGORY: {{{1|{{PAGENAME}}}}} | pages}}''' pages in {{#if: {{{1|}}} {{#ifeq:{{NAMESPACE}} | {{ns:14}} |
   
    |
    return if the current page isn't a category
  }} |
    the category "[[:Category:{{{1|{{PAGENAME}}}}}|{{{1|{{PAGENAME}}}}}]]"
    |
    this category
  }} out of '''{{NUMBEROFARTICLES}}''' total articles.<br />Assuming most of the pages are articles, that's about '''{{#expr: 100 * {{PAGESINCATEGORY: {{{1|{{PAGENAME}}}}} | pages | R}} / {{NUMBEROFARTICLES:R}} round 1 }}%''' of the wiki.
}} [{{SERVER}}{{localurl: {{NAMESPACE}}:{{PAGENAME}} | action=purge }} <span alt="Clear the cache, forcing the latest results to appear." title="Clear the cache, forcing the latest results to appear.">Refresh</span>]</span>
</div>
</div>
</div></onlyinclude><noinclude>
</div></onlyinclude><noinclude>
{{doc}}
{{doc}}[[Category:Notice Templates]]
</noinclude>
</noinclude>

Latest revision as of 02:34, 20 June 2024

0 out of 14,125.

Looks like there aren't any pages in the category "Category meter".
Refresh

Template-info.png Documentation

This template gives a rough estimate of the size of a category, in proportion to the size of the main namespace of the wiki.

The template calls expensive parser functions. Using it a lot on a single page may cause the template to break. It's meant to be used once per page, anyway.

Usage

By default, the page title is used as the name of the category. Set parameter {{{1}}} to the name of another category (without the "Category:" prefix) to check there, instead.

Parameter {{{color}}} or {{{2}}} changes the foreground color of the pie chart.