Difference between revisions of "Template:Asbox"

From Studio Grow Wiki
Jump to: navigation, search
(undo image check due to issues with borders, e.g. Template:Finland-stub and also check would be better on Template:Asbox/templatepage)
 
(Created page with "<includeonly>Category:Stub message boxes<!-- *** Template categorisation *** -->{{#if:{{{category|}}}|{{#ifeq:{{{tempsort|}}}|no||[[Category:{{{category}}}| {{{tempsort| {{P...")
Line 1: Line 1:
<table class="metadata plainlinks stub" style="background: transparent;"><tr>
+
<includeonly>[[Category:Stub message boxes]]<!--  *** Template categorisation *** -->{{#if:{{{category|}}}|{{#ifeq:{{{tempsort|}}}|no||[[Category:{{{category}}}| {{{tempsort| {{PAGENAME}}}}}]]}}}}<!-- -->{{#if:{{{category1|}}}|[[Category:{{{category1}}}| {{{tempsort1| {{PAGENAME}}}}}]]}}<!-- -->{{#if:{{{category2|}}}|[[Category:{{{category2}}}| {{{tempsort2| {{PAGENAME}}}}}]]}}<!--  *** exclude in print category *** -->[[Category:Exclude in print]]<!--  *** Maintenance categories and warnings *** -->{{#if:{{{icon|}}} |<!--defined-->[[Category:Stub message boxes using icon parameter]]  |<!--not defined -->{{#if:{{{image|}}}   |<!--defined, no maintenance category required, check to see if image exists and add to attention category if it doesn't -->{{#ifexist:Media:{{#ifeq:{{str find|{{{image}}}|{{!}}}}|-1|{{{image}}}|{{str left|{{{image}}}|{{#expr:{{str find|{{{image}}}|{{!}}}} -1}} }} }}||[[Category:Stub message boxes needing attention|B{{PAGENAME}}]]}}   |<!--not defined -->[[Category:Stub message boxes without images]]  }} }}{{#if:{{{imagealt|}}}  |<!--defined-->[[Category:Stub message boxes needing attention|I{{PAGENAME}}]]  |<!--not defined --> }}{{#if:{{{category|}}|<!--defined--> |<!--not defined -->{{ombox  |type=content  |text=The {{para|category}} parameter is not set. Please add an appropriate stub category.  }}[[Category:Stub message boxes needing attention|C{{PAGENAME}}]] }}{{#if:{{{subject|}}}{{{article|}}}{{{qualifier|}}} |<!--defined --> |<!--not defined -->{{ombox  |type=content  |text=This stub template contains no description! At least one of the parameters {{para|subject}}, {{para|article}} or {{para|qualifier}} must be defined.  }}[[Category:Stub message boxes needing attention|D{{PAGENAME}}]] }}<!-- -->{{#if:{{{category1|}}} |<!--defined-->{{#ifeq:{{Str left|{{{category1}}}|{{#expr:{{Str len|{{{category1}}}}}-6}}}} stubs|{{{category1}}}||[[Category:Stub message boxes needing attention|S{{PAGENAME}}]]}} }}{{#if:{{{category2|}}} |<!--defined-->{{#ifeq:{{Str left|{{{category2}}}|{{#expr:{{Str len|{{{category2}}}}}-6}}}} stubs|{{{category2}}}||[[Category:Stub message boxes needing attention|S{{PAGENAME}}]]}} }}<!-- -->{{#ifexpr:{{#if:{{{category|}}}|{{#ifexist:Category:{{{category}}}|0|1}}|0}} +{{#if:{{{category1|}}}|{{#ifexist:Category:{{{category1}}}|0|1}}|0}} +{{#if:{{{category2|}}}|{{#ifexist:Category:{{{category2}}}|0|1}}|0}} |{{ombox  |type=content  |text=One or more of the stub categories defined in this template do not seem to exist! Please double-check the parameters {{para|category}}, {{para|category1}} and {{para|category2}}.  }}[[Category:Stub message boxes needing attention|N{{PAGENAME}}]] }}{{#ifexist:{{FULLPAGENAME}}/doc  |[[Category:Stub message boxes with documentation subpages]] }}<!-- Check for category names that don't end in "stubs" -->{{#if:{{{category|}}}  |<!--defined-->{{#ifeq:{{Str left|{{{category}}}|{{#expr:{{Str len|{{{category}}}}}-6}}}} stubs|{{{category}}}||[[Category:Stub message boxes needing attention|S{{PAGENAME}}]]}} }}</includeonly><!-- *** template-specific documentation *** -->{{documentation|content= ==About this template== {{Asbox/stubtree}} This template is used to identify a{{#if:{{{subject|}}}|&#32;{{{subject|}}}}} stub{{#if:{{{qualifier|}}}|&#32;{{{qualifier|}}}}}. It uses {{tl|asbox}} which is a meta-template designed to ease the process of creating and maintaining stub templates.  ===Usage=== Typing <code><nowiki>{{</nowiki>{{PAGENAME:{{{name}}}}}<nowiki>}}</nowiki></code> produces the message shown at the top, and adds the article to the following categor{{#if:{{{category1|}}}{{{category2|}}}|ies|y}}: *[[:Category:{{{category}}}]]{{#if:{{{category1|}}}|*[[:Category:{{{category1}}}]] }}{{#if:{{{category2|}}}|*[[:Category:{{{category2}}}]] }}<!--  *** transclusion of /doc if it exists ***--> {{#ifexist:{{FULLPAGENAME}}/doc|{{{{FULLPAGENAME}}/doc}} }}<!--  *** generic documentation ***--> ==General information== {{Stub documentation}} |link box=This documentation is automatically generated by [[Template:Asbox/templatepage]].<br/>The general information is transcluded from [[Template:Stub documentation]]. <span style="font-size:smaller; font-style: normal line-height:130%">([{{fullurl:Template:Stub documentation|action=edit}} edit] &#124; [{{fullurl:Template:Stub documentation|action=history}} history])</span>{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop  |<br/>This template is [[WP:PROTECT|fully protected]] and any [[WP:CAT|categories]] and [[WP:ILL|interlanguage links]] should be added to the template's [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:Category_interwiki/preload}} /doc] subpage, which is not protected. }} }}<noinclude> </noinclude>
{{#if:{{{icon|}}}{{{image|}}}
 
|<td>{{#if:{{{icon|}}}
 
  |{{{icon}}}
 
  |[[File:{{{image}}}|{{#if:{{{pix|}}}|{{{pix}}}|40x30}}px|alt={{{imagealt|Stub icon}}}]]
 
}}</td>
 
}}
 
<td>''This {{{subject|}}} {{{article|article}}} {{{qualifier|}}} is a [[Wikipedia:stub|stub]].  You can help Wikipedia by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it].''{{#if:{{{name|}}}
 
|{{navbar|{{{name}}}|mini=yes|style=position:absolute; right:15px; font-size:smaller; display:none;}}
 
}}{{#if:{{{note|}}}
 
  |<br /><span style="font-style: normal; font-size: smaller;">{{{note}}}
 
}}</td>
 
</tr></table>{{#ifeq:{{NAMESPACE}}|{{ns:0}}<!--Article space-->|<!--
 
 
 
*** Stub category ***
 
-->{{#if:{{{category|}}}|[[Category:{{{category}}}]]}}<!--
 
 
 
*** Optional second stub category ***
 
-->{{#if:{{{category1|}}}|[[Category:{{{category1}}}]]}}<!--
 
 
 
  *** Optional third stub category ***
 
-->{{#if:{{{category2|}}}|[[Category:{{{category2}}}]]}}<!--
 
-->}}<!--
 
 
 
*** check for valid name parameter and transclude /templatepage on template page ***
 
-->{{#if:{{{demo|<noinclude>yes</noinclude>}}}
 
  |<!--Demonstration version-->
 
  |{{#switch:{{FULLPAGENAME:{{{name|}}}}}
 
    |{{FULLPAGENAME}}=<!--Template page-->{{Asbox/templatepage
 
      |image    = {{{image|}}}
 
      |pix      = {{{pix|}}}
 
      |imagealt  = {{{imagealt|}}}
 
      |icon      = {{{icon|}}}
 
      |subject  = {{{subject|}}}
 
      |article  = {{{article|}}}
 
      |qualifier = {{{qualifier|}}}
 
      |category = {{{category|}}}
 
      |tempsort  = {{{tempsort|}}}
 
      |category1 = {{{category1|}}}
 
      |tempsort1 = {{{tempsort1|}}}
 
      |category2 = {{{category2|}}}
 
      |tempsort2 = {{{tempsort2|}}}
 
      |note      = {{{note|}}}
 
      |name      = {{{name|}}}
 
    }}
 
    |{{#titleparts:{{FULLPAGENAME}}|1}}=<!--Is a subtemplate, e.g. a sandbox version. Don't display documentation.-->
 
    |#default={{#ifeq:{{NAMESPACE}}|Template
 
      |<!--{{ombox
 
        |type=content
 
        |text=It appears that the ''name'' parameter of this template is undefined or incorrect. If this is the stub template, please set {{para|name|{{FULLPAGENAME}}}}. If this is a demonstration please set {{para|demo|yes}}.
 
      }}-->[[Category:Stub message boxes needing attention|{{#if:{{{name|}}}|E|W}}{{PAGENAME}}]]
 
    }}
 
  }}
 
}}<noinclude><!--
 
 
 
  *** Documentation ***
 
-->{{documentation}}
 
<!-- Add categories and inter-wikis to the /doc subpage, not here! -->
 
</noinclude>
 

Revision as of 04:09, 4 April 2011

50px Template documentation
==About this template==

Stub hierarchy

This template is used to identify a stub. It uses {{asbox}} which is a meta-template designed to ease the process of creating and maintaining stub templates. ===Usage=== Typing {{}} produces the message shown at the top, and adds the article to the following category: *[[:Category:{{{category}}}]] ==General information== This is a stub template. A brief explanation of these templates follow; for full details please consult Wikipedia:Stub.

What is a stub?

A stub is an article containing only a few sentences of text which is too short to provide encyclopedic coverage of a subject.

How is a stub identified?

  • If possible, try to find the most appropriate stub template for the article. A full list can be found at Wikipedia:WikiProject Stub sorting/Stub types.
  • Two or more different stub templates may be used, if necessary.
  • Place a stub template at the very end of the article, after the "External links" section, any navigation templates, and the category tags, but before any interlanguage links. As usual, templates are added by including their name inside double curly brackets, e.g. {{stub}}.

Further information

Further information can be found at: