Predloga:Polje za pogovorne strani

Iz Wikipedije, proste enciklopedije
Jump to navigation Jump to search
Documentation icon Dokumentacija predloge[predogled] [uredi] [zgodovina] [osveži]

To je meta-predloga {{tmbox}} (talk page message box) ali polje za pogovorne strani. Ta predloga se kliče iz drugih predlog in s tem zagotavlja skladno strukturo in izgled sporočil uporabljenih na pogovornih straneh celotne Wikipedije. Lahko se kliče direktno na pogovorni strani za enkratno sporočilo z enakim formatom, anpak to je nestandardno (če je sporočilo dovolj pomembno, da se prikaže v tej obliki, razmisli o kreaciji posebne predloge, ki je lahko dosegljiva tudi ostalim urejevalcem). Polje za pogovorne strani ponuja več različnih barv za različne namene, zagotavlja prednastavljene slike (če ni pvključenega parametra image) in še nekatere druge funkcije.

Ta predloga deluje skoraj enako kot {{ambox}} (article message box) oz. polje za članke in uporablja enake parametre.

Na straneh kategorij, z uporabo te meta-predloge, prosto oblikujte sporočilna polja. Če naletite na probleme, jih opišite na pogovorni strani te predloge.

Slogovni standardi[uredi kodo]

The types of talkpage messageboxes follow the same naming convention as the boxes for all other namespaces, but the type of any particular talkpage messagebox may not be as obvious as in other namespaces. When deciding on the type to use for a talkpage messagebox, please consider the following guidelines:

  • speedy should only be used for speedy deletion templates.
  • delete should only be used for templates relating to ongoing deletion discussions. Please do not use this type just to get a red border for a messagebox.
  • content and style should be used for warnings and alerts. Use content (which has an orange border) for more important and immediate alerts, and style (yellow border) for less important warnings. Messageboxes of these types should ideally be transitory: they should not be expected to remain on a talkpage indefinitely.
  • move and protection should only be used for messageboxes relating to moves and merges, and page protection, respectively.
  • The notice type should be used for the majority of talkpage messageboxes; those that are intended to convey or summarise information. If a talkpage messagebox does not obviously fit into one of the other types, it is probably a notice type.

Usage[uredi kodo]

Simple usage example:

{{Polje za pogovorne strani | text = Some text.}}

Complex example:

{{Polje za pogovorne strani
| type      = style
| image     = [[Image:Emblem-question-yellow.svg|40px]]
| style     = width: 400px; 
| textstyle = color: red; font-weight: bold; font-style: italic;
| text      = The message body text.
}}

Talk page message box types[uredi kodo]

The following examples use different type parameters but use no image parameters thus they use the default images for each type.

Special[uredi kodo]

Some other parameter combinations.

Parameters[uredi kodo]

List of all parameters:

{{Polje za pogovorne strani
| type  = speedy / delete / content / style / notice / move / protection
| image = none / [[Image:Some image.svg|40px]]
| imageright = [[Image:Some image.svg|40px]]
| style = CSS values
| textstyle = CSS values
| text  = The message body text. 
| small = {{{small|}}} / yes
| smallimage = none / [[Image:Some image.svg|30px]]
| smallimageright = none / [[Image:Some image.svg|30px]]
| smalltext  = A shorter message body text.
}}

type

If no type parameter is given the template defaults to type notice. That means it gets a gray border.

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. (But the message box can handle images of any size.) For example:
image = [[Image:Crystal package settings.png|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 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

Optional CSS values used by the entire message box table. Without quotation marks " " but with the ending semicolons ;. For example:
style = margin-bottom: 0.5em;

textstyle

Optional CSS values used by the text cell. For example:
textstyle = text-align: center;

text

The message body text.

The small parameters[uredi kodo]

small

da ali yes = Makes it a smaller right floating message box. This also makes the default images smaller. Note that any data fed to the smallimage, smallimageright and smalltext parameters is only used if "small=da". To make it so your template also understands the small parameter you can use this code:
small = {{{small|}}}

smallimage

No parameter = If no smallimage parameter is given then this template falls back to use the image parameter. If the image parameter also is empty then a small default image is used.
An image = Should be an image with usual wiki notation. 30px width is usually about right. For example:
smallimage = [[Image:Crystal package settings.png|30px]]
none = Means that no image is used. This overrides any image fed to image, when "small=da".

smallimageright

No parameter = If no smallimageright parameter is given then this template falls back to use the imageright parameter. If the imageright parameter also is empty then no image is shown on the right side.
An image = Should be an image with usual wiki notation. 30px width is usually about right. For example:
smallimageright = [[Image:Nuvola apps bookcase.png|30px]]
Anything = Any other object that you want to show on the right side.
none = Means that no right side image is used. This overrides any image fed to imageright, when "small=da".

smalltext

A shorter version of the message body text. If no smalltext parameter is given then this template falls back to use the text parameter.

Technical details[uredi kodo]

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

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

This template calls {{Polje za pogovorne strani/core}} which holds most of the code for {{polje za pogovorne strani}}, while {{polje za pogovorne strani}} itself does parameter preprocessing.

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.

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

See also[uredi kodo]

Similar templates:

Obstaja več meta-predlog tipa mbox oz. Polje za ...:

  • {{ambox}} – Za polja v člankih.
  • {{cmbox}} – Za polja v kategorijah.
  • {{imbox}} – Za polje na straneh slik.
  • {{mbox}} – vsebuje detekcijo imenskega prostora; za polja v različnih imenskih prostorih in zato glede na uporabo menja slog prikaza glede na to kje je predloga uporabljena.
  • {{ombox}} – Polja za ostale strani.
  • {{tmbox}} – Polja za pogovorne strani.

Tesno povezane meta-predloge:

  • {{asbox}} – Polje za škrbinski članek.
  • {{dmbox}} – Polje za razločitvene strani (footer).
  • {{fmbox}} – Polje za sporočila (header & footer).


Other pages:

WikiProject banners: