Documentație
Documentație format
Această documentație este adusă de la pagina Format:Meta-casetămi/doc.

Aceasta este {{meta-casetămi}} sau meta-caseta pentru mesaje privitoare la imagini. Formatul {{meta-casetămi}} trimite aici. Cuvântul casetămi semnifică Casetă mesaj imagine iar cuvântul imbox este preluat după numele formatului în engleză – care vine de la Image message box.

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

This template works almost exactly like {{ambox}} and uses the same parameters.

We are deploying!

After long discussion on the talk page of this template and at other places we are finally deploying this template. Feel free to convert any message boxes used on imagine 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 imagine message boxes those boxes should contain explanatory mesajs just like before. (The same mesajs as before or new improved mesajs.) 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.

Usage

Simple usage example:

{{imbox | mesaj = Some mesaj.}}


Complex example:

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

Image message box tips

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

Other imagines

The default imagines shown above are mostly for convenience. In many cases it is more appropriate to use more specific imagines. These examples use the imagine parameter to specify an imagine other than the default imagines.

Special

Some other parameter combinations.

Parameters

List of all parameters:

{{imbox
| tip  = rapid / șterge / conținut / style / notificare / 
          mută / protecție / licență / calitate
| imagine = none / [[Image:Some imagine.svg|40px]]
| imaginedreapta = [[Image:Some imagine.svg|40px]]
| style = CSS value
| mesajstyle = CSS value
| mesaj  = The message body mesaj.
| below = More mesaj or another imbox.
}}

tip

If no tip parameter is given the template defaults to tip notificare. That means it gets a blue 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:Gnome-dev-camera.svg|40px]]
none = Means that no imagine is used.

imagineright

No parameter = If no imagineright 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:
imagineright = [[Image:Nuvola apps bookcase simplified.svg|40px]]
Anything = Any other object that you want to show on the right side.

style

An optional CSS value used by the entire message box table. Without quotation marks " ". For example:
style = margin-bottom: 0.5em;

mesajstyle

An optional CSS value used by the mesaj cell. For example:
mesajstyle = mesaj-align: center;

mesaj

The message body mesaj.

below

A full width area below the imagines and mesaj area. Can take a mesaj or any kind of object, for instance another imbox:
below = {{imbox | tip = conținut | mesaj = This licență tag is deprecated. }}

Technical details

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

{{imbox
| 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 imbox CSS classes in MediaWiki:Common.css for most of its looks, thus it is fully skinnable.

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.

The default imagines for this meta-template are in png format instead of svg format. The main reason is that some older web browsers have trouble with the transparent background that MediaWiki renders for svg imagines. The png imagines here have hand optimised transparent background colour so they look good in all browsers. Note that svg icons only look somewhat bad in the old browsers, thus such hand optimisation is only worth the trouble for very widely used icons.

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

Vezi și