Шаблон:Tmbox
{{#ifeq:|yes
|
{{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | {{{text}}} }} | {{#if: | {{{smallimageright}}} | }} |
{{#switch:
| | speedy | delete | content | style | move | protection | notice =
| #default =
[[Категория:Шаблоны сообщений требующие исправления|Шаблон:Main otherШаблон:Tmbox]]
}}
|
{{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | {{{text}}} |
{{#switch:
| | speedy | delete | content | style | move | protection | notice =
| #default =
[[Категория:Шаблоны сообщений требующие исправления|Шаблон:Main otherШаблон:Tmbox]]
}} }}
{{#if:|{{#ifexist:{{{1}}}|{{{{{1}}}||||}}|{{#ifexist:Шаблон:{{{1}}}|{{{{{1}}}||||}}|Шаблон:Документировать}}}}|{{#ifexist:Шаблон:Tmbox/doc|
{{#if: | }}{{#if: | }}{{#if: | }}{{#if:Мета-шаблоныокон сообщений | }}{{#if: | }}{{#if: |}}{{#if: |}}{{#if:{{ambox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |}}{{#if: |}}{{#if:{{cmbox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if:{{mbox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |}}{{#if: |}}{{#if:{{ombox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |}}{{#if: |}}{{#if:{{tmbox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if:{{fmbox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#if: |}}{{#switch:
|none |off=|#default=
{{{верхнее изображение}}}{{#if: | {{{подпись верхнего изображения}}} }} |
{{{вводный заголовок}}} |
Мета-шаблоны окон сообщений |
{{{изображение}}}{{#if: | {{{подпись}}} }} |
{{{введение}}} |
{{{заголовок1}}} |
{{ambox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |
{{{заголовок2}}} |
{{cmbox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |
{{{заголовок3}}} |
{{{список3}}} |
{{{заголовок4}}} |
{{mbox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |
{{{заголовок5}}} |
{{ombox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |
{{{заголовок6}}} |
{{tmbox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |
{{{заголовок7}}} |
{{{список7}}} |
{{{заголовок8}}} |
{{{список8}}} |
{{{заголовок9}}} |
{{fmbox{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||{{{8}}}}}{{#if:||{{{9}}}}}{{#if:||и т. д.}}}} (t) |
{{{заголовок10}}} |
{{{список10}}} |
{{{заголовок11}}} |
{{{список11}}} |
{{{заголовок12}}} |
{{{список12}}} |
{{{заголовок13}}} |
{{{список13}}} |
{{{заголовок14}}} |
{{{список14}}} |
{{{заголовок15}}} |
{{{список15}}} |
{{{заголовок16}}} |
{{{список16}}} |
{{{заголовок17}}} |
{{{список17}}} |
{{{заголовок18}}} |
{{{список18}}} |
{{{заголовок19}}} |
{{{список19}}} |
{{{заголовок20}}} |
{{{список20}}} |
{{{заголовок21}}} |
{{{список21}}} |
{{{заголовок22}}} |
{{{список22}}} |
{{{заголовок23}}} |
{{{список23}}} |
{{{заголовок24}}} |
{{{список24}}} |
{{{заголовок25}}} |
{{{список25}}} |
{{{заголовок26}}} |
{{{список26}}} |
{{{заголовок27}}} |
{{{список27}}} |
{{{заголовок28}}} |
{{{список28}}} |
{{{заголовок29}}} |
{{{список29}}} |
{{{заголовок30}}} |
{{{список30}}} |
{{{заголовок31}}} |
{{{список31}}} |
{{{заголовок32}}} |
{{{список32}}} |
{{{заголовок33}}} |
{{{список33}}} |
{{{заголовок34}}} |
{{{список34}}} |
{{{заголовок35}}} |
{{{список35}}} |
{{{завершение}}} |
{{#if:| <span|<div}} class="noprint plainlinksneverexpand" style="{{#if:||background:transparent;padding:0;color:#000000;}}white-space:nowrap;font-size:xx-small{{#if:|;color:{{{fontcolor}}}}}{{#if:|;{{{fontstyle}}}}}{{#if: |;{{{style}}}}}">{{#if:1||Шаблон: }}{{#if:1|п|Просмотр}}{{#if:1|·| • }}{{#if:1|о|Обсуждение}}{{#if:1|·| • }}{{#if:1|р|Править}}</{{#if:|span> |div>}}}} |
{{#if: | {{{demospace}}} | {{#ifeq:шаблон| | main | {{#ifeq:шаблон|обсуждение шаблона | {{#if: | talk | {{#if:|шаблон|talk}} }} | шаблон }} }} }}
| main = | talk | обсуждение = | user | участник = | wikipedia | википедия = | file | image | файл = | mediawiki | медиавики = | template | шаблон = | help | справка = | category | категория = | portal | портал = | other | #default =
}}}} Этот мета-шаблон (talk page message box) используется для формирования информационных сообщений на страницах обсуждения. Этот шаблон вызывается другими шаблонами и определяет общую структуру и внешний вид сообщений, используемых на страницах обсуждения проекта. Его можно использовать непосредственно на странице обсуждения, чтобы показать однократное сообщение в том же формате, как другие шаблонные сообщения, но это скорее исключение (если сообщение является достаточно важным, чтобы отображаться в таком виде, лучше подумать о создании отдельного шаблона, чтобы он был легко доступен для других редакторов).
Этот шаблон подобен шаблону {{ambox}} и использует большинство его параметров.
Содержание
Использование
Простое использование:
{{tmbox | text = Some text.}}
{{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | Some text. }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | Some text. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}}
Сложное использование:
{{tmbox | 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. }}
{{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | 40px }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | 40px }} | {{#if:| {{{smallimage}}} | 40px }} | [[Image:{{#switch:style | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | The message body text. }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:40px|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if:40px | 40px | [[Image:{{#switch:style | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | The message body text. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}}
Типы сообщений на страницах обсуждения
Следующие примеры используют различные значения параметра type, но не меняют параметры отображения значка (иконки), поэтому везде отображается картинка по умолчанию.
{{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch:speedy | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | type=speedy – в шаблонах быстрого удаления категории. }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch:speedy | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | type=speedy – в шаблонах быстрого удаления категории. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} {{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch:delete | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | type=delete – в шаблонах удаления категории. }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch:delete | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | type=delete – в шаблонах удаления категории. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} {{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch:content | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | type=content – Важные предупреждения и предостережения. }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch:content | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | type=content – Важные предупреждения и предостережения. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} {{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch:style | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | type=style – Обычные предупреждения и предостережения. }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch:style | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | type=style – Обычные предупреждения и предостережения. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} {{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch:notice | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | type=notice – Информационные сообщения, постоянные и временные. }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch:notice | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | type=notice – Информационные сообщения, постоянные и временные. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} {{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch:move | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | type=move – Сообщения о перемещении, слиянии и разделении. }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch:move | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | type=move – Сообщения о перемещении, слиянии и разделении. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} {{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch:protection | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | type=protection – Сообщения о защите страницы. }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch:protection | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | type=protection – Сообщения о защите страницы. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}}
Дополнительно
Примеры использования других параметров и их комбинаций.
{{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | Не заданы параметры type и image (по умолчанию) }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | Не заданы параметры type и image (по умолчанию) |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} {{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | none }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | none }} | {{#if:| {{{smallimage}}} | none }} | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | Не заданы параметр type и image=none – Значок не показывается и текст занимает всю ширину окна сообщения. }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:none|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if:none | none | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | Не заданы параметр type и image=none – Значок не показывается и текст занимает всю ширину окна сообщения. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} {{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | 42px }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | 40px }} | {{#ifeq:{{#if: | {{{smallimageright}}} | 40px }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | 42px }} | {{#if:| {{{smallimage}}} | 42px }} | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | image = [[Image:Gnome globe current event.svg|42px]] imageright = [[Image:Nuvola apps bookcase.svg|40px]] }} |
{{#if: | {{{smallimageright}}} | 40px }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:42px|none | | }}{{#if:40px | {{#ifeq:40px|none
||
}}
}}
{{#if:42px | 42px | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | image = [[Image:Gnome globe current event.svg|42px]] imageright = [[Image:Nuvola apps bookcase.svg|40px]] |
40px |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}}
Параметры
Список всех параметров:
{{tmbox | 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
- нет параметра = если параметр type не задан, то используется значение по умолчанию notice (голубой фон).
image
- нет параметра = если параметр image не задан, то используется значок по умолчанию в зависимости от того что задано в параметре type.
- файл изображения = ссылка на файл использующая вики разметку. Размер подгоняется под 40px - 50px в ширину в зависимости от соотношения сторон в оригинале. (Но можно задать и произвольный размер.) Например:
image = [[Image:Sub-arrows.svg|40px]]
- none = обозначает, что не нужно отображать значок.
imageright
- нет параметра = если параметр imageright не задан, то значок справа не показывается.
- файл изображения = ссылка на файл использующая вики разметку. Размер подгоняется под 40px - 50px в ширину в зависимости от соотношения сторон в оригинале. (Но можно задать и произвольный размер.) Например:
imageright = [[Image:Nuvola apps bookcase.png|40px]]
- одругое = все что вы хотите отобразить справа.
style
- Дополнительный параметр стиля CSS для всей таблицы. Например:
style = margin-bottom: 0.5em;
textstyle
- Дополнительный параметр стиля CSS для текстовой ячейки. Например:
textstyle = text-align: center;
text
- Текст сообщения.
Параметры миниатюризации
{{#ifeq:yes|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | small = yes }} | {{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | small = yes |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} {{#ifeq:yes|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch:style | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | type = style small = yes }} |
{{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch:style | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | type = style small = yes |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} small
- yes = Создает маленькое окно сообщения прикрепляющееся к правому краю страницы. Этот параметр также уменьшает значок по умолчанию. Обратите внимание, что данные переданные в параметрах smallimage, smallimageright и smalltext используются только если "small=yes". Чтобы производный шаблон понимал параметр small используйте следующий код:
small = {{{small|}}}
{{#ifeq:yes|yes
| {{#ifeq:{{#if:30px| 30px | 40px }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:30px| 30px | 40px }} | {{#if:30px| 30px | 40px }} | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | small = yes image = [[Image:Nuvola apps bookcase.png|40px]] smallimage = [[Image:Nuvola apps bookcase.png|30px]] }} |
{{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:40px|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if:40px | 40px | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | small = yes image = [[Image:Nuvola apps bookcase.png|40px]] smallimage = [[Image:Nuvola apps bookcase.png|30px]] |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} smallimage
- нет параметра = если параметр smallimage не задан, то опять используется параметр image. Если параметр image также пустой, то используется маленький значок по умолчанию.
- файл изображения = ссылка на файл использующая вики разметку. Обычно около 20px для сообщений в одну строку и до 25px в ширину для двух строк текста. Например:
smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]
- none = обозначает, что не нужно отображать значок. Переопределяет заданное в параметре image, когда "small=left".
{{#ifeq:yes|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | 40px }} | {{#ifeq:{{#if: | {{{smallimageright}}} | 40px }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | small = yes imageright = [[Image:Nuvola apps bookcase.png|40px]] }} |
{{#if: | {{{smallimageright}}} | 40px }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if:40px | {{#ifeq:40px|none
||
}}
}}
{{#if: | | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | small = yes imageright = [[Image:Nuvola apps bookcase.png|40px]] |
40px |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} {{#ifeq:yes|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if:none | none | 30px }} | {{#ifeq:{{#if:none | none | 30px }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | small = yes imageright = [[Image:Nuvola apps bookcase.png|40px]] smallimageright = none }} |
{{#if:none | none | 30px }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if:30px | {{#ifeq:30px|none
||
}}
}}
{{#if: | | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | small = yes imageright = [[Image:Nuvola apps bookcase.png|40px]] smallimageright = none |
30px |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}} smallimageright
- нет параметра = если параметр smallimageright не задан, то о пять используется параметр imageright. Если параметр imageright также пустой, то используется значок справа не показывается.
- файл изображения = ссылка на файл использующая вики разметку. Около 30px в ширину. Например:
smallimageright = [[File:Nuvola apps bookcase.png|30px|alt=Three stacked books]]
- одругое = все что вы хотите отобразить справа.
- none = обозначает, что не нужно отображать значок справа. Переопределяет заданное в параметре imageright, когда "small=yes".
smalltext
- Краткий вариант текста сообщения. Если параметр smalltext не задан, то пять используется параметр text.
Технические детали
Если вам необходимо использовать специальные символы внутри параметра text, то вам необходимо заменять их ESC-последовательностями :
{{tmbox | text = <div> Здесь знак равенства = открывающая и закрывающая фигурные скобки { }. А здесь знак разделения параметров {{!}} и две закрывающие фигурные скобки <nowiki>}}</nowiki>. А здесь знак разделения параметров перед двумя закрывающими фигурными скобками <nowiki>|}}</nowiki>. </div> }}
{{#ifeq:|yes
| {{#ifeq:{{#if:| {{{smallimage}}} | }}|none | | }}{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none
||
}}
}}
{{#if:{{#if:| {{{smallimage}}} | }} | {{#if:| {{{smallimage}}} | }} | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:yes|yes|30x30px|40x40px}}|link=|alt=]]}} | {{#if:| {{{smalltext}}} | Здесь знак равенства = открывающая и закрывающая фигурные скобки { }. А здесь знак разделения параметров | и две угловые скобки }}. А здесь знак разделения параметров перед двумя закрывающими фигурными скобками |}}. |
{{#if: | {{{smallimageright}}} | }} |
| | speedy | delete | content | style | move | protection | notice =
| #default =}}
| {{#ifeq:|none | | }}{{#if: | {{#ifeq:|none
||
}}
}}
{{#if: | | [[Image:{{#switch: | speedy = Imbox speedy deletion.png | delete = Imbox deletion.png | content = Imbox content.png | style = Edit-clear.svg | move = Imbox move.png | protection = Imbox protection.png | notice | #default = Imbox notice.png }} | {{#ifeq:|yes|30x30px|40x40px}}|link=|alt=]]}} | Здесь знак равенства = открывающая и закрывающая фигурные скобки { }. А здесь знак разделения параметров | и две угловые скобки }}. А здесь знак разделения параметров перед двумя закрывающими фигурными скобками |}}. |
| | speedy | delete | content | style | move | protection | notice =
| #default =}} }}{{#ifeq:Шаблон|Template | {{#ifeq:Tmbox|Tmbox
| {{#ifeq:|true | | }} }}
}}
Этот шаблон использует tmbox CSS классы в MediaWiki:Common.css влияющие на его внешний вид, т.е. он полностью перенастраиваемый.
Шаблон вызывает {{tmbox/core}} содержит весь исполняемый код для {{tmbox}}, когда как сам {{tmbox}} занимается предварительной обработкой параметров, тем самым упрощая {{tmbox/core}}.
Внутри шаблона для формирования кода таблицы используется язык разметки HTML вместо языка викиразметки. Так делается во всех мета-шаблонах, т.к. у вики-разметки есть ряд недостатков. Например, она затрудняет использование функций парсера и специальных символов в параметрах.
Файлы значков по умолчанию для этого мета-шаблона имеют формат png, а не svg. Основная причина в том, что у некоторых старых браузеров есть проблемы с отображением прозрачного фона, который подставляет MediaWiki движок для svg изображений. Все png изображение оптимизированы вручную и имеют прозрачный фон чтобы одинаково хорошо отображаться во всех браузерах. Обратите внимание, что svg значки выглядят плохо только в старых браузерах, поэтому такая ручная оптимизация сделана только для наиболее часто использующихся иконок.
en:Template:Tmbox as:Template:Tmbox ba:Ҡалып:Tmbox ca:Plantilla:Metacaixa d'avís discussió eo:Ŝablono:DiskutaMesaĝokesto hsb:Předłoha:Tmbox ia:Patrono:Tmbox ja:Template:Tmbox mn:Загвар:Tmbox no:Mal:Tmbox fa:الگو:Tmbox pl:Szablon:Tmbox pt:Predefinição:Tmbox ro:Format:Meta-casetămd sl:Predloga:Polje za pogovorne strani uk:Шаблон:Tmbox ur:Template:Tmbox zh:Template:Tmbox |Шаблон:Документировать}}}}