Template:Olpcboxmacro: Difference between revisions

From OLPC
Jump to navigation Jump to search
(macro for OBXs)
 
m (tweak)
Line 22: Line 22:
<noinclude>{{olpcboxbottom}}</noinclude><noinclude>
<noinclude>{{olpcboxbottom}}</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 non-user page.
'''Source:''' [http://meta.wikimedia.org/wiki/Template:Babel Wikipedia Template:Babel]
'''Source:''' [http://meta.wikimedia.org/wiki/Template:Babel Wikipedia Template:Babel]


Line 37: Line 37:


{{olpcboxtop}}
{{olpcboxtop}}
{{olpcboxmacro
{{olpcboxmacro|source|source{{!}}http://code.google.com/p/facilhtml{{!}}SVN|source{{!}}http://sugar.abisource.com/{{!}}RPM}}
|source
|source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
|source{{!}}http://sugar.abisource.com/{{!}}RPM}}
{{olpcboxbottom}}
{{olpcboxbottom}}
{{tl|olpcboxtop}} # Somewhere before...
{{tl|olpcboxtop}} # Somewhere before...
<nowiki>{{</nowiki> olpcboxmacro |source|source{{!}}http://code.google.com/p/facilhtml{{!}}SVN|source{{!}}http://sugar.abisource.com/{{!}}RPM<nowiki>}}</nowiki>
<nowiki>{{</nowiki> olpcboxmacro
|source
|source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
|source{{!}}http://sugar.abisource.com/{{!}}RPM<nowiki>}}</nowiki>
{{tl|olpcboxbottom}} # Somewhere later...
{{tl|olpcboxbottom}} # Somewhere later...
{{-}}
{{-}}
{{olpcboxtop}}
{{olpcboxtop}}
{{olpcboxmacro | toptext = [[:Category:Activity|Activity sources]]
{{olpcboxmacro
| toptext = [[:Category:Activity|Activity sources]]
|source|source{{!}}http://code.google.com/p/facilhtml{{!}}SVN|source{{!}}http://sugar.abisource.com/{{!}}RPM}}
|source
|source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
|source{{!}}http://sugar.abisource.com/{{!}}RPM}}
{{olpcboxbottom}}
{{olpcboxbottom}}
{{tl|olpcboxtop}} # Somewhere before...
{{tl|olpcboxtop}} # Somewhere before...
<nowiki>{{olpcboxmacro | toptext = [[:Category:Activity|Activity sources]]
<nowiki>{{olpcboxmacro
| toptext = [[:Category:Activity|Activity sources]]
|source|source{{!}}http://code.google.com/p/facilhtml{{!}}SVN|source{{!}}http://sugar.abisource.com/{{!}}RPM}}</nowiki>
|source
|source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
|source{{!}}http://sugar.abisource.com/{{!}}RPM}}</nowiki>
{{tl|olpcboxbottom}} # Somewhere later...
{{tl|olpcboxbottom}} # Somewhere later...
{{-}}
{{-}}
Line 58: Line 70:
<nowiki>{|
<nowiki>{|
|-
|-
{{olpcboxmacro
{{olpcboxmacro | toptext = [[:Category:Activity|Activity sources]]|source|source{{!}}http://code.google.com/p/facilhtml{{!}}SVN|source{{!}}http://sugar.abisource.com/{{!}}RPM}}
| toptext = [[:Category:Activity|Activity sources]]
|source
|source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
|source{{!}}http://sugar.abisource.com/{{!}}RPM}}
|}</nowiki>
|}</nowiki>
{|
{|
|-
|-
{{olpcboxmacro
{{olpcboxmacro | toptext = [[:Category:Activity|Activity sources]]|source|source{{!}}http://code.google.com/p/facilhtml{{!}}SVN|source{{!}}http://sugar.abisource.com/{{!}}RPM}}
| toptext = [[:Category:Activity|Activity sources]]
|source|source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
|source{{!}}http://sugar.abisource.com/{{!}}RPM}}
|}
|}


{{-}}
{{-}}
<nowiki>{{olpcboxmacro
<nowiki>{{olpcboxmacro |source|source{{!}}http://code.google.com/p/facilhtml{{!}}SVN|source{{!}}http://sugar.abisource.com/{{!}}RPM}}</nowiki>
|source
{{olpcboxmacro |source|source{{!}}http://code.google.com/p/facilhtml{{!}}SVN|source{{!}}http://sugar.abisource.com/{{!}}RPM}}
|source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
|source{{!}}http://sugar.abisource.com/{{!}}RPM}}</nowiki>
{{olpcboxmacro
|source
|source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
|source{{!}}http://sugar.abisource.com/{{!}}RPM}}




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

Revision as of 20:35, 5 July 2007

Template:Userboxmacro
Allows 1 to 20 boxes that can be used to describe or show some attributes associated to a specific non-user page.

Source: Wikipedia Template:Babel

Usage

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

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

Sample

{{OBX source|code.google.com|SVN

}}{{OBX source|http://sugar.abisource.com/%7CRPM}}

{{olpcboxtop}}                # Somewhere before...
{{ olpcboxmacro 
|source
|source|code.google.com|SVN
|source|http://sugar.abisource.com/%7CRPM}}
{{olpcboxbottom}}             # Somewhere later...


{{OBX source|code.google.com|SVN

}}{{OBX source|http://sugar.abisource.com/%7CRPM}}

{{olpcboxtop}}                # Somewhere before...
{{olpcboxmacro
  | toptext = [[:Category:Activity|Activity sources]]
  |source
  |source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
  |source{{!}}http://sugar.abisource.com/{{!}}RPM}}
{{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.

 {|
 |-
 {{olpcboxmacro
   | toptext = [[:Category:Activity|Activity sources]]
   |source
   |source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
   |source{{!}}http://sugar.abisource.com/{{!}}RPM}}
 |}
{{OBX source|code.google.com|SVN

}}{{OBX source|http://sugar.abisource.com/%7CRPM}}


{{olpcboxmacro 
 |source
 |source{{!}}[http://code.google.com/p/facilhtml code.google.com]{{!}}SVN
 |source{{!}}http://sugar.abisource.com/{{!}}RPM}}
GIT sources in dev.laptop.org

{{OBX source|code.google.com|SVN

}}{{OBX source|http://sugar.abisource.com/%7CRPM}}