Difference between revisions of "Template:To-do Icon"

From Nookipedia, the Animal Crossing wiki
Jump to navigation Jump to search
(Adding new parameter to display manual counts + documentation.)
m (Correcting code)
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
<div style="float:left; text-align:center;">
 
<div style="float:left; text-align:center;">
[[File:{{{image|Corkboard}}} HHD Icon.png|link={{{altlink|{{{link|Category:Active discussions}}}}}}|{{{hover|Active discussions}}}]]<br><small>{{{text|Topics}}}</small><br>[[{{{altlink|:{{{link|Category:Active Discussions}}}}}}|{{colorshow|000|{{{manual|{{#expr:{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link|Category:Active Discussions}}}}}}}|{{{type|pages}}}|R}}+{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link2|}}}}}}}|{{{type|pages}}}|R}}+{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link3|}}}}}}}|{{{type|pages}}}|R}}}}}}}}}]]
+
[[File:{{{image|Corkboard}}} HHD Icon.png|{{#if:{{{size|}}}|{{{size|}}}}}|link={{{altlink|{{{link|Category:Active discussions}}}}}}|{{{hover|Active discussions}}}]]<br><small>{{{text|Topics}}}</small><br>[[{{{altlink|:{{{link|Category:Active Discussions}}}}}}|{{colorshow|000|{{{manual|{{#expr:{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link|Category:Active Discussions}}}}}}}|{{{type|pages}}}|R}}+{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link2|}}}}}}}|{{{type|pages}}}|R}}+{{PAGESINCATEGORY:{{#titleparts: {{PAGENAME:{{{link3|}}}}}}}|{{{type|pages}}}|R}}}}}}}}}]]
 
</div>
 
</div>
 
<noinclude>
 
<noinclude>
Line 22: Line 22:
 
*The parameter '''type''' can be used to change the type of pages in a category that will be counted. Default is "pages".
 
*The parameter '''type''' can be used to change the type of pages in a category that will be counted. Default is "pages".
 
*The parameter '''manual''' can be used to bypass automatic category counts and insert a manual display value.
 
*The parameter '''manual''' can be used to bypass automatic category counts and insert a manual display value.
 +
*The parameter '''size''' can be used to specify an alternate size for the displayed image.

Revision as of 17:01, November 9, 2019

Active discussions
Topics
3

Usage

This icon is used as a visual representation of different types of active to-do tasks on Nookipedia.

{{To-do Icon
| image  = (Name of item to display)
| link  = (Page to link to)
| hover = (Hover text)
| text  = (Text to display)
}}

Notes

  • Template will only produce Animal Crossing: Happy Home Designer furniture icons, so only HHD items should be input.
  • Template can only properly link to category pages.
  • The parameter link2 and link3 can be used to add a second and third category's page count, respectively, to the number displayed below the icon.
  • The parameter altlink can be used to link to a page other than the category page being counted.
  • The parameter type can be used to change the type of pages in a category that will be counted. Default is "pages".
  • The parameter manual can be used to bypass automatic category counts and insert a manual display value.
  • The parameter size can be used to specify an alternate size for the displayed image.