Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Mbox/doc: Difference between revisions

Template page
LaDez
m Reverted edits by 110.54.154.209 (talk) to last revision by W like wiki
Line 1: Line 1:
You can share more easily.
<div style="float:right>{{Redirects| TS/cmbox| TS/gibox| TS/ombox| Ambox|Gibox|mbox|Ombox}}
<includeonly>{{Heavily used template|3=+}}</includeonly></div>
{{TemplateBox
|1        = text
|1label-en = text
|1label-ru = текст
|1d-en    = The text to be displayed.
|1d-ru    = Отображаемый текст.
|1type    = content
|1def      = <!-- default value for the parameter -->
|1stat    = required


○ Connect contacts
|2        = type
Find your friends in your contacts that use a Samsung account using their phone number or Samsung account ID on all devices logged in using the same Samsung account. Easily share content with your friends on Samsung account-based services and see your friends’ profile pictures.
|2label-en = type
|2label-ru = тип
|2d-en    = Changes the color depending on the message needed. Each has its own preset image, see [[#{{int:Apisandbox-examples}}]]
  |2d-td-en = Changes the color depending on the message needed. Each has its own preset image, see the template documentation.
|2d-ru    = Меняет цвет в зависимости от нужного сообщения. Каждое сообщение имеет своё предустановленное изображение, посмотрите [[#{{int:Apisandbox-examples}}]]
  |2d-td-ru = Меняет цвет в зависимости от нужного сообщения. Каждое сообщение имеет своё предустановленное изображение, посмотрите документацию шаблона.
|2type    = line
|2def      = notice
|2stat    = optional


※ Additional information on changing settings
|3        = image
You can delete a connected contact using the delete contact menu in the group sharing settings menu of Samsung account.
|3label-en = left image
|3label-ru = изображение слева
|3d-en    = Override the image (“none” for no image). Use format: <nowiki>[[File:Commons-emblem-urgent.svg|class=noviewer|48px]]</nowiki>. The default depends on the type.
|3d-ru    = Изменяет изображение ("none" чтобы не было изображения). Используйте формат: <code><nowiki>[[File:Commons-emblem-urgent.svg|class=noviewer|48px]]</nowiki></code>. Значение по умолчанию зависит от типа.
|3type    = content
|3def      =
|3stat    = optional


Your data will be handled and processed in accordance with our 
|4        = imageright
|4label-en = right image
|4label-ru = изображение справа
|4d-en    = Show an image on the right side, similar to the left one (but empty by default).
|4d-ru    = Показывает изображение с правой стороны, как и с левой (но является пустым по умолчанию).
|4type    = content
|4def      = <!-- default value for the parameter -->
|4stat    = optional-


{|class="mw-content-ltr" border="0" cellspacing="0" cellpadding="0" width="100%" style="margin:.6em 0;background:none"
|5        = textstyle
|-valign="top"<!--
|5label-en = text style
|5label-ru = стиль текста
|5d-en    = Override/augment default style of text cell (e.g. alignment — text-align:left; / text-align:right; / text-align:center;).
|5d-ru    = Изменяет/расширяет стиль текстового поля по умолчанию (например, выравнивание — <code>text-align:left;</code> / <code>text-align:right;</code> / <code>text-align:center;</code>)
|5type    = line
|5stat    = optional-


CONTRIBUTORS: if your test wiki is active, you are allowed to add it to the appropriate section; but only up to 10 projects should be featured per column at the same time.
|6        = style
|6label-en = box style
|6label-ru = стиль бокса
|6d-en    = Override/augment default style of the whole message box.
|6d-ru    = Изменяет/расширяет стиль по умолчанию всего бокса с уведомлением.
|6type    = line
|6stat    = optional-
|7        = class
|7label-en = box class
|7label-ru = класс бокса
|7d-en    = Augment default CSS classes of the whole message box. Particularly useful if your template uses TemplateStyles.
|7d-ru    = Расширяет CSS-классы по умолчанию всего бокса с уведомлением. Особенно полезно, если ваш шаблон использует TemplateStyles.
|7type    = line
|7stat    = optional-


TRANSLATORS: please do not mark this page for translation, as it is a frequently updated page.
|8        = lang
The messages used within it can be translated on Translatewiki: https://translatewiki.net/wiki/Special:Translate/ext-wikimediaincubator-onwiki
|8label-en = language
|8label-ru = язык
|8d-en    = Set the language of the text – it's important for right-to-left languages: their image is on the right and imageright is on the left. It helps assistive software (e.g. screen readers) even in left-to-right languages.
|8d-ru    = Устанавливает язык текста — это важно для языков с написанием справа налево: изображение у них располагается справа, а imageright — слева. Это помогает вспомогательному программному обеспечению (например, программам чтения с экрана) даже при использовании языков с написанием слева направо.
|8type    = line
|8stat    = optional-


-->
|9        = width
|width="25%"| [[Incubator:Site creation log|{{int:wminc-custom-featuredwikis-approved}}]]
|9label-en = box width
<!-- {|border="0" cellspacing="0" cellpadding="0" width="100%" style="margin:0;background:none;"
|9label-ru = ширина бокса
|-valign="top"
|9d-en    = Set the width of the box (avoid using it, 80% for example is too large as it leaves only 10% of the page content width for the left/right margins where there may be floating elements generally large of about 250px: if this occurs the Mbox will be displayed at a much lower position on the page, as if there was a "clear:both", so Mbox may not be immediately visible without scrolling down the page with a huge blank space in the middle and all the rest of the page after the Mbox will be also invisible without scrolling). Instead, use the "margin" parameter to set horizontal margins.
| -->
To avoid the centering, and/or the thick left border, modify e.g. “style=margin-left:0;border-left:2px solid #F4C430”
* '''{{localised wiki name|Wp|bew|Betawi}}'''
|9d-ru    = Устанавливает ширину бокса (избегайте его использования, например, 80% — это слишком много, так как остаётся только по 10 % от ширины содержимого страницы для левого и правого полей, где могут быть плавающие элементы размером около 250px: в этом случае Mbox будет отображаться гораздо ниже на странице, как если бы было использовано <code>"clear:both"</code>, поэтому Mbox может быть не сразу видим без долгой прокрутки страницы с огромным пустым пространством посередине, как и вся остальная часть страницы после Mbox будет также невидима без прокрутки). Вместо этого используйте параметр "margin" для установки горизонтальных полей.
* '''{{localised wiki name|Wp|kus|Kusaal}}'''
Чтобы избежать выравнивания по центру и/или толстой левой границы, внесите изменение, например, <code>"style=margin-left:0;border-left:2px solid #F4C430"</code>.
|style="min-width:1em"|&nbsp;<!--larger separator-->
|9type    = line
|width="50%"| {{int:wminc-custom-featuredwikis-active}}
|9def      = auto
{|border="0" cellspacing="0" cellpadding="0" width="100%" style="margin:0;background:none;"
|9stat    = optional-
|-valign="top"
|
{{int:Wikibase-sitelinks-wikipedia}}<!--please sort languages alphabetically per ISO code-->
* '''{{localised wiki name|Wp|bdr|West Coast Bajau}}'''
* '''{{localised wiki name|Wp|btm|Mandailing}}'''
* '''{{localised wiki name|Wp|dtp|Kadazandusun}}'''
* '''{{localised wiki name|Wp|igl|Igala}}'''
* '''{{localised wiki name|Wp|kge|Komering}}'''
* '''{{localised wiki name|Wp|knc|Central Kanuri}}'''
* '''{{localised wiki name|Wp|mos|Moore}}'''
* '''{{localised wiki name|Wp|nup|Nupe}}'''
* '''{{localised wiki name|Wp|kri|Krio}}'''
* '''{{localised wiki name|Wp|syl|Sylheti}}'''
|
{{int:Wikibase-sitelinks-wiktionary}}
* '''{{localised wiki name|Wt|kaa|Karakalpak}}'''
* '''{{localised wiki name|Wt|mad|Madurese}}'''
* '''{{localised wiki name|Wt|syl|Sylheti}}'''
{{int:Wikibase-sitelinks-wikibooks}}
* '''{{localised wiki name|Wb|syl|Sylheti}}'''
{{int:Wikibase-sitelinks-wikinews}}
* '''{{localised wiki name|Wn|shn|Shan}}'''
* '''{{localised wiki name|Wn|syl|Sylheti}}'''
{{int:Wikibase-sitelinks-wikiquote}}
* '''{{localised wiki name|Wq|syl|Sylheti}}'''
{{int:Wikibase-sitelinks-wikivoyage}}
* '''{{localised wiki name|Wy|id|Indonesian}}'''
* '''{{localised wiki name|Wy|syl|Sylheti}}'''
* '''{{localised wiki name|Wy|diq|Zazaki}}'''
|}


|10        = margin
|10label-en = horizontal margin
|10label-ru = поля по краям<!--Oh, I'm hoping that I'm not wrong with this translation!-->
|10d-en    = Set the horizontal margin of the box (by default it is "auto" if a legacy width is specified, otherwise it is "10%").
|10d-ru    = Установливает горизонтальное поле бокса (по умолчанию — "auto", если указана наследуемая ширина, в противном случае — "10%").
|10type    = line
|10def      = 10%
|10stat    = optional-


|style="min-width:1em"|&nbsp;<!--larger separator-->
|name = Mbox
|width="25%"| {{int:wminc-custom-featuredwikis-permanent}}
|desc = This is used to create message boxes.
* '''{{localised wiki name|Wp|grc|Ancient Greek}}'''
|namespace = all
|}<noinclude>
|usergroup = all
|placement =
|usage-notes =
|type =
|example =
|example-value =
|i18n-method = -
|i18n-desc =
|i18n-mediawiki-msg =
|i18n-subpage =
|seealso =
* {{t|NoteBox}}
|setscats =
|print = multi
|shorthand =
|relieson =
|mustbesubst =
|useTemplateData = 1
}}


[[Category:Incubator:(all)|Featured wikis]]
== {{int:Note}} ==
</noinclude>
{{LangSwitch
Check If You’ve Been CompromisedConnect with Google to scan your browsing history.
| en = The icon displayed in the message box is clickable and drives to Commons (to see its attributions), but only when the message box is displayed in a "Template:" page (including their talk pages). When the template is displayed in a page belonging to all other namespaces, no link is generated, only the icon is visible directly.
| ru = Иконка, отображаемая в окне сообщения, является кликабельной и ведёт на Викисклад (для просмотра её атрибуций), но только когда окно сообщения отображается на странице «Шаблон:» (включая его страницу обсуждения). Когда шаблон отображается на странице, принадлежащей всем остальным пространствам имен, ссылка не генерируется, отображается только иконка.
}}


Connect with
== {{int:Apisandbox-examples}} ==
=== All possible values for parameter "type" ===
{{mbox
|text=<code><nowiki>type=</nowiki></code>''(empty)'' → default ''(synonym to'' <code>notice</code>'')''
}}


Discounts & Savings
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''notice'''</span></code> → for informative messages only
|type=notice
}}


Click to plant trees with your purchase
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''message'''</span></code> → for informative messages only
|type=message
}}


Coupon Codes
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''query'''</span></code> → for minor issues
|type=query
}}


1 Available
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''style'''</span></code> → for cleanup ''(synonym to'' <code>query</code>, ''only different icon)''
|type=style
}}


If codes don’t pop up automatically at checkout, copy the codes below
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''issue'''</span></code> → for larger issues
|type=issue
}}


Apply all
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''content'''</span></code> → for content issues ''(synonym to'' <code>issue</code>'')''
|type=content
}}


GS24SERIES
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''serious'''</span></code> → for serious notices
|type=serious
}}
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''delete'''</span></code> → for deletion notices ''(synonym to'' <code>serious</code>'')''
|type=delete
}}


Get additional ₱2,500 discount at checkout on the Galaxy S24 Series.
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''stop'''</span></code> → for stop and other caution notices, such as frequent issues ''(synonym to'' <code>serious</code>, ''only different icon)''
|type=stop
}}


Copy
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''speedy'''</span></code> → for speedy deletion notices
|type=speedy
}}


i
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''warning'''</span></code> → for urgent notices ''(synonym to'' <code>speedy</code>'')''
|type=warning
}}


Click here to view the T&C’s
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''move'''</span></code> → for move requests
|type=move
}}


{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''protection'''</span></code> → for protection notices ''(synonym to'' <code>message</code>, ''only different icon)''
|type=protection
}}


{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''license'''</span></code> → for licenses
|type=license
}}


As seen on
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''legal'''</span></code> → for legal disclaimers such as {{tl|Trademark}}
|type=legal
}}


By signing in, you agree to data collection and use as described in our Terms Of Use and Privacy Policy
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''honor'''</span></code> → for honors such as featured image
|type=honor
}}


Information Resources
{{mbox
File:Tlh-wiki-logo.png - Wikimedia Commons
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''growth'''</span></code> → for other "good" notices
|type=growth
}}
 
{{mbox
|text=<code><nowiki>type=</nowiki><span style="font-size:110%">'''shit'''</span></code> → for fun ... or for maintenance affairs :) <!-- In loving memory of user:sarang [[Special:Diff/353375588]] Let's keep his humor alive! -->
|type=shit
}}
 
=== Examples with more parameters ===
{{mbox
|text=<code>'''<nowiki>type = </nowiki>'''</code>''(empty)'' and <code>'''<nowiki>style = </nowiki>'''background:#DFF</code>
|type=
|style=background:#DFF
}}
 
{{Mbox
|text = <code>'''<nowiki>type = </nowiki>'''query</code> and <code>'''<nowiki>image = </nowiki>'''<nowiki>[[File:OOjs UI icon alert-yellow.svg|alt=Exclamation mark|40px|class=noviewer]]</nowiki></code>
|type = query
|image = [[File:OOjs UI icon alert-yellow.svg|alt=Exclamation mark|40px|class=noviewer]]
}}
 
{{Mbox
|text = &#8198;<code>'''<nowiki>type = </nowiki>'''query</code> and <code>'''<nowiki>image = </nowiki>'''<nowiki>[[File:Lol exclam.png|alt=Exclamation mark|38px|class=noviewer]]</nowiki></code>
|type = query
|image = [[File:Lol exclam.png|alt=Exclamation mark|38px|class=noviewer]]
}}
 
{{Mbox
|text = <code>'''<nowiki>type = </nowiki>'''issue</code>, <code>'''<nowiki>image = </nowiki>'''<nowiki>[[File:Commons-emblem-hand-orange.svg|alt=Stop hand|45px|class=noviewer]]</nowiki></code> and <code>'''<nowiki>style = </nowiki>'''background:#f7f7f7;</code>
|type = issue
|style = background:#f7f7f7;
|image = [[File:Commons-emblem-hand-orange.svg|alt=Stop hand|45px|class=noviewer]]
}}
 
{{Mbox
|text=<code>'''<nowiki>type = </nowiki>'''message</code>, <code>'''<nowiki>image = </nowiki>'''<nowiki>[[File:Pictogram voting info.svg|20px|class=noviewer]]</nowiki></code> and <code>'''<nowiki>margin =</nowiki> '''0em</code>
|type=message
|image=[[File:Pictogram voting info.svg|20px]]
|margin=0em
|}}
 
{{Mbox
|text=<code>'''<nowiki>type = </nowiki>'''growth</code>, <code>'''<nowiki>image = </nowiki>'''none</code> and <code>'''<nowiki>style = </nowiki>'''margin:10px 0 10px 0</code> <small>(top right bottom left)</small>
|type=growth
|image=none
|style=margin:10px 0 10px 0
|}}
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[Category:Style formatting templates]]
[[Category:Message box templates]]
}}</includeonly>

Revision as of 08:55, 18 March 2024

This is used to create message boxes.

Usage

{{Mbox
 |text =
 |type =
 |image =
}}

Template parameters

ParameterDescriptionDefaultStatus
texttextThe text to be displayed.emptyrequired
typetypeChanges the color depending on the message needed. Each has its own preset image, see #Examplesnoticeoptional
imageleft imageOverride the image (“none” for no image). Use format: [[File:Commons-emblem-urgent.svg|class=noviewer|48px]]. The default depends on the type.emptyoptional
imagerightright imageShow an image on the right side, similar to the left one (but empty by default).emptyoptional
textstyletext styleOverride/augment default style of text cell (e.g. alignment — text-align:left; / text-align:right; / text-align:center;).emptyoptional
stylebox styleOverride/augment default style of the whole message box.emptyoptional
classbox classAugment default CSS classes of the whole message box. Particularly useful if your template uses TemplateStyles.emptyoptional
langlanguageSet the language of the text – it's important for right-to-left languages: their image is on the right and imageright is on the left. It helps assistive software (e.g. screen readers) even in left-to-right languages.emptyoptional
widthbox widthSet the width of the box (avoid using it, 80% for example is too large as it leaves only 10% of the page content width for the left/right margins where there may be floating elements generally large of about 250px: if this occurs the Mbox will be displayed at a much lower position on the page, as if there was a "clear:both", so Mbox may not be immediately visible without scrolling down the page with a huge blank space in the middle and all the rest of the page after the Mbox will be also invisible without scrolling). Instead, use the "margin" parameter to set horizontal margins. To avoid the centering, and/or the thick left border, modify e.g. “style=margin-left:0;border-left:2px solid #F4C430”autooptional
marginhorizontal marginSet the horizontal margin of the box (by default it is "auto" if a legacy width is specified, otherwise it is "10%").10%optional
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

This is used to create message boxes.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
box classclass

Augment default CSS classes of the whole message box. Particularly useful if your template uses TemplateStyles.

Lineoptional
left imageimage

Override the image (“none” for no image). Use format: [[File:Commons-emblem-urgent.svg|class=noviewer|48px]]. The default depends on the type.

Contentoptional
right imageimageright

Show an image on the right side, similar to the left one (but empty by default).

Contentoptional
languagelang

Set the language of the text – it's important for right-to-left languages: their image is on the right and imageright is on the left. It helps assistive software (e.g. screen readers) even in left-to-right languages.

Lineoptional
horizontal marginmargin

Set the horizontal margin of the box (by default it is "auto" if a legacy width is specified, otherwise it is "10%").

Default
10%
Lineoptional
box stylestyle

Override/augment default style of the whole message box.

Lineoptional
texttext

The text to be displayed.

Contentrequired
text styletextstyle

Override/augment default style of text cell (e.g. alignment — text-align:left; / text-align:right; / text-align:center;).

Lineoptional
typetype

Changes the color depending on the message needed. Each has its own preset image, see the template documentation.

Default
notice
Lineoptional
box widthwidth

Set the width of the box (avoid using it, 80% for example is too large as it leaves only 10% of the page content width for the left/right margins where there may be floating elements generally large of about 250px: if this occurs the Mbox will be displayed at a much lower position on the page, as if there was a "clear:both", so Mbox may not be immediately visible without scrolling down the page with a huge blank space in the middle and all the rest of the page after the Mbox will be also invisible without scrolling). Instead, use the "margin" parameter to set horizontal margins. To avoid the centering, and/or the thick left border, modify e.g. “style=margin-left:0;border-left:2px solid #F4C430”

Default
auto
Lineoptional

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

See also

Localization

This template is not intended to be localized.

⧼Note⧽

The icon displayed in the message box is clickable and drives to Commons (to see its attributions), but only when the message box is displayed in a "Template:" page (including their talk pages). When the template is displayed in a page belonging to all other namespaces, no link is generated, only the icon is visible directly.

Examples

All possible values for parameter "type"

Examples with more parameters


Cookies help us deliver our services. By using our services, you agree to our use of cookies.