Importer, Bürokraten, Moderatoren (CommentStreams), Strukturierte-Diskussionen-Bots, Oberflächenadministratoren, Push-Abonnementverwalter, Oversighter, Administratoren, Kampagnenbearbeiter (Hochladeassistent)
855
Bearbeitungen
imported>Davidgothberg (Changed section "Suggested style standard" to "We are deploying!" with advice about template conversion.) |
K (86 Versionen von wikivoyage:Vorlage:Cmbox/Doku importiert) |
||
| (59 dazwischenliegende Versionen von 31 Benutzern werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
{{ | {{Bitte um Übersetzung|en}} | ||
{{Dokumentation Unterseite}} | |||
{{high-use}} | |||
<!-- Kategorien bitte an das Ende der Seite, Interwiki-Links bitte nach Wikidata --> | |||
{{mbox templates}} | |||
This is the {{tl|cmbox}} or '''category message box''' meta-template. | This is the {{tl|cmbox}} or '''category message box''' meta-template. | ||
It is used to | It is used to build message box templates for category pages, such as {{tl|CatDiffuse}} etc. It offers several different colours, uses default images if no image parameter is given and it has some other features. | ||
This template works almost exactly like {{tl|ambox}} and uses the same parameters. | This template works almost exactly like {{tl|ambox}} and uses the same parameters. | ||
=== We are deploying! === | === We are deploying! === | ||
After long discussion on the [[Template talk:Cmbox|talk page]] of this template and at other places we are finally deploying this template. Feel free to convert any message boxes used on category 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. | After long discussion on the [[Template talk:Cmbox|talk page]] of this template and at other places we are finally deploying this template. Feel free to convert any message boxes used on category 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. | ||
| Zeile 16: | Zeile 17: | ||
=== Usage === | === Usage === | ||
Simple usage example: | Simple usage example: | ||
| Zeile 24: | Zeile 24: | ||
{{cmbox | text = Some text.}} | {{cmbox | text = Some text.}} | ||
Complex example: | Complex example: | ||
| Zeile 30: | Zeile 29: | ||
<pre> | <pre> | ||
{{cmbox | {{cmbox | ||
| type | | type = style | ||
| image = [[Image:Emblem-question-yellow.svg| | | image = [[Image:Emblem-question-yellow.svg|40px]] | ||
| style = width: 400px; color: red; font-weight: bold; font-style: italic; | | style = width: 400px; | ||
| text | | textstyle = color: red; font-weight: bold; font-style: italic; | ||
| text = The message body text. | |||
}} | }} | ||
</pre> | </pre> | ||
{{cmbox | {{cmbox | ||
| type | | type = style | ||
| image = [[Image:Emblem-question-yellow.svg| | | image = [[Image:Emblem-question-yellow.svg|40px]] | ||
| style = width: 400px; color: red; font-weight: bold; font-style: italic; | | style = width: 400px; | ||
| text | | textstyle = color: red; font-weight: bold; font-style: italic; | ||
| text = The message body text. | |||
}} | }} | ||
=== Category message box types === | === Category message box types === | ||
The following examples use different '''type''' parameters but use no image parameters thus they use the default images for each type. | The following examples use different '''type''' parameters but use no image parameters thus they use the default images for each type. | ||
| Zeile 58: | Zeile 58: | ||
{{cmbox | {{cmbox | ||
| type = content | | type = content | ||
| text = type=<u>content</u> – Major warnings and problems, such as {{tl| | | text = type=<u>content</u> – Major warnings and problems, such as {{tl|Categorisation of people disputed}}. | ||
}} | }} | ||
{{cmbox | {{cmbox | ||
| Zeile 64: | Zeile 64: | ||
| text = type=<u>style</u> – Minor warnings and problems, such as {{tl|popcat}}. | | text = type=<u>style</u> – Minor warnings and problems, such as {{tl|popcat}}. | ||
}} | }} | ||
<!--{{cmbox | |||
| type = collaboration | |||
| text = type=<u>collaboration</u> – Aufruf zur Mitarbeit. | |||
}}--> | |||
{{cmbox | {{cmbox | ||
| type = notice | | type = notice | ||
| Zeile 70: | Zeile 74: | ||
{{cmbox | {{cmbox | ||
| type = move | | type = move | ||
| text = type=<u>move</u> – Move, merge and split messages and proposals, such as | | text = type=<u>move</u> – Move, merge and split messages and proposals, such as {{tl|categoryredirect}}. | ||
}} | }} | ||
{{cmbox | {{cmbox | ||
| Zeile 76: | Zeile 80: | ||
| text = type=<u>protection</u> – Protection templates such as {{tl|pp-semi-protected}} when shown on a category page. | | text = type=<u>protection</u> – Protection templates such as {{tl|pp-semi-protected}} when shown on a category page. | ||
}} | }} | ||
<!--{{cmbox | |||
| type = inuse | |||
| text = type=<u>inuse</u> – '''Hinweis:''' Dieser Artikel wird gerade von jemand anderem in größerem Umfang bearbeitet. Um Überschneidungen zu vermeiden, warte bitte, bis dieser Text wieder entfernt und der Artikel freigegeben ist. Sollte dieser Hinweis älter als 24 Stunden sein, kannst du ihn entfernen und den Artikel bearbeiten.. | |||
}}--> | |||
=== Other images === | |||
The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the '''image''' parameter to specify an image other than the default images. | The default images shown above are mostly for convenience. In many cases it is more appropriate to use more specific images. These examples use the '''image''' parameter to specify an image other than the default images. | ||
{{cmbox | {{cmbox | ||
| type = | | type = style | ||
| image = [[Image:Sub-arrows.svg|40px]] | | image = [[Image:Sub-arrows.svg|40px]] | ||
| text = type = | | text = type = style <br> image = <nowiki>[[Image:Sub-arrows.svg|40px]]</nowiki> <br> This image is used for {{tl|verylarge}} and {{tl|CatDiffuse}}. | ||
}} | }} | ||
{{cmbox | {{cmbox | ||
| Zeile 92: | Zeile 99: | ||
}} | }} | ||
=== Special === | |||
Some other parameter combinations. | Some other parameter combinations. | ||
| Zeile 118: | Zeile 124: | ||
=== Parameters === | === Parameters === | ||
List of all parameters: | List of all parameters: | ||
| Zeile 124: | Zeile 129: | ||
{{cmbox | {{cmbox | ||
| type = speedy / delete / content / style / notice / move / protection | | type = speedy / delete / content / style / notice / move / protection | ||
| image = none | | image = none / [[Image:Some image.svg|40px]] | ||
| imageright = [[Image:Some image.svg|40px]] | | imageright = [[Image:Some image.svg|40px]] | ||
| style = CSS | | class = A custom CSS class to apply to the box | ||
| style = CSS values | |||
| textstyle = CSS values | |||
| text = The message body text. | | text = The message body text. | ||
}} | }} | ||
</pre> | </pre> | ||
| Zeile 137: | Zeile 143: | ||
'''image''' | '''image''' | ||
:'''No parameter''' = If no '''image''' parameter is given the template uses a default image. Which default image it uses depends on the '''type''' parameter. | :'''No parameter''' = If no '''image''' parameter is given the template uses a default image. Which default image it uses depends on the '''type''' parameter. | ||
:'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. ( | :'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (But the message box can handle images of any size.) For example: | ||
::<code><nowiki>image = [[Image:Sub-arrows.svg|40px]]</nowiki></code> | ::<code><nowiki>image = [[Image:Sub-arrows.svg|40px]]</nowiki></code> | ||
:'''none''' = Means that no image is used. | :'''none''' = Means that no image is used. | ||
| Zeile 143: | Zeile 149: | ||
'''imageright''' | '''imageright''' | ||
:'''No parameter''' = If no '''imageright''' parameter is given then no image is shown on the right side. | :'''No parameter''' = If no '''imageright''' parameter is given then no image is shown on the right side. | ||
:'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (But | :'''An image''' = Should be an image with usual wiki notation. 40px - 50px width are usually about right depending on the image height to width ratio. (But the message box can handle images of any size.) For example: | ||
::<code><nowiki>imageright = [[Image:Nuvola apps bookcase.png|40px]]</nowiki></code> | ::<code><nowiki>imageright = [[Image:Nuvola apps bookcase.png|40px]]</nowiki></code> | ||
:'''Anything''' = Any other object that you want to show on the right side. | :'''Anything''' = Any other object that you want to show on the right side. | ||
'''style''' | '''style''' | ||
:An optional [[Cascading Style Sheets|CSS]] value used by the entire | :An optional [[Cascading Style Sheets|CSS]] value used by the entire message box table. Without quotation marks <code>" "</code>. For example: | ||
::<code>style = margin-bottom: 0.5em;</code> | ::<code>style = margin-bottom: 0.5em;</code> | ||
'''textstyle''' | '''textstyle''' | ||
:An optional [[Cascading Style Sheets|CSS]] value used by the text cell. For example: | :An optional [[Cascading Style Sheets|CSS]] value used by the text cell. For example: | ||
::<code>textstyle = text-align: center;</code> | ::<code>textstyle = text-align: center;</code> | ||
'''text''' | |||
:The message body text. | |||
=== Technical details === | === Technical details === | ||
If you need to use special characters in the text parameter then you need to escape them like this: | If you need to use special characters in the text parameter then you need to escape them like this: | ||
| Zeile 182: | Zeile 185: | ||
}} | }} | ||
This template uses the cmbox 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 [[m:Help:ParserFunctions|parser functions]] and special characters in parameters. | 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 [[m:Help:ParserFunctions|parser functions]] and special characters in parameters. | ||
For more technical details see the [[ | The default images 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 images. The png images 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 [[Template talk:Cmbox|talk page]]. Since this template works almost exactly like the other mboxes their talk pages and related pages might also contain more details, see the "See also" section below. | |||
=== See also === | === See also === | ||
{{Mbox templates see also}} | |||
{{mbox template family}} | |||
<includeonly> | <includeonly> | ||
<!-- | <!-- Kategorien bitte hier, Interwiki-Links bitte nach Wikidata --> | ||
[[ | [[Kategorie:Vorlagen:Infoboxen]] | ||
</includeonly> | </includeonly> | ||