Vorlage:Asbox/Doku: Unterschied zwischen den Versionen

Aus skandinavien-wiki.net
imported>MSGJ
(hmm)
K (copy-edit, rm live auto-categorizing parameters (hopefully))
Zeile 2: Zeile 2:
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->


This is the '''asbox''' or '''article stub box''' meta template. This is a standard template for creating standard stub templates. It supports most, if not all, stub template styles in place prior to 26 September 2007.
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, in place prior to 26 September 2007.  
 
It is used to create or standardise existing ''article stub box'' templates.


=== Basic usage ===
=== Basic usage ===
<pre><nowiki>
<pre>
{{ asbox
{{asbox
| image    = just the name of the image, e.g. Image.png - will be sized at 40x30px
| image    = just the name of the image, e.g. Image.png - will be sized at 40x30px
| subject  = given before "article", e.g. "this *biographical* article is a stub"
| subject  = given before "article", e.g. "this *biographical* article is a stub"
| qualifier = given after "article" e.g. "the article *about a musician* is a stub"
| qualifier = given after "article" e.g. "the article *about a musician* is a stub"
| category  = just the name of the category to place tagged pages in, e.g. History stubs
| category  = just the name of the category to place tagged pages in, e.g. History stubs
}}
}}</pre>
</nowiki></pre>


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


=== Full usage ===
=== Full usage ===
<pre><nowiki>
<pre>
{{ asbox
{{asbox
| image    = Ambox style.png
| image    = Ambox style.png
| pix      =  
| pix      =  
Zeile 30: Zeile 27:
| tempsort1 =  
| tempsort1 =  
| note      =  
| note      =  
}}
}}</pre>
</nowiki></pre>


===Parameters===
===Parameters===
Zeile 83: Zeile 79:
  | subject  = [[Østfold]] location
  | subject  = [[Østfold]] location
  | qualifier =  
  | qualifier =  
  | category  = <noinclude>Template documentation</noinclude>
  | category  =  
}}
}}


Zeile 90: Zeile 86:


==== Using <code>icon</code> and category1 ====
==== Using <code>icon</code> and category1 ====
Using <code>icon</code> allows more flexibility in some circumstances than <code>image</code> and <code>pix</code>, since it can be used with templates. As of January 24, 2007, the new parser requires the <code>{{</code> and <code>}}</code> around the used template, and a single <code>|</code> is used instead of <code><nowiki>{{!}}</nowiki></code> to separate the parameters. Old code relying on <code><nowiki>{{!}}</nowiki></code> will need to be updated:
Using <code>icon</code> allows more flexibility in some circumstances than <code>image</code> and <code>pix</code>, since it can be used with templates. As of January 24, 2007, the new parser requires the <code>{{</code> and <code>}}</code> around the used template, and a single <code>|</code> is used instead of <code><nowiki>{{!}}</nowiki></code> to separate the parameters. Old code relying on <code><nowiki>{{!}}</nowiki></code> will need to be updated:


Zeile 110: Zeile 105:
  | subject  = [[biography|biographical]]
  | subject  = [[biography|biographical]]
  | qualifier = related to Welsh [[association football]]
  | qualifier = related to Welsh [[association football]]
  | category  = Template documentation   
  | category  =  
}}
}}


Zeile 117: Zeile 112:


=== Whatlinkshere ===
=== Whatlinkshere ===
The page [http://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Template:Asbox&hideredirs=1&namespace=10&hidelinks=1 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.'''
The page [http://en.wikipedia.org/w/index.php?title=Special:WhatLinksHere/Template:Asbox&hideredirs=1&namespace=10&hidelinks=1 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.'''


=== See also ===
=== See also ===
* [[Wikipedia talk:WikiProject Stub sorting/Archive11#Stub template standardisation]]
* [[Wikipedia talk:WikiProject Stub sorting/Archive11#Stub template standardisation]]
* {{tl|MetaPicstub}}
* {{tl|MetaPicstub}}
{{Mbox templates see also}}
{{Mbox templates see also}}



Version vom 21. Juli 2009, 03:54 Uhr

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, in place prior to 26 September 2007.

Basic usage

{{asbox
| image     = just the name of the image, e.g. Image.png - will be sized at 40x30px
| subject   = given before "article", e.g. "this *biographical* article is a stub"
| qualifier = given after "article" e.g. "the article *about a musician* is a stub"
| category  = just the name of the category to place tagged pages in, e.g. History stubs
}}

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

Full usage

{{asbox
| image     = Ambox style.png
| pix       = 
| subject   = 
| qualifier = 
| category  = 
| tempsort  = 
| category1 = 
| tempsort1 = 
| note      = 
}}

Parameters

icon or image

If the image is called with an icon template, icon is set to the full syntax of the template; that's the name of the template, plus any arguments (separated with | ), including the {{ and }} around it. If the image is called explicitly image is the name of the image :- pix will likely be required as well, the default value for pix is 40x30.

pix

The size of the image, only required if image is set and its size is not 40x30. Defensive programming suggests setting the value of pix even if it is 40x30.

subject and qualifier

This subject article qualifier is a stub...

Examples:

  • This geography article about a place in Rohan is a stub...
  • This elementary physics article is a stub...
  • This article about Rudolph the Red-nosed reindeer is a stub...

category

The stub category the articles should go in. Note that, unless the parameter tempsort is set (see below), the template will only include articles in the stub category.

tempsort

If exists the template will be put in its own category sorted as " " (space) followed by tempsort.

category1

An optional second stub category the articles should go in. Note the template will only include articles in the stub category, unless the parameter tempsort1 is set, in which case templates (in particular the stub template itself) will also be included - sorted with the value of " " (space) followed by tempsort1.

tempsort1

If exists the template will be put in its own second category sorted as " " (space) followed by tempsort1.

note

If exists the value will be added, as a "small" note, to the stub template.

Examples

Using image

{{Asbox 
 | image     = Ostfold_vapen.png
 | pix       = 30
 | subject   = [[Østfold]] location
 | qualifier = 
 | category  = Østfold geography stubs
}}

Appears as:

Based on {{Østfold-geo-stub}}

(category has been over-ridden to keep this page out of the stub category)

Using icon and category1

Using icon allows more flexibility in some circumstances than image and pix, since it can be used with templates. As of January 24, 2007, the new parser requires the {{ and }} around the used template, and a single | is used instead of {{!}} to separate the parameters. Old code relying on {{!}} will need to be updated:

{{Asbox
 | icon      = {{Soccer icon|Wales|50}}
 | subject   = [[biography|biographical]]
 | qualifier = related to Welsh [[association football]]
 | category  = Welsh football biography stubs
 | category1 = Welsh people stubs
 | tempsort  =       
}}

Appears as:

Based on {{Wales-footy-bio-stub}}

(category and category1 have been over-ridden to keep this page out of the stub categories)

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.

See also

There are seven metatemplates in the Module:Message box family:
  • {{Ambox}}, for messageboxes on article pages.
  • {{Cmbox}}, for messageboxes on category pages.
  • {{Imbox}}, for messageboxes on file (image) pages.
  • {{Tmbox}}, for messageboxes on talk pages.
  • {{Fmbox}}, for header and footer messageboxes.
  • {{Ombox}}, for messageboxes on other types of page.
  • {{Mbox}}, for messageboxes that are used in different namespaces and change their presentation accordingly.

Closely related metatemplates:

  • {{Asbox}}, for messageboxes in article stubs.
  • {{Dmbox}}, for messageboxes on disambiguation or set-index pages.
  • {{Ivmbox}}, a simple full-width box with default ivory background intended to frame important messages or notices.