Template talk:Wikibox
From Wikipedia, the free encyclopedia
This template creates Wiki-style information boxes using custom pictures and text. It can also customize the table colors.
{{wikibox | type= | width= | background= | border= | bordersize= | image= | imagesize= | image2= | imagesize2= | textalign= | title= | text= | subtext= }} |
[edit] Parameters
- Type. The type value wil specify a preformatted layout to the Wikibox (border, background, alignment, etc). In order to change the background or border, you must specify the type custom and put in values within the template. The default type is messagebox. See below for examples of the defined Wikibox types.
- Width. The width parameter specifies the width of the Wikibox and can be in percentage or pixel format (80%, or 100px respectively). The default width is 80%.
- Background. This is the background color in hexadecimal format (#FFFFFF). This is only usable when the custom type is specified. There is no default value.
- Border. This is the border color in hexadecimal format (#FFFFFF). This is only usable when the custom type is specified. There is no default value.
- Border Size. This is the size, in pixels, of the specified border. This is only usable when the custom type is specified. The default value is 1px.
- Image. This is the image to be displayed to the left of the template. The image filename does not contain the Image: tag, but is rather just the image name, as in My Image.png. The default image is Image:Information.svg.
- Image Size. This is the size of the image to be displayed, in pixels. The default image size is 50px.
- Image2. This is the image to be displayed to the right of the template. The image filename does not contain the Image: tag, but is rather just the image name, as in My Image.png. Their is not default image.
- Image Size2. This is the size of the second image to be displayed, in pixels. The default image size is 50px.
- Text Align. This is the alignment of all of the text in the Wikibox. The default is left-align, but center and right can also be specified.
- Title. This text is automatically bolded and at the top of the Wikibox. Any sort of Wiki-link can go here.
- Text. This text is plain text and can use Wiki markup to be modified. Any sort of Wiki-link can go here.
- Subtext. This text is automatically small and at the bottom of the Wikibox. Any sort of Wiki-link can go here.
Type | Display |
---|---|
default (no type/image) | |
messagebox | |
merge | |
cleanup | |
standard-talk | |
custom |
[edit] Examples
[edit] Example 1 - Re-creation
Let's look at how to use Wikibox by recreating some of the template boxes that are commonly used. We'll start with {{current}}, which looks like:
This article documents a current event. Information may change rapidly as the event progresses. |
Looking at this box, we see it uses messagebox for its type, and the box is wrapped, so the width is auto. There is a different picture than the default, Current event marker.svg. We also notice a larger than normal picture, when looking at the source it is 50px, so we will specify that for the imagesize. Our code ends up looking like:
{{wikibox | width=auto | image=Current event marker.svg | title=This article documents a [[Portal:Current events|current event]]. | subtext=Information may change rapidly as the event progresses. }}
And it produces this Wikibox:
[edit] Example 2 - A Custom Wikibox
Here's a very custom messagebox that was implemented by the WP:BLP project. The tag is {{BLPC}}, and it looks like:
When examining this box, we notice that the background is white and the width is indicative of messagebox, so we'll use the custom type. We notice the custom image, Crystal Clear action editdelete.png, and it's expanded size of 50px. We also notice the larger border, at 2px, and the color at #C00000. There is also no title or subtext, just centered formatted text, which is easily copied into the Wikibox template. Our code for this customized box ends up looking like:
{{wikibox | type=custom | image=Crystal Clear action editdelete.png | border=#C00000 | bordersize=2px | textalign=center | text=Per Wikipedia's '''[[Wikipedia:Biographies of living persons|Biographies of living persons]]''' policy, this article about or related to a living person may '''require immediate attention'''. Questionable unsourced material about living persons '''should be deleted'''. Anyone can do this. <span style="font-size: 90%"> Please remove this tag when this issue is resolved to remove this article from the [[:Category:Disputed biographies of living persons|BLP Check category]]. Consider leaving a note on the [[Wikipedia:Biographies of living persons/Noticeboard|BLP noticeboard]]. }}
And it produces this Wikibox:
[edit] Example 3 - A Use Case
The finale example is a demonstration on why someone might want to use a Wikibox. One good commonly used, but arguably boring template is the {{talkarchive}} template, which looks like this:
Seeing as how this is a template someone may use on their own talk pages, perhaps they would like to edit it to their particular style. They first recreate it, using the custom type:
{{wikibox | type=custom | background=#f8eaba | border=#c0c090 | image=Replacement filing cabinet.svg | text=This is an '''[[Wikipedia:How to archive a talk page|archive]]''' of past discussions. '''Do not edit the contents of this page.''' If you wish to start a new discussion or revive an old one, please do so on the <span class="plainlinks">[{{{1|{{FULLURL:{{TALKSPACE}}:{{BASEPAGENAME}}}}}}} current talk page]</span>. }}
The user decides that this appearance is not nearly threatening enough, so they edit the colors and border size:
| background=#CCCCCC | border=#CC0033 | bordersize=2px
and replace the picture with one more appropriate for their tone, moving the regular picture to the right:
| image=Process-stop.svg | imagesize=75px | image2=Replacement filing cabinet.svg