Format:Meta-casetămi
{{{text}}} |
Documentație format
Această documentație este adusă de la pagina Format:Meta-casetămi/doc.
|
[lectură]
[modificare]
[istoric] |
Acest format este folosit în 9.100+ pagini. Modificările aduse acestuia vor fi vizibile imediat. Pentru teste folosiți subpaginile: /cutie cu nisip sau /test, de asemenea sfătuiți-vă cu alți utilizatori despre eventualele modificări pe pagina de discuție înainte de a le implementa. |
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.}}
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. }}
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.
tip=rapid – Speedy deletion templates such as {{isd}}. |
tip=șterge – Deletion templates such as {{ifd}}. |
tip=conținut – Major warnings and problems, such as {{non-free reduce}}. |
tip=style – Minor warnings and problems, such as {{cleanup-imagine}}. |
tip=notificare – Notices and messages of any kind, both permanent and temporary. |
tip=mută – Move and rename messages and proposals, such as {{rename media}}. |
tip=protecție – Protection templates such as {{pp-protected}} when shown on an imagine page. |
tip=licență – License templates such as {{Cc-by-sa-4.0}}. |
tip=calitate – Featured imagine templates such as {{FeaturedPicture}}. |
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.
tip = style imagine = [[Image:Gnome-dev-camera.svg|42px]] This imagine is used for {{cleanup-imagine}}. |
tip = mută imagine = [[Image:To Commons.svg|52px]] This imagine is used for {{copy to Wikimedia Commons}}. |
tip = licență imagine = [[Image:Heckert GNU white.svg|48px]] This imagine is used for the GFDL licență templates such as {{GFDL}}. |
Special
Some other parameter combinations.
No tip and no imagine given (default) |
No tip and imagine=none – No imagine is used and the mesaj uses the whole message box area. |
|
tip = licență imagine = [[Image:Imbox licență.svg|40px]] <br> [[Image:Ambox warning yellow.svg|40px]] imagineright = [[Image:Shuttle.svg|30px]] |
|
This file is in the public domain because it was created by NASA.
Note that use of NASA logos, insignia and emblems are restricted per US law. |
tip = licență imagine = [[Image:Imbox licență.svg|40px]] below = {{imbox | tip = conținut | mesaj = '''This licență tag is deprecated!''' }} |
|||
|
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> }}
Equal sign = and a start and end brace { } work fine as they are. But here is a pipe | and two end braces }}. And now a pipe and end braces |}}. |
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
|