Difference between revisions of "Template:Ribbon"
From Geohashing
imported>Relet m |
imported>Relet (now defaults to "This user" if user parameter is not given.) |
||
Line 2: | Line 2: | ||
<tr> | <tr> | ||
<td style="border-width: 5px; border-spacing: 2px; border-style: hidden hidden hidden solid; border-color: {{{color}}}; border-collapse: separate;"><div>[[Image:{{{icon}}}|44px]]</div></td> | <td style="border-width: 5px; border-spacing: 2px; border-style: hidden hidden hidden solid; border-color: {{{color}}}; border-collapse: separate;"><div>[[Image:{{{icon}}}|44px]]</div></td> | ||
− | <td style="padding: 0px 12px 0px 10px;"> '''{{{user}}} earned the {{{achievement}}}''' | + | <td style="padding: 0px 12px 0px 10px;"> '''{{#if:{{{user|}}}|{{{user}}}|This user}} earned the {{{achievement}}}''' |
:by {{{action}}}.</td> | :by {{{action}}}.</td> | ||
{{#if:{{{image|}}}|<td><div style="width: 52px;">[[Image:{{{image}}}|44px]]</div></td>|}} | {{#if:{{{image|}}}|<td><div style="width: 52px;">[[Image:{{{image}}}|44px]]</div></td>|}} | ||
Line 11: | Line 11: | ||
*icon = ''The icon image to display in the ribbon.'' | *icon = ''The icon image to display in the ribbon.'' | ||
*color = ''The border colour of the ribbon.'' | *color = ''The border colour of the ribbon.'' | ||
− | |||
*achievement = ''Achievement or consolation prize name.'' | *achievement = ''Achievement or consolation prize name.'' | ||
*action = ''A free form description of the achieved feature. "reaching the x,y hash..."'' | *action = ''A free form description of the achieved feature. "reaching the x,y hash..."'' | ||
*category = ''The category name where users having gained this achievement will be put.'' | *category = ''The category name where users having gained this achievement will be put.'' | ||
Optional Parameters: | Optional Parameters: | ||
+ | *user = ''The user name to be displayed in the ribbon.'' (Defaults to "This user". use <nowiki>{{{name|}}}</nowiki> as value to pass through the possibly blank ''name'' parameter as user name) | ||
*image = ''The usual photographic proof'' (Note: you may want to use the value <nowiki>{{{image|}}}</nowiki> to pass through the possibly blank image parameter from your own ribbon template.) | *image = ''The usual photographic proof'' (Note: you may want to use the value <nowiki>{{{image|}}}</nowiki> to pass through the possibly blank image parameter from your own ribbon template.) | ||
Revision as of 11:00, 14 February 2009
This template displays a generic ribbon, which can be customized using the following parameters. It can be used to simplify existing ribbon pages, and to create new ribbons more easily. It also helps us to maintain a common layout for all ribbons.
- icon = The icon image to display in the ribbon.
- color = The border colour of the ribbon.
- achievement = Achievement or consolation prize name.
- action = A free form description of the achieved feature. "reaching the x,y hash..."
- category = The category name where users having gained this achievement will be put.
Optional Parameters:
- user = The user name to be displayed in the ribbon. (Defaults to "This user". use {{{name|}}} as value to pass through the possibly blank name parameter as user name)
- image = The usual photographic proof (Note: you may want to use the value {{{image|}}} to pass through the possibly blank image parameter from your own ribbon template.)
Example
{{Ribbon |icon = Landgeohash.png |color = darkgreen |user = Mr. Stickman |achievement = [[Lost in Thought Achievement]] |action = hurting himself while concentrating on the display of his GPS |category = Lost in Thought Achievement }}
will display as:
Mr. Stickman earned the Lost in Thought Achievement
|