Template:Asbox: Difference between revisions

From Cvillepedia
Jump to navigation Jump to search
(stealing from wikipedia)
 
(pretty sure this will now do what I'm after)
Line 1: Line 1:
<table class="metadata plainlinks stub" style="background: transparent;"><tr>
{| class="ambox ambox-notice"
{{#if:{{{icon|}}}{{{image|}}}
|-
|<td>{{#if:{{{icon|}}}
| class="mbox-image" | [[{{#if:{{{image|}}}|{{{image}}}|Image:Logo-small25.jpg}}|{{#if:{{{pix|}}}|{{{pix}}}|40x30}}px|alt={{{imagealt|Stub icon}}}]]
  |{{{icon}}}
| class="mbox-text" | ''This {{#if:{{{article|}}}|{{{article}}}|article}} is a [http://en.wikipedia.org/wiki/Wikipedia:Stub stub]. You can help '''cvillepedia''' by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it].''
  |[[File:{{{image}}}|{{#if:{{{pix|}}}|{{{pix}}}|40x30}}px|alt={{{imagealt|Stub icon}}}]]
|}<includeonly>[[Category:{{#if:{{{category|}}}|{{{category}}}|Stubs}}]]</includeonly><noinclude>
}}</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 ***
{{Template:Asbox/doc}}
-->{{#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>
</noinclude>

Revision as of 13:30, 31 October 2009

Stub icon This article is a stub. You can help cvillepedia by expanding it.

Template:High-risk

This is the asbox or article stub box meta template. It is the standard template used for creating new or updating existing article stub box templates. It supports most, if not all, stub template styles.

Basic usage

{{asbox
| image     = the name of the image, e.g. Image.png - will be sized at 40x30px. Defaults to the cvillepedia logo.
| subject   = given before "article", e.g., "school" will produce "this school article is a stub"
| category  = the name of the category to place tagged pages in. E.g. "School stubs" will put the page in the "School stubs" category.
}}

This simple usage should suffice for a great many stub templates. Additional parameters are described below for advanced use.


Parameters

image

The template will prepend the "image:" portion; just use the name of the file.


subject

This subject article is a stub...

Examples:

  • This geography article is a stub...
  • This elementary physics article is a stub...

Note that you can include a link in this field if that would be appropriate.

category

The stub category the articles should go in.

Examples

Whatlinkshere

The page here should have a complete list of all templates using this template. This list can be compared with existing list of stub templates to identify new stub templates created out of process. The last entries will also be the most recently created items.