Format:Meta-casetămd

De la Wikipedia, enciclopedia liberă
Jump to navigation Jump to search
Documentație
Documentație format
Această documentație este adusă de la pagina Format:Meta-casetămd/doc.

This is the {{tmbox}} or talk page message box meta-template.

It is used to build message box templates for talk pages, such as {{central}} etc. It offers several different colours, uses default imagines if no imagine parameter is given and it has some other features.

This template should normally not be used for WikiProject banners. They have special needs and thus have their own meta-templates. See the "See also" section below for links.

This template works similarly to {{ambox}} and uses the same parameters.

We are deploying!

After discussions on the talk page of this template and announcing it at several places for some time we are now deploying this template. Feel free to convert any message boxes used on talk pages to use this meta-template. If you find any tricky cases then list them on the talk page of this template and you'll get help.

When this template is used to build talk page message boxes those boxes should contain explanatory texts just like before. (The same texts as before or new improved texts.) If there are more specific imagines in the boxes or you know a better imagine, then use them instead of the default imagines shown here.

Suggested style standard

The tips of talkpage messageboxes follow the same naming convention as the boxes for all other namespaces, but the tip of any particular talkpage messagebox may not be as obvious as in other namespaces. When deciding on the tip to use for a talkpage messagebox, please consider the following guidelines:

  • rapid should only be used for rapid deletion templates.
  • șterge should only be used for templates relating to ongoing deletion discussions. Please do not use this tip just to get a red border for a messagebox.
  • conținut and style should be used for warnings and alerts. Use conținut (which has an orange border) for more important and immediate alerts, and style (yellow border) for less important warnings. Messageboxes of these tips should ideally be transitory: they should not be expected to remain on a talkpage indefinitely.
  • mută and protecțieion should only be used for messageboxes relating to mutăs and merges, and page protecțieion, respectively.
  • The notificare tip should be used for the majority of talkpage messageboxes; those that are intended to convey or summarise information. If a talkpage messagebox does not obviously fit into one of the other tips, it is probably a notificare tip.

Usage

Simple usage example:

{{tmbox | mesaj = Some text.}}


Complex example:

{{tmbox
| tip      = stil
| imagine     = [[Image:Emblem-question-yellow.svg|40px]]
| style     = width: 400px; 
| textstyle = color: red; font-weight: bold; font-style: italic;
| mesaj      = The message body text.
}}

Talk page message box tips

The following examples use different tip parameters but use no imagine parameters thus they use the default imagines for each tip.

Special

Some other parameter combinations.

Parameters

List of all parameters:

{{tmbox
| tip  = rapid / șterge / conținut / style / notificare / mută / protecțieion
| imagine = none / [[Image:Some imagine.svg|40px]]
| imaginedreapta = [[Image:Some imagine.svg|40px]]
| style = CSS values
| textstyle = CSS values
| mesaj  = The message body text. 
| small = {{{small|}}} / yes
| smallimagine = none / [[Image:Some imagine.svg|30px]]
| smallimaginedreapta = none / [[Image:Some imagine.svg|30px]]
| smallmesaj  = A shorter message body text.
}}

tip

If no tip parameter is given the template defaults to tip notificare. That means it gets a gray border.

imagine

No parameter = If no imagine parameter is given the template uses a default imagine. Which default imagine it uses depends on the tip parameter.
An imagine = Should be an imagine with usual wiki notation. 40px - 50px width are usually about right depending on the imagine height to width ratio. (But the message box can handle imagines of any size.) For example:
imagine = [[Image:Crystal package settings.png|40px]]
none = Means that no imagine is used.

imaginedreapta

No parameter = If no imaginedreapta parameter is given then no imagine is shown on the right side.
An imagine = Should be an imagine with usual wiki notation. 40px - 50px width are usually about right depending on the imagine height to width ratio. (But the message box can handle imagines of any size.) For example:
imaginedreapta = [[Image:Nuvola apps bookcase.png|40px]]
Anything = Any other object that you want to show on the right side.

style

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

mesaj

The message body text.

The small parameters

small

yes = Makes it a smaller right floating message box. This also makes the default imagines smaller. Note that any data fed to the smallimagine, smallimaginedreapta and smalltext parameters is only used if "small=yes". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

smallimagine

No parameter = If no smallimagine parameter is given then this template falls back to use the imagine parameter. If the imagine parameter also is empty then a small default imagine is used.
An imagine = Should be an imagine with usual wiki notation. 30px width is usually about right. For example:
smallimagine = [[Image:Crystal package settings.png|30px]]
none = Means that no imagine is used. This overrides any imagine fed to imagine, when "small=yes".

smallimaginedreapta

No parameter = If no smallimaginedreapta parameter is given then this template falls back to use the imaginedreapta parameter. If the imaginedreapta parameter also is empty then no imagine is shown on the right side.
An imagine = Should be an imagine with usual wiki notation. 30px width is usually about right. For example:
smallimaginedreapta = [[Image:Nuvola apps bookcase.png|30px]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side imagine is used. This overrides any imagine fed to imaginedreapta, when "small=yes".

smallmesaj

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details

If you need to use special characters in the text parameter then you need to escape them like this:

{{tmbox
| mesaj  = <div>
Equal sign = and a start and end brace { } work fine as they are. 
But here is a pipe {{!}} and two end braces <nowiki>}}</nowiki>. 
And now a pipe and end braces <nowiki>|}}</nowiki>.
</div>
}}

This template uses the tmbox CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

This template calls {{tmbox/core}} which holds most of the code for {{tmbox}}, while {{tmbox}} itself does parameter preprocessing.

Internally this meta-template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta-templates since wiki markup has several drawbacks. For instance it makes it harder to use parser functions and special characters in parameters.

For more technical details see the talk page. Since this template works almost exactly like {{ambox}}, {{imbox}}, {{cmbox}} and {{ombox}} their talk pages and related pages might also contain more details.

Other pages:

WikiProject banners:

Vezi și