Template:Userboxmacro: Difference between revisions

From OLPC
Jump to navigation Jump to search
m (macro of sorts to avoid verbosity in OBXs)
 
m (remove redundant Category:Template)
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
<noinclude>{{olpcboxtop}}</noinclude>
<noinclude>{{olpcboxtop}}{{User time zone|UTC|world}}</noinclude>{{#if:{{{toptext|}}}|{{olpcboxbreak|toptext={{{toptext}}} }} }}<!--
{{#if:{{{header}}}|{{olpcboxbreak|title={{{header}}}}}}}
-->{{#if:{{{1|}}}|{{User {{{1}}}}}
{{#if:{{{1|}}}|{{User {{{1}}}}}
}}{{#if:{{{2|}}}|{{User {{{2}}}}}
}}{{#if:{{{2|}}}|{{User {{{2}}}}}
}}{{#if:{{{3|}}}|{{User {{{3}}}}}
}}{{#if:{{{3|}}}|{{User {{{3}}}}}
Line 21: Line 20:
}}{{#if:{{{19|}}}|{{User {{{19}}}}}
}}{{#if:{{{19|}}}|{{User {{{19}}}}}
}}{{#if:{{{20|}}}|{{User {{{20}}}}}}}
}}{{#if:{{{20|}}}|{{User {{{20}}}}}}}
<noinclude>{{olpcboxbottom}}</noinclude>
<noinclude>{{olpcboxbottom}}</noinclude><noinclude>
<noinclude>


; [[Template:Userboxmacro]] : Allows 1 to 20 boxes that can be used to describe or show some attributes associated to a specific user.
; [[Template:Userboxmacro]] : Allows 1 to 20 boxes that can be used to describe or show some attributes associated to a specific user.
Line 32: Line 30:
{{tl|olpcboxtop}} # Somewhere before...
{{tl|olpcboxtop}} # Somewhere before...
<nowiki>{{</nowiki> userboxmacro | ''<box1>'' | ''<box2>'' | ''<box3>'' | ''<box-n <= 20>''
<nowiki>{{</nowiki> userboxmacro | ''<box1>'' | ''<box2>'' | ''<box3>'' | ''<box-n <= 20>''
| ''header'' = &lt;!-- OPTIONAL &mdash; default: ''none'' --&gt;
| ''toptext'' = &lt;!-- OPTIONAL &mdash; default: ''none'' --&gt;
<nowiki>}}</nowiki>
<nowiki>}}</nowiki>
{{tl|olpcboxtop}} # Somewhere later...
{{tl|olpcboxbottom}} # Somewhere later...


== Sample ==
== Sample ==


{{olpcboxtop}}
{{userboxmacro|en|fr|es}}
{{olpcboxbottom}}
{{tl|olpcboxtop}} # Somewhere before...
{{tl|olpcboxtop}} # Somewhere before...
<nowiki>{{</nowiki> userboxmacro |en|fr|de|es|ru|leet<nowiki>}}</nowiki>
<nowiki>{{</nowiki> userboxmacro |en|fr|es<nowiki>}}</nowiki>
{{tl|olpcboxtop}} # Somewhere later...
{{tl|olpcboxbottom}} # Somewhere later...
{{olpcboxtop}}
{{-}}
{{userboxmacro |en|fr|de|es|ru|leet}}
{{olpcboxtop}}
{{olpcboxtop}}
{{userboxmacro | toptext = [[:Category:User languages|Languages]]
|en|fr|es}}
{{olpcboxbottom}}
{{tl|olpcboxtop}} # Somewhere before...
<nowiki>{{userboxmacro | toptext = [[:Category:User languages|Languages]]
|en|fr|es}}</nowiki>
{{tl|olpcboxbottom}} # Somewhere later...
{{-}}

== Standalone ==

If used ''standalone'' '''and''' with a ''toptext'', it needs to be enclosed in a table. If no ''toptext'' is used, resorting to a table is also recommended to avoid messy layouts.
<nowiki>{|
|-
{{userboxmacro | toptext = [[:Category:User languages|Languages]]|en|fr|es|ru|zh}}
|}</nowiki>
{|
|-
{{userboxmacro | toptext = [[:Category:User languages|Languages]]|en|fr|es|ru|zh}}
|}

{{-}}
<nowiki>{{userboxmacro |en|fr|es|ru|zh}}</nowiki>
{{userboxmacro |en|fr|es|ru|zh}}


{{tl|olpcboxtop}} # Somewhere before...
<nowiki>{{</nowiki> userboxmacro |en|fr|de|es|ru|leet
| header = <nowiki>[[:Category:User languages|Languages]]</nowiki>
<nowiki>}}</nowiki>
{{tl|olpcboxtop}} # Somewhere later...
{{olpcboxtop}}
{{userboxmacro |en|fr|de|es|ru|leet
| header = [[:Category:User languages|Languages]]
<nowiki>}}</nowiki>
{{olpcboxtop}}


[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
[[Category:Templates using ParserFunctions|{{PAGENAME}}]]
[[Category:Userbox templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Latest revision as of 02:53, 19 November 2008

Nuvola apps kworldclock.png This user's time zone is UTC.
Template:Userboxmacro
Allows 1 to 20 boxes that can be used to describe or show some attributes associated to a specific user.

Source: Wikipedia Template:Babel

Usage

Intended to be used enclosed between {{olpcboxtop}} and {{olpcboxbottom}}.

{{olpcboxtop}}                # Somewhere before...
{{ userboxmacro | <box1> | <box2> | <box3> | <box-n <= 20>
 | toptext  = <!-- OPTIONAL — default: none -->
 }}
{{olpcboxbottom}}             # Somewhere later...

Sample

en This user is a native speaker of English.
fr Cet utilisateur a pour langue maternelle le français.
es Castellano es la lengua materna de este usuario
{{olpcboxtop}}                # Somewhere before...
{{ userboxmacro |en|fr|es}}
{{olpcboxbottom}}             # Somewhere later...


en This user is a native speaker of English.
fr Cet utilisateur a pour langue maternelle le français.
es Castellano es la lengua materna de este usuario
{{olpcboxtop}}                # Somewhere before...
{{userboxmacro | toptext = [[:Category:User languages|Languages]]
  |en|fr|es}}
{{olpcboxbottom}}             # Somewhere later...


Standalone

If used standalone and with a toptext, it needs to be enclosed in a table. If no toptext is used, resorting to a table is also recommended to avoid messy layouts.

 {|
 |-
 {{userboxmacro | toptext = [[:Category:User languages|Languages]]|en|fr|es|ru|zh}}
 |}
en This user is a native speaker of English.
fr Cet utilisateur a pour langue maternelle le français.
es Castellano es la lengua materna de este usuario
ru Русский языкродной для этого участника.
zh 該使用者的母語中文
该用户的母語中文


{{userboxmacro |en|fr|es|ru|zh}}
en This user is a native speaker of English.
fr Cet utilisateur a pour langue maternelle le français.
es Castellano es la lengua materna de este usuario
ru Русский языкродной для этого участника.
zh 該使用者的母語中文
该用户的母語中文