Předłoha:Cmbox/Dokumentacija

z Kitakija

(rozdźěl mjez wersijomaj)
Dźi do: Nawigacija, Pytać
(dokumentacija po jendźelskej wikipediji)
S (korektura, přełožk)
Rjadka 2: Rjadka 2:
<!--<includeonly>{{intricate template}}</includeonly>-->
<!--<includeonly>{{intricate template}}</includeonly>-->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
-
{{mbox templates}}
+
{{Mbox předłohi}}
-
To je {{tl|cmbox}} abo zdźělenski kašćik za kategorije (jendźelsce '''category message box''') meta-předłoha.
+
To je {{tl|cmbox}} abo zdźělenski kašćik za kategorije (jendźelsce '''category message box''') wot typa meta-předłoha.
-
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.
+
Wona so wužiwa zo by wutworiła předłohi za zdźělenske kašćiki za kategorijowe strony, tajka kaž {{tl|Rozrjaduj kategoriju}} atd. Poskića někotre rozdźělne barby, wužiwa standardne wobrazy, jeli žadyn parameter '''image''' njeje definowany a ma někotre druhe znamjenja.
-
This template works almost exactly like {{tl|ambox}} and uses the same parameters.
+
Tuta předłoha funguje zwjetša dokładnje kaž {{tl|ambox}} a wužiwa nimale samsne parametry.
<!--
<!--
=== We are deploying! ===
=== We are deploying! ===
Rjadka 17: Rjadka 17:
=== Wužiće ===
=== Wužiće ===
-
Simple usage example:
+
Jednory přikład:
<pre>
<pre>
Rjadka 26: Rjadka 26:
-
Complex example:
+
Kompleksny přikład
<pre>
<pre>
Rjadka 34: Rjadka 34:
| style    = width: 400px;  
| style    = width: 400px;  
| textstyle = color: red; font-weight: bold; font-style: italic;
| textstyle = color: red; font-weight: bold; font-style: italic;
-
| text      = The message body text.
+
| text      = Wobłuk za zdźělenski tekst.
 +
 
}}
}}
</pre>
</pre>
Rjadka 43: Rjadka 44:
| style    = width: 400px;  
| style    = width: 400px;  
| textstyle = color: red; font-weight: bold; font-style: italic;
| textstyle = color: red; font-weight: bold; font-style: italic;
-
| text      = The message body text.
+
| text      = Wobłuk za zdźělenski tekst.
}}
}}
-
=== Category message box types ===
+
=== Typy zdźělenskich kašćikow za kategorije ===
-
The following examples use different '''type''' parameters but use no image parameters thus they use the default images for each type.
+
Sćěhowace přikłady wužiwaja rozdźělne parametry '''type''', ale njewužiwaja parametry '''image''', tak zo standardne wobrazy za kóždy typ wužiwać.
{{cmbox
{{cmbox
| type = speedy
| type = speedy
-
| text = type=<u>speedy</u> – Speedy deletion templates such as {{tl|db-catempty}}.
+
| text = type=<u>speedy</u> – předłohi za spěšne wušmórnjenje, na př. {{tl|db-catempty}}.
}}
}}
{{cmbox
{{cmbox
| type = delete
| type = delete
-
| text = type=<u>delete</u> – Deletion templates such as {{tl|cfd}}.
+
| text = type=<u>delete</u> – namjety na wušmórnjenje, na př.  {{tl|cfd}}.
}}
}}
{{cmbox
{{cmbox
| type = content
| type = content
-
| text = type=<u>content</u> – Major warnings and problems, such as {{tl|CategorisationDisputedPeople}}.
+
| text = type=<u>content</u> – wobsahowe njedostatki, na př.{{tl|CategorisationDisputedPeople}}.
}}
}}
{{cmbox
{{cmbox
| type = style
| type = style
-
| text = type=<u>style</u> – Minor warnings and problems, such as {{tl|popcat}}.
+
| text = type=<u>style</u> – stilowe njedostatki, na př. {{tl|popcat}}.
}}
}}
{{cmbox
{{cmbox
| type = notice
| type = notice
-
| text = type=<u>notice</u> – Notices and messages of any kind, both permanent and temporary.
+
| text = type=<u>notice</u> – notica abo pokiw, na př.
}}
}}
{{cmbox
{{cmbox
| type = move
| type = move
-
| text = type=<u>move</u> – Move, merge and split messages and proposals, such as {{tl|categoryredirect}}.
+
| text = type=<u>move</u> – namjety na zjednoćenje, rozdźělenje abo přesunjenje, na př.{{tl|categoryredirect}}.
}}
}}
{{cmbox
{{cmbox
| type = protection
| type = protection
-
| text = type=<u>protection</u> – Protection templates such as {{tl|pp-semi-protected}} when shown on a category page.
+
| text = type=<u>protection</u> – informacije wo škitanych nastawkach, na př. {{tl|pp-semi-protected}} jeli so na kategorijowej stronje pokaza.
}}
}}
-
=== Other images ===
+
===Druhe wobrazy ===
-
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.
+
Standardne wobrazy, kotrež so horjeka pokazuja, su zwjetša přihódnosće dla. We wjele padach je přihódnišo bóle specifiske wobrazy wužiwać. Tute přikłady wužiwaja parameter '''image''', zo by druhe wobrazy hač standardne wobrazy definowali.
{{cmbox
{{cmbox
| type  = style
| type  = style
| image = [[Image:Sub-arrows.svg|40px]]
| image = [[Image:Sub-arrows.svg|40px]]
-
| text  = type = style <br> image = <nowiki>[[Image:Sub-arrows.svg|40px]]</nowiki> <br> This image is used for {{tl|verylarge}} and {{tl|CatDiffuse}}.  
+
| text  = type = style <br> image = <nowiki>[[Image:Sub-arrows.svg|40px]]</nowiki> <br> Tutón wobraz so za {{tl|verylarge}} a {{tl|Rozrjaduj kategoriju}} wužiwa.  
}}
}}
{{cmbox
{{cmbox
| type  = move
| type  = move
| image = [[Image:Redirect arrow.svg|52px]]
| image = [[Image:Redirect arrow.svg|52px]]
-
| text  = type = move <br> image = <nowiki>[[Image:Redirect arrow.svg|52px]]</nowiki> <br> This image is used for {{tl|categoryredirect}}.  
+
| text  = type = move <br> image = <nowiki>[[Image:Redirect arrow.svg|52px]]</nowiki> <br> Tutón wobraz so za {{tl|categoryredirect}} wužiwa.  
}}
}}
-
=== Special ===
+
===Specialne===
-
Some other parameter combinations.
+
Někotre kombinacije parametrow
{{cmbox
{{cmbox
-
| text  = No type and no image given ('''default''')
+
| text  = Njejstej definowanej parametraj '''type''' a '''image'''.
}}
}}
{{cmbox
{{cmbox
| image = none
| image = none
-
| text  = No type and '''image=none''' – No image is used and the '''text''' uses the whole message box area.
+
| text  = Žadyn parameter '''type''' a parameter '''image'''=none – wuskutkuje prózdny wobłuk ze samsnej wulkosću kaž standardny wobraz.
}}
}}
Rjadka 119: Rjadka 120:
}}
}}
-
=== Parameters ===
+
=== Parametry ===
-
List of all parameters:
+
Lisćina wšěch parametrow:
<pre>
<pre>
Rjadka 130: Rjadka 131:
| style = CSS value
| style = CSS value
| textstyle = CSS value
| textstyle = CSS value
-
| text  = The message body text.  
+
| text  = Zdźělenski tekst.  
 +
 
}}
}}
</pre>
</pre>
'''type'''
'''type'''
-
:If no '''type''' parameter is given the template defaults to type '''notice'''. That means it gets a blue background.
+
:Jeli žadyn '''type''' parameter njeje definowany, to předłohowe předskoki za typ '''notica''', kotryž so za "nastawkowe noticy" wužiwa. To woznamjenja, zo so pokaza módry "side bar" kaž w přikładźe z jednorym wužićom předłohi horjeka.
'''image'''
'''image'''
Rjadka 194: Rjadka 196:
There are several meta-templates in the mbox family:
There are several meta-templates in the mbox family:
-
* {{tl|ambox}} – For article message boxes.
+
* {{tl|ambox}} (Za zdźělenki we mjenowym rumje nastawkow (jendźelsce ''article message box''))
-
* {{tl|tmbox}} – For talk page message boxes.
+
* {{tl|tmbox}} (za zdźělenki we mjenowym rumje <code>Diskusija:</code> (jendźelsce ''discussion message box''))
-
* {{tl|imbox}} – For image page message boxes.
+
* {{tl|imbox}} (za zdźělenki we mjenowym rumje <code>Wobraz</code> (jendźelsce ''image message box''))
-
* {{tl|cmbox}} – For category message boxes.
+
* {{tl|cmbox}} (za zdźělenki we mjenowym rumje <code>Kategorija</code> (jendźelsce ''category message box''))
-
* {{tl|ombox}} – For other pages message boxes.
+
* {{tl|ombox}} (za zdźělenki na dalšich stronach)
* {{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.
* {{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.

Wersija z 19:20, 22. awg 2008

To je {{cmbox}} abo zdźělenski kašćik za kategorije (jendźelsce category message box) wot typa meta-předłoha.

Wona so wužiwa zo by wutworiła předłohi za zdźělenske kašćiki za kategorijowe strony, tajka kaž {{Rozrjaduj kategoriju}} atd. Poskića někotre rozdźělne barby, wužiwa standardne wobrazy, jeli žadyn parameter image njeje definowany a ma někotre druhe znamjenja.

Tuta předłoha funguje zwjetša dokładnje kaž {{ambox}} a wužiwa nimale samsne parametry.

Wobsah

Wužiće

Jednory přikład:

{{cmbox | text = Někajki tekst.}}


Kompleksny přikład

{{cmbox
| type      = style
| image     = [[Image:Emblem-question-yellow.svg|40px]]
| style     = width: 400px; 
| textstyle = color: red; font-weight: bold; font-style: italic;
| text      = Wobłuk za zdźělenski tekst.

}}

Typy zdźělenskich kašćikow za kategorije

Sćěhowace přikłady wužiwaja rozdźělne parametry type, ale njewužiwaja parametry image, tak zo standardne wobrazy za kóždy typ wužiwać.

Druhe wobrazy

Standardne wobrazy, kotrež so horjeka pokazuja, su zwjetša přihódnosće dla. We wjele padach je přihódnišo bóle specifiske wobrazy wužiwać. Tute přikłady wužiwaja parameter image, zo by druhe wobrazy hač standardne wobrazy definowali.

Specialne

Někotre kombinacije parametrow

Parametry

Lisćina wšěch parametrow:

{{cmbox
| type  = speedy / delete / content / style / notice / move / protection
| image = none / [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.svg|40px]]
| style = CSS value
| textstyle = CSS value
| text  = Zdźělenski tekst. 

}}

type

Jeli žadyn type parameter njeje definowany, to předłohowe předskoki za typ notica, kotryž so za "nastawkowe noticy" wužiwa. To woznamjenja, zo so pokaza módry "side bar" kaž w přikładźe z jednorym wužićom předłohi horjeka.

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.
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:
image = [[Image:Sub-arrows.svg|40px]]
none = Means that no image is used.

imageright

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:
imageright = [[Image:Nuvola apps bookcase.png|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;

textstyle

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

text

The message body text.

Technical details

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

{{cmbox
| text  = <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 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 parser functions and special characters in parameters.

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 talk page. Since this template works almost exactly like {{ambox}} and {{imbox}} their talk pages and related pages might also contain more details.

See also

There are several meta-templates in the mbox family:

  • {{ambox}} (Za zdźělenki we mjenowym rumje nastawkow (jendźelsce article message box))
  • {{tmbox}} (za zdźělenki we mjenowym rumje Diskusija: (jendźelsce discussion message box))
  • {{imbox}} (za zdźělenki we mjenowym rumje Wobraz (jendźelsce image message box))
  • {{cmbox}} (za zdźělenki we mjenowym rumje Kategorija (jendźelsce category message box))
  • {{ombox}} (za zdźělenki na dalšich stronach)
  • {{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.


Wosobinske nastroje