Changes

Template:Uir/doc

16,774 bytes added, 18:47, 22 July 2012
remove sandbox
{{documentation subpage}}__NOTOC__
This '''[[Region|regional]] [[Wikipedia:Userboxes|userbox]] [[Help:Template|template]]''' will display a userbox describing your association with a region and will declare up to seven user regional [[Help:Category|categories]] when placed on your [[Wikipedia:User page|user page]]. This template is most commonly invoked by one of the [[:Category:Multiuse regional user templates|User in Region templates]] which supply the parameters for this template to function as a metatemplate. The complete syntax is:

'''<tt><nowiki>{{uir|option=|region=|simple=|inflect=|the=|title=|adj=|demonym=|an=|main=|sub=|group=|member=|cres=|ccit=|cint=|cpro|res=|cit=|int=|pro=|nocat=|nation=|nthe=|nwp=|cnres=|cncit=|cnint=|nres=|ncit=|nint=|align=|color=|image=|width=|border-c=|id=|id-a=|id-c=|id-w=|info=|info-c=|info-fc=|info-lh=|info-s=|wp-s=}}</nowiki></tt>'''

where:
*<tt>option=</tt> the option number (default=<tt>1</tt>, see the Options table below)
*<tt>region=</tt> the required region name as listed in Wikipedia
*<tt>simple=</tt> the simplified form of the region name if different (default=<tt><nowiki>{{{region|}}}</nowiki></tt>)
*<tt>inflect=</tt> the inflected form of the region name if different (default=<tt><nowiki>{{{region|}}}</nowiki></tt>)
*<tt>the=the</tt> places a "the " before the region name (default=''<tt>null</tt>'')
*<tt>wrap=wrap</tt> allows a multi-word region name to break between lines (default=''<tt>null</tt>'')
*<tt>title=</tt> the fully formatted region title to be used in the userbox (default=<tt><nowiki>{{#if:{{{the|}}}|the&#32;}}[[{{{region|}}}|'''{{#if:{{{wrap|}}}||<span style="white-space:nowrap">}}{{{inflect|{{{simple|{{{region|}}}}}}}}}{{#if:{{{wrap|}}}||</span>}}''']]</nowiki></tt>)
*<tt>adj=</tt> the adjective form of the region name (default=<tt><nowiki>{{{inflect|{{{simple|{{{region|}}}}}}}}}</nowiki></tt>)
*<tt>demonym=</tt> an optional regional demonym ('''only if''' preferred for options 55 or 56, e.g., "This user is a '''[[Denmark|Dane]]'''" ''versus'' "This user is from '''[[Denmark]]'''")
*<tt>an=an</tt> if the optional regional demonym begins with a vowel sound (default=<tt>a</tt>)
*<tt>main=</tt> the root name of the responsible regional WikiProject (default=<tt><nowiki>{{{simple|{{{region|}}}}}}</nowiki></tt>)
*<tt>sub=</tt> the root name of the regional subgroup, if any (default=<tt><nowiki>{{{simple|{{{region|}}}}}}</nowiki></tt>)
*<tt>group=</tt> the type of regional project group:
**<tt>group=WikiProject</tt> (default)
**<tt>group=work group</tt>
**<tt>group=task force</tt>
**<tt>group=none</tt>
**<tt>group=</tt>''other''
*<tt>member=</tt> the type of regional project membership:
**<tt>member=member</tt> (default)
**<tt>member=participant</tt>
**<tt>member=volunteer</tt>
**<tt>member=</tt>''other''
*<tt>cres=</tt> the root name of the regional residence user category
*<tt>ccit=</tt> the root name of the regional citizenship user category
*<tt>cint=</tt> the root name of the regional interest user category
*<tt>cpro=</tt> the root name of the regional project membership category
*<tt>res=yes</tt> declares the user page a member of the regional residence user category
*<tt>cit=yes</tt> declares the user page a member of the regional citizenship user category
*<tt>int=yes</tt> declares the user page a member of the regional interest user category
*<tt>pro=yes</tt> declares the user page a member of the regional project membership category
*<tt>nocat=true</tt> disables the declaration of user categories
The following eight parameters are used '''only if the region is a subdivision of a [[sovereign state]]''':
*<tt>nation=</tt> the required nation name as listed in Wikipedia only if the region is a subdivision of a sovereign state
*<tt>nthe=the</tt> places a "the " before the nation name (default=''<tt>null</tt>'')
*<tt>cnres=</tt> the root name of the national residence user category
*<tt>cncit=</tt> the root name of the national citizenship user category
*<tt>cnint=</tt> the root name of the national interest user category
*<tt>nres=yes</tt> declares the user page a member of the national residence user category
*<tt>ncit=yes</tt> declares the user page a member of the national citizenship user category
*<tt>nint=yes</tt> declares the user page a member of the national interest user category

====Options table====
{|border=1 cellpadding=2
!rowspan=2 width=47|option
!rowspan=2|userbox example
!colspan=2|default user categories
|-
!width=144|[[sovereign state]]
!width=144|[[Dependent territory|dependent state]]
|-
|align=center|0
|height=47 align=center|&nbsp;
|colspan=2 align=center|Option 0 allows user categories to be declared<br/>without displaying a userbox
|-
|align=center|1
|align=center|{{uir|option=1|region=Afghanistan|nocat=true}}
|align=center|res
|align=center|res, nres
|-
|align=center|2
|align=center|{{uir|option=2|region=Algeria|nocat=true}}
|align=center|res
|align=center|res, nres
|-
|align=center|3
|align=center|{{uir|option=3|region=Argentina|nocat=true}}
|align=center|res
|align=center|res, nres
|-
|align=center|4
|align=center|{{uir|option=4|region=Australia|nocat=true}}
|align=center|res
|align=center|res, nres
|-
|align=center|5
|align=center|{{uir|option=5|region=Bangladesh|nocat=true}}
|align=center|res
|align=center|res, nres
|-
|align=center|6
|align=center|{{uir|option=6|region=Brazil|nocat=true}}
|align=center|res
|align=center|res, nres
|-
|align=center|7
|align=center|{{uir|option=7|region=Burma|title='''[[Burma|Myanmar]]'''|image=Flag of Myanmar.svg|nocat=true}}
|align=center|res
|align=center|res, nres
|-
|align=center|8
|align=center|{{uir|option=8|region=Canada|nocat=true}}
|align=center|res
|align=center|res, nres
|-
|align=center|11
|align=center|{{uir|option=11|region=China|nocat=true}}
|align=center|res, cit
|align=center|res, nres, ncit
|-
|align=center|12
|align=center|{{uir|option=12|region=Colombia|nocat=true}}
|align=center|res, cit
|align=center|res, nres, ncit
|-
|align=center|13
|align=center|{{uir|option=13|region=Democratic Republic of the Congo|the=the|title=the '''[[Democratic Republic of the Congo]]'''|nocat=true}}
|align=center|res, cit
|align=center|res, nres, ncit
|-
|align=center|14
|align=center|{{uir|option=14|region=Côte d'Ivoire|image=Flag of Cote d'Ivoire.svg|nocat=true}}
|align=center|res, cit
|align=center|res, nres, ncit
|-
|align=center|15
|align=center|{{uir|option=15|region=Egypt|nocat=true}}
|align=center|res, cit
|align=center|res, nres, ncit
|-
|rowspan=2 align=center|16
|align=center|{{uir|option=16|region=Ethiopia|nocat=true}}
|align=center|res, cit
|
|-
|align=center|{{uir|option=16|region=Florida|nation=United States|nthe=the|nocat=true}}
|
|align=center|res, nres, ncit
|-
|rowspan=2 align=center|17
|align=center|{{uir|option=17|region=Germany|nocat=true}}
|align=center|res, cit
|
|-
|align=center|{{uir|option=17|region=Guanajuato|image=Flag of Guanajuato.png|nation=Mexico|nocat=true}}
|
|align=center|res, nres, ncit
|-
|rowspan=2 align=center|18
|align=center|{{uir|option=18|region=Ghana|nocat=true}}
|align=center|res, cit
|
|-
|align=center|{{uir|option=18|region=Scotland|nation=United Kingdom|nthe=the|nocat=true}}
|
|align=center|res, nres, ncit
|-
|align=center|19
|align=center|{{uir|option=19|region=India|nocat=true}}
|align=center|res, cit
|align=center|res, nres, ncit
|-
|align=center|20
|align=center|{{uir|option=20|region=Indiana|nocat=true}}
|align=center|cit
|align=center|ncit
|-
|align=center|21
|align=center|{{uir|option=21|region=Indonesia|nocat=true}}
|align=center|cit
|align=center|ncit
|-
|align=center|22
|align=center|{{uir|option=22|region=Iran|nocat=true}}
|align=center|cit
|align=center|ncit
|-
|align=center|23
|align=center|{{uir|option=23|region=Malaysia|nocat=true}}
|align=center|cit
|align=center|ncit
|-
|align=center|24
|align=center|{{uir|option=24|region=Mexico|nocat=true}}
|align=center|cit
|align=center|ncit
|-
|align=center|31
|align=center|{{uir|option=31|region=Pakistan|nocat=true}}
|align=center|res, cit, int
|align=center|res, int, nres, ncit
|-
|align=center|32
|align=center|{{uir|option=32|region=Peru|nocat=true}}
|align=center|res, cit, int
|align=center|res, int, nres, ncit
|-
|align=center|33
|align=center|{{uir|option=33|region=Philippines|the=the|nocat=true}}
|align=center|res, int
|align=center|res, int, nres
|-
|align=center|34
|align=center|{{uir|option=34|region=Poland|nocat=true}}
|align=center|cit, int
|align=center|int, ncit
|-
|align=center|35
|align=center|{{uir|option=35|region=Romania|nocat=true}}
|colspan=2 align=center|int
|-
|align=center|36
|align=center|{{uir|option=36|region=Saudi Arabia|nocat=true}}
|colspan=2 align=center|int
|-
|align=center|37
|align=center|{{uir|option=37|region=South Africa|nocat=true}}
|colspan=2 align=center|int
|-
|align=center|38
|align=center|{{uir|option=38|region=Sudan|nocat=true}}
|colspan=2 align=center|int
|-
|rowspan=7 align=center|41
|align=center|{{uir|option=41|region=Russia|nocat=true}}
|rowspan=7 colspan=2 align=center|int, pro
|-
|align=center|{{uir|option=41|region=Spain|member=participant|nocat=true}}
|-
|align=center|{{uir|option=41|region=Galápagos Islands|group=task force|main=Ecuador|image=Flag of Ecuador.svg|nocat=true}}
|-
|align=center|{{uir|option=41|region=Southern California|group=task force|member=participant|main=California|image=Flag of California.svg|nocat=true}}
|-
|align=center|{{uir|option=41|region=Guam|group=work group|main=Micronesia|nocat=true}}
|-
|align=center|{{uir|option=41|region=French Polynesia|group=work group|member=participant|main=Polynesia|nocat=true}}
|-
|align=center|{{uir|option=41|region=Jalisco|group=none|nocat=true}}
|-
|align=center|51
|align=center|{{uir|option=51|region=Iraq|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|52
|align=center|{{uir|option=52|region=Italy|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|53
|align=center|{{uir|option=53|region=Japan|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|54
|align=center|{{uir|option=54|region=Kenya|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|rowspan=2 align=center|55
|align=center|{{uir|option=55|region=North Korea|adj=North Korean|nocat=true}}
|rowspan=2 colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|{{uir|option=55|region=South Korea|demonym=South Korean|nocat=true}}
|-
|rowspan=2 align=center|56
|align=center|{{uir|option=56|region=Madagascar|adj=Malagasy|nocat=true}}
|rowspan=2 colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|{{uir|option=56|region=Malaysia|demonym=Malaysian|nocat=true}}
|-
|align=center|61
|align=center|{{uir|option=61|region=Mexico|adj=Mexican|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|62
|align=center|{{uir|option=62|region=Morocco|adj=Moroccan|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|63
|align=center|{{uir|option=63|region=Mozambique|adj=Mozambican|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|64
|align=center|{{uir|option=64|region=Nigeria|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|72
|align=center|{{uir|option=72|region=Taiwan|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|73
|align=center|{{uir|option=73|region=Tanzania|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|74
|align=center|{{uir|option=74|region=Thailand|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|75
|align=center|{{uir|option=75|region=Turkey|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|81
|align=center|{{uir|option=81|region=Uganda|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|82
|align=center|{{uir|option=82|region=Ukraine|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|83
|align=center|{{uir|option=83|region=United Kingdom|the=the|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|91
|align=center|{{uir|option=91|region=United States|the=the|title=the [[United States|'''{{nowrap|United States of America}}''']]|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|92
|align=center|{{uir|option=92|region=Uzbekistan|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|93
|align=center|{{uir|option=93|region=Venezuela|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|94
|align=center|{{uir|option=94|region=Vietnam|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|-
|align=center|99
|align=center|{{uir|option=99|region=Yemen|nocat=true}}
|colspan=2 align=center|''<span style="color:cyan">none</span>''
|}

====Userbox override parameters====
The following additional parameters may be used to override this template's default userbox settings:
*<tt>float=</tt> an optional horizontal float of the userbox:
**<tt>float=left</tt> (default)
**<tt>float=right</tt>
**<tt>float=none</tt>
*<tt>align=</tt> an optional horizontal alignment of the userbox text:
**<tt>align=left</tt>
**<tt>align=center</tt> (default)
**<tt>align=right</tt>
**<tt>align=justify</tt>
*<tt>color=</tt> an optional userbox background color (default=<tt>white</tt>)
*<tt>image=</tt> an optional userbox image (default=<tt><nowiki>Flag of {{#if:{{{the|}}}|the&#32;}}{{{region|}}}.svg</nowiki></tt>)
*<tt>width=</tt> an optional maximum width of the userbox image in pixels (default=''null'', i.e., limited only by image height of 45 pixels)
*<tt>border-c=</tt> an alternate userbox border color (default=<tt>black</tt>)
*<tt>id=</tt> an alternate text or image to the default flag image
*<tt>id-a=</tt> an alternate horizontal alignment of the <tt>id</tt> (default=<tt>left</tt>)
**<tt>id-a=left</tt> (default)
**<tt>id-a=center</tt>
**<tt>id-a=right</tt>
*<tt>id-c=</tt> an alternate <tt>id</tt> background color (default=<tt>color</tt> if <tt>width</tt> is specified, otherwise <tt>border-c</tt>)
*<tt>id-w=</tt> an alternate width of the <tt>id</tt> in pixels (default=<tt>1</tt>)
*<tt>info=</tt> an alternate userbox text (see the Options table above for the defaults)
*<tt>info-c=</tt> an alternate <tt>info</tt> background color (default=<tt>color</tt>)
*<tt>info-class=</tt> an optional <tt>info-class</tt>
*<tt>info-fc=</tt> an alternate <tt>info</tt> font color (default=<tt>black</tt>)
*<tt>info-lh=</tt> an alternate <tt>info</tt> line height (default=<tt><nowiki>{{#expr:1.05+{{{wp-s|10}}}/40}}em</nowiki></tt> for option 41, otherwise <tt>1.25em</tt>)
*<tt>info-s=</tt> an alternate <tt>info</tt> font size in pixels (default=<tt>8</tt>)
*<tt>wp-s=</tt> an alternate <tt>info</tt> emphasis font size in pixels (default=<tt>10</tt>, used for option 41 only)
See [[Template:Userbox]] for other default userbox settings.

===Restrictions===
*This template should be invoked from your [[Wikipedia:User page|user page]]. This template will declare user categories from the [[user namespace]] only.

===Example===
Placing the following [[Wiki markup|Wikitext]] on your [[Wikipedia:User page|user page]]:
:'''<tt><nowiki>{{uir</nowiki><br/><nowiki>|region=England</nowiki><br/><nowiki>|cres=Wikipedians in England</nowiki><br/><nowiki>|cnres=Wikipedians in the United Kingdom</nowiki><br/><nowiki>|color={{{color|#d5fffa}}}</nowiki><br/><nowiki>}}</nowiki></tt>'''
produces the following [[Wikipedia:Userboxes|userbox]]:
{{uir|region=England|cres=Wikipedians in England|ccit=English Wikipedians|cint=Wikipedians interested in England|cpro=WikiProject England|cnres=Wikipedians in the United Kingdom|cncit=British Wikipedians|cnint=Wikipedians interested in the United Kingdom|color={{{color|#d5fffa}}}|nocat=true}}{{clear}}
and declares your user page a member of:
*[[:Category:Wikipedians in England]]
*[[:Category:Wikipedians in the United Kingdom]]
[[Template:User in England]] invokes this template to produce the same effect.

===See also===
*This template invokes [[Template:Userbox]].
*This template is invoked by [[:Category:Multiuse regional user templates|regional user templates]].
*For help with this template, please contact the {{MG|1}}.
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[Category:Multiuse regional user templates| ]]
[[Category:Wikipedia metatemplates]]
}}</includeonly>
Anonymous user