Jump to content

Template:User Russian city/doc

From Wikipedia, the free encyclopedia
Example userbox created using this template
This user comes from Moscow.

This is a meta-template to create userboxes for Russian cities and towns. It includes automatic categorization of userpages into Category:Wikipedians in Russia and a category corresponding to the city or town specified by the first parameter.

Use this template in conjunction with Template:User Russian city/adoc.

Usage

[edit]

How to create new userbox?

[edit]
  1. Create userbox page using code from the section below. It is recommended to use this code verbatim.
  2. On the newly created page, click [create] link to create documentation subpage.
  3. Use instructions of /adoc template to create new /doc page of the new userbox.

Code

[edit]

Code to create a userbox:


{{subst:User Russian city/boilerplate|city=city name|image2=right box filename|verb=default verb phrase}}
for example:
{{subst:User Russian city/boilerplate|city=Moscow|image2=Moscow.JPG|verb=comes from}}


After saving, you can also add default values for formatting/color parameters, for example: | info-fc = {{{info-fc|red}}} to make the text color red by default. Use optional parameters |usercategory2= and |usercategory3= if you need to tweak automatic categorization. See "Parameters" section for details. Note, that there should not be any whitespace characters between first three parameters' values and | in the template invocation.

Parameters

[edit]
1
First parameter — name of the city. Required. If the Wikipedia page is disambiguated, use parameter |page= to change the wikilink.
image2
Filename for the right image. Required.
image1
Filename for the left image. Left image is "Coat of Arms of CityName.svg" by default. Optional parameter.
verb
Use this to allow passing custom verbs into the userbox.

{{Userbox-2}} parameters

[edit]

This template also supports passing through some parameters of {{Userbox-2}}:

nocat
See WP:NOCAT for details.
info-c
background color of the main box
info-fc
foreground color of the main box
info-s
font size of the text in the main box
info-a
alignment of the text in the main box
id1-c
background color of the left box
id2-c
background color of the right box
border-c
border color of the userbox
border-s
border width in pixels
usercategory2
custom user category. By default, category "Users in X" is used where X is the name of the city, first parameter.
usercategory3
additional user category.

See documentation of {{Userbox-2}} for details.

Example

[edit]

Example from the instructions above produces following code:

<includeonly>{{User Russian city|Moscow|image1=Coat of arms of Moscow.svg|image2=Moscow.JPG|verb={{{1|lives in}}}
| nocat    = {{{nocat|}}}
| border-c = {{{border-c|}}}
| border-s = {{{border-s|}}}
| id1      = {{{id1|}}}
| id2      = {{{id2|}}}
| id1-c    = {{{id1-c|}}}
| id2-c    = {{{id2-c|}}}
| info-c   = {{{info-c|}}}
| info-fc  = {{{info-fc|}}}
| info-s   = {{{info-s|}}}
| info-a   = {{{info-a|}}}
}}</includeonly><noinclude>
{{documentation}}
</noinclude>

Resulting userbox: Template:User Russian city/example.