Vorlage:Cmbox/Doku: Unterschied zwischen den Versionen

K
86 Versionen von wikivoyage:Vorlage:Cmbox/Doku importiert
imported>Edokter
K (86 Versionen von wikivoyage:Vorlage:Cmbox/Doku importiert)
 
(39 dazwischenliegende Versionen von 25 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
{{Documentation subpage}}
{{Bitte um Übersetzung|en}}
<includeonly>{{intricate template}}</includeonly>
{{Dokumentation Unterseite}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{high-use}}
 
<!-- Kategorien bitte an das Ende der Seite, Interwiki-Links bitte nach Wikidata -->
{{mbox templates}}
{{mbox templates}}
This is the {{tl|cmbox}} or '''category message box''' meta-template.
This is the {{tl|cmbox}} or '''category message box''' meta-template.
Zeile 10: Zeile 12:


=== 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 47: Zeile 46:


=== 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 60: Zeile 58:
{{cmbox
{{cmbox
| type = content
| type = content
| text = type=<u>content</u> – Major warnings and problems, such as {{tl|CategorisationDisputedPeople}}.
| text = type=<u>content</u> – Major warnings and problems, such as {{tl|Categorisation of people disputed}}.
}}
}}
{{cmbox
{{cmbox
Zeile 66: 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 78: 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 ===
=== 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.


Zeile 95: Zeile 100:


=== Special ===
=== Special ===
Some other parameter combinations.
Some other parameter combinations.


Zeile 120: Zeile 124:


=== Parameters ===
=== Parameters ===
List of all parameters:
List of all parameters:


Zeile 128: Zeile 131:
| image = none / [[Image:Some image.svg|40px]]
| image = none / [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.svg|40px]]
| style = CSS value
| class = A custom CSS class to apply to the box
| textstyle = CSS value
| style = CSS values
| textstyle = CSS values
| text  = The message body text.  
| text  = The message body text.  
}}
}}
Zeile 139: 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. (Images over 52 pixels width will cause padding problems.) For example:  
:'''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 145: 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 on this side the message box can handle images of any size.) For example:  
:'''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.
Zeile 161: Zeile 165:


=== 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 181: Zeile 184:
</div>
</div>
}}
}}


This template uses the cmbox CSS classes in [[MediaWiki:Common.css]] for most of its looks, thus it is fully skinnable.
This template uses the cmbox CSS classes in [[MediaWiki:Common.css]] for most of its looks, thus it is fully skinnable.
Zeile 189: Zeile 191:
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.
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 {{tl|ambox}} and {{tl|imbox}} their talk pages and related pages might also contain more details.
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}}


There are several meta-templates in the mbox family:
{{mbox template family}}
* {{tl|ambox}} – For article message boxes.
* {{tl|tmbox}} – For talk page message boxes.
* {{tl|imbox}} – For image page message boxes.
* {{tl|cmbox}} – For category message boxes.
* {{tl|ombox}} – For other pages message boxes.
* {{tl|fmbox}} – For header and footer message boxes.
* {{tl|mbox}} – Has namespace detection, for message boxes that are used on several types of pages and thus need to change style depending on what page they are used on.


<includeonly>
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
<!-- Kategorien bitte hier, Interwiki-Links bitte nach Wikidata -->
[[Category:Wikipedia metatemplates|{{PAGENAME}}]]
[[Kategorie:Vorlagen:Infoboxen]]
[[Category:Category namespace templates| ]]
 
[[hsb:Předłoha:Ombox]]
[[no:mal:Cmbox]]
[[mk:Шаблон:Cmbox]]
[[ka:თარგი:Cmbox]]
[[ro:Format:Meta-casetămc]]
[[uk:Шаблон:Cmbox]]
 
</includeonly>
</includeonly>