https://wiki.sf.org.au/index.php?title=Template:Ambox/doc&feed=atom&action=history Template:Ambox/doc - Revision history 2022-08-15T06:23:59Z Revision history for this page on the wiki MediaWiki 1.30.0 https://wiki.sf.org.au/index.php?title=Template:Ambox/doc&diff=2363&oldid=prev Thomas Bull: copy/paste from Wikipedia (most relevant part of a documentation page) 2011-01-26T00:44:29Z <p>copy/paste from Wikipedia (most relevant part of a documentation page)</p> <p><b>New page</b></p><div>This is the {{tl|ambox}} or '''article message box''' meta-template.<br /> <br /> It is used to build ''article message box'' templates such as {{tl|wikify}}. It offers several different colours, uses default images if no image parameter is given and it has some other features.<br /> <br /> This meta-template uses the ambox CSS classes in [[MediaWiki:Common.css]]. The classes can also be used directly in a [[Help:Table|wikitable]] if special functionality is needed. See the [[Wikipedia:Ambox CSS classes|how-to guide]] for that.<br /> <br /> === Usage ===<br /> <br /> Simple usage example:<br /> <br /> &lt;pre&gt;<br /> {{ambox | text = Some text.}}<br /> &lt;/pre&gt;<br /> <br /> {{ambox | text = Some text.}}<br /> <br /> Complex example:<br /> <br /> &lt;pre&gt;<br /> {{ambox<br /> | type = style<br /> | small = left<br /> | image = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]<br /> | smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]<br /> | textstyle = color: red; font-weight: bold; font-style: italic;<br /> | text = Text for a big box, for the top of articles.<br /> | smalltext = Text for the top of article sections.<br /> }}<br /> &lt;/pre&gt;<br /> <br /> {{ambox<br /> | type = style<br /> | small = left<br /> | image = [[File:Emblem-question-yellow.svg|40px|alt=Question mark]]<br /> | smallimage = [[File:Emblem-question-yellow.svg|20px|alt=Question mark]]<br /> | textstyle = color: red; font-weight: bold; font-style: italic;<br /> | text = Text for a big box, for the top of articles.<br /> | smalltext = Text for the top of article sections.<br /> }}<br /> <br /> But you are not really supposed to use red bold italic text.<br /> <br /> === Article message box types ===<br /> <br /> The following examples use different '''type''' parameters but use no image parameters thus they use the default images for each type.<br /> <br /> {{ambox<br /> | type = speedy<br /> | text = type=&lt;u&gt;speedy&lt;/u&gt; – Speedy deletion issues, such as {{tl|db-g1}} and {{tl|db-g3}}.<br /> }}<br /> {{ambox<br /> | type = delete<br /> | text = type=&lt;u&gt;delete&lt;/u&gt; – Deletion issues, such as {{tl|afd}} and {{tl|prod}}.<br /> }}<br /> {{ambox<br /> | type = content<br /> | text = type=&lt;u&gt;content&lt;/u&gt; – Content issues, such as {{tl|POV}} and {{tl|globalize}}.<br /> }}<br /> {{ambox<br /> | type = style<br /> | text = type=&lt;u&gt;style&lt;/u&gt; – Style issues, such as {{tl|cleanup}} and {{tl|wikify}}.<br /> }}<br /> {{ambox<br /> | type = notice<br /> | text = type=&lt;u&gt;notice&lt;/u&gt; – Article notices, such as {{tl|current}} and {{tl|inuse}}.<br /> }}<br /> {{ambox<br /> | type = move<br /> | text = type=&lt;u&gt;move&lt;/u&gt; – Merge, split and transwiki proposals, such as {{tl|split}} and {{tl|copy to wiktionary}}.<br /> }}<br /> {{ambox<br /> | type = protection<br /> | text = type=&lt;u&gt;protection&lt;/u&gt; – Protection notices, such as {{tl|pp-vandalism}} and {{tl|pp-semi-protected}}.<br /> }}<br /> <br /> === Other images ===<br /> <br /> 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.<br /> <br /> {{ambox<br /> | type = content<br /> | image = [[File:Unbalanced scales.svg|40px|link=|alt=]]<br /> | text = type = content &lt;br&gt; image = &lt;nowiki&gt;[[File:Unbalanced scales.svg|40px|link=|alt=]]&lt;/nowiki&gt; &lt;br&gt; This image is often used for {{tl|POV}} and similar issues.<br /> }}<br /> {{ambox<br /> | type = style<br /> | image = [[File:Wikitext.svg|50px|link=|alt=]]<br /> | text = type = style &lt;br&gt; image = &lt;nowiki&gt;[[File:Wikitext.svg|50px|link=|alt=]]&lt;/nowiki&gt; &lt;br&gt; This image is often used for {{tl|wikify}} etc.<br /> }}<br /> {{ambox<br /> | type = move<br /> | image = [[File:Merge-arrows.svg|50px|link=|alt=]]<br /> | text = type = move &lt;br&gt; image = &lt;nowiki&gt;[[File:Merge-arrows.svg|50px|link=|alt=]]&lt;/nowiki&gt; &lt;br&gt; This image is used for {{tl|merge}} etc.<br /> }}<br /> <br /> === More examples ===<br /> <br /> Some other parameter combinations.<br /> <br /> {{ambox<br /> | text = No type and no image given ('''default''')<br /> }}<br /> {{ambox<br /> | image = none<br /> | text = No type and '''image=none''' – No image is used and the '''text''' uses the whole message box area.<br /> }}<br /> <br /> {{ambox<br /> | image = [[File:Gnome globe current event.svg|42px|alt=Clock over a larger globe]]<br /> | imageright = [[File:Nuvola apps bookcase.svg|40px|alt=Three stacked books]]<br /> | text = image = &lt;nowiki&gt;[[File:Gnome globe current event.svg|42px|alt=Clock over a larger globe]]&lt;/nowiki&gt; &lt;br&gt; imageright = &lt;nowiki&gt;[[File:Nuvola apps bookcase.svg|40px|alt=Three stacked books]]&lt;/nowiki&gt;<br /> }}<br /> <br /> {{ambox<br /> | image = [[File:Gnome globe current event.svg|42px|alt=Clock over a larger globe]]<br /> | imageright = [[File:Shuttle.svg|20px|link=|alt=]]<br /> | text = '''This article or section documents a current [[spaceflight]].'''<br /> &lt;br&gt;Content may change as the mission progresses.<br /> }}<br /> <br /> === Parameters ===<br /> <br /> List of all parameters:<br /> <br /> &lt;pre&gt;<br /> {{ambox<br /> | type = speedy / delete / content / style / notice / move / protection<br /> | image = none / [[File:...|40px|...]]<br /> | imageright = [[File:...|40px|...]]<br /> | style = CSS values<br /> | textstyle = CSS values<br /> | text = The message body text.<br /> | small = {{{small|}}} / left<br /> | smallimage = none / [[File:...|20px|...]]<br /> | smallimageright = none / [[File:...|20px|...]]<br /> | smalltext = A shorter message body text.<br /> }}<br /> &lt;/pre&gt;<br /> <br /> '''type'''<br /> :If no '''type''' parameter is given the template defaults to type '''notice'''. That means it gets a blue side bar.<br /> <br /> '''image'''<br /> :'''No parameter''' = If no '''image''' parameter is given the template uses a default image. Which default image it uses depends on the '''type''' parameter.<br /> :'''An image''' = Should be an image with usual wiki notation. Widths of 40px - 50px are usually about right. (Images over 52 pixels wide will cause padding problems.)<br /> :: Often an icon is [[Wikipedia:Alternative text for images#Purely decorative images|purely decorative]] in the W3C sense that it repeats the text. To improve [[Wikipedia:Accessibility|accessibility]], it is desirable to not have it be announced by [[screen reader]]s, as well as to avoid it linking to an irrelevant page. If (and only if) the image license allows this, it can be marked with &quot;{{para|link}}{{para|alt}}&quot;. For example:<br /> :::&lt;code&gt;&lt;nowiki&gt;image = [[File:Unbalanced scales.svg|40px|link=|alt=]]&lt;/nowiki&gt;&lt;/code&gt;<br /> :: Conversely, an icon that does not use &quot;{{para|link}}{{para|alt}}&quot;, and which therefore is announced to visually impaired readers, should use an &quot;{{para|alt|&lt;var&gt;[[Wikipedia:Alternative text for images|alt text]]&lt;/var&gt;}}&quot; parameter that describes the icon. With no {{para|link}} parameter (using the default link), the alt text should describe the icon's visual appearance. For example:<br /> :::&lt;code&gt;&lt;nowiki&gt;image = [[File:Gnome globe current event.svg|40px|alt=Clock over a larger globe]]&lt;/nowiki&gt;&lt;/code&gt;<br /> :: With a nonempty &quot;{{para|link|&lt;var&gt;Page&lt;/var&gt;}}&quot; the alt text should describe the icon's function. For example:<br /> :::&lt;code&gt;&lt;nowiki&gt;image = [[File:Purple question mark.svg|40px|link=Special:Random|alt=Random article]]&lt;/nowiki&gt;&lt;/code&gt;<br /> :: An icon whose license requires attribution may have alt text, but ''must keep the default link''. Although public domain images do not require a link, many licenses do require one. Please see ''[[Wikipedia:Alternative text for images#Purely decorative images|Purely decorative images]]'' for more information about licensing.<br /> :'''none''' = Means that no image is used.<br /> :&lt;s&gt;'''blank'''&lt;/s&gt; = This parameter is now deprecated. If you see it in use, change it to &quot;image=none&quot;.<br /> <br /> '''imageright'''<br /> :'''No parameter''' = If no '''imageright''' parameter is given then no image is shown on the right side.<br /> :'''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:<br /> ::&lt;code&gt;&lt;nowiki&gt;imageright = [[File:Nuvola apps bookcase.png|40px|alt=Three stacked books]]&lt;/nowiki&gt;&lt;/code&gt;<br /> :'''Anything''' = Any other object that you want to show on the right side.<br /> <br /> '''style'''<br /> :Optional [[Cascading Style Sheets|CSS]] values used by the entire message box table. Without quotation marks &lt;code&gt;&quot; &quot;&lt;/code&gt; but with the ending semicolons &lt;code&gt;;&lt;/code&gt;. For example:<br /> ::&lt;code&gt;style = margin-bottom: 0.5em;&lt;/code&gt;<br /> <br /> '''textstyle'''<br /> :Optional [[Cascading Style Sheets|CSS]] values used by the text cell. For example:<br /> ::&lt;code&gt;textstyle = text-align: center;&lt;/code&gt;<br /> <br /> '''text'''<br /> :The message body text.<br /> <br /> ==== The small parameters ====<br /> <br /> The small article message boxes are meant for the top of sections. Normally they should only contain one or two lines of text.<br /> <br /> '''small'''<br /> :'''left''' = Makes it a smaller left aligned 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 &quot;small=left&quot;. To make it so your template also understands the small parameter you can use this code:<br /> ::&lt;code&gt;&lt;nowiki&gt;small = {{{small|}}}&lt;/nowiki&gt;&lt;/code&gt;<br /> {{ambox<br /> | small = left<br /> | text = small = left<br /> }}<br /> {{ambox<br /> | type = style<br /> | small = left<br /> | text = type = style &lt;br&gt; small = left<br /> }}<br /> <br /> '''smallimage'''<br /> :'''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.<br /> :'''An image''' = Should be an image with usual wiki notation. 20px width is usually about right for boxes with one line of text, while 25px width is usually about right for boxes with two lines of text. For example:<br /> ::&lt;code&gt;&lt;nowiki&gt;smallimage = [[File:Gnome globe current event.svg|20px|alt=Clock over a larger globe]]&lt;/nowiki&gt;&lt;/code&gt;<br /> :'''none''' = Means that no image is used. This overrides any image fed to '''image''', when &quot;small=left&quot;.<br /> {{ambox<br /> | small = left<br /> | image = [[File:Replacement filing cabinet.svg|50px|link=|alt=]]<br /> | smallimage = [[File:Replacement filing cabinet.svg|25px|link=|alt=]]<br /> | text =<br /> small = left &lt;br&gt; image = &lt;nowiki&gt;[[File:Replacement filing cabinet.svg|50px|link=|alt=]]&lt;/nowiki&gt; &lt;br&gt; smallimage = &lt;nowiki&gt;[[File:Replacement filing cabinet.svg|25px|link=|alt=]]&lt;/nowiki&gt;<br /> }}<br /> <br /> '''smallimageright'''<br /> :'''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.<br /> :'''An image''' = Should be an image with usual wiki notation. 20px - 25px width is usually about right. For example:<br /> ::&lt;code&gt;&lt;nowiki&gt;smallimageright = [[File:Nuvola apps bookcase.png|20px|alt=Three stacked books]]&lt;/nowiki&gt;&lt;/code&gt;<br /> :'''Anything''' = Any other object that you want to show on the right side.<br /> :'''none''' = Means that no right side image is used. This overrides any image fed to '''imageright''', when &quot;small=left&quot;.<br /> {{ambox<br /> | small = left<br /> | imageright = [[File:Gnome globe current event.svg|50px|alt=Clock over a larger globe]]<br /> | smallimageright = none<br /> | text =<br /> small = left &lt;br&gt; imageright = &lt;nowiki&gt;[[File:Gnome globe current event.svg|50px|alt=Clock over a larger globe]]&lt;/nowiki&gt; &lt;br&gt; smallimageright = none<br /> }}<br /> <br /> '''smalltext'''<br /> :A shorter version of the message body text. If no '''smalltext''' parameter is given then this template falls back to use the '''text''' parameter.<br /> <br /> === Technical details ===<br /> <br /> If you need to use special characters in the text parameter then you need to escape them like this:<br /> <br /> &lt;pre&gt;<br /> {{ambox<br /> | text = &lt;div&gt;<br /> Equal sign = and a start and end brace { } work fine as they are.<br /> But here is a pipe &amp;amp;#124; and two end braces &amp;lt;nowiki&gt;}}&amp;lt;/nowiki&gt;.<br /> And now a pipe and end braces &amp;lt;nowiki&gt;|}}&amp;lt;/nowiki&gt;.<br /> &lt;/div&gt;<br /> }}<br /> &lt;/pre&gt;<br /> <br /> {{ambox<br /> | text = &lt;div&gt;<br /> Equal sign = and a start and end brace { } work fine as they are.<br /> But here is a pipe &amp;#124; and two end braces &lt;nowiki&gt;}}&lt;/nowiki&gt;.<br /> And now a pipe and end braces &lt;nowiki&gt;|}}&lt;/nowiki&gt;.<br /> &lt;/div&gt;<br /> }}<br /> <br /> The &lt;code&gt;&amp;lt;div&gt;&lt;/code&gt; tags that surround the text in the example above are usually not needed. But if the text contains line breaks then sometimes we get weird line spacing. This especially happens when using vertical dotted lists. Then use the div tags to fix that.<br /> <br /> This template uses CSS classes in [[MediaWiki:Common.css]] for most of its looks, thus it is fully skinnable.<br /> <br /> This template calls {{tl|ambox/core}} which holds most of the code for {{tl|ambox}}, while {{tl|ambox}} itself does parameter preprocessing.<br /> <br /> Internally this meta-template uses HTML wikimarkup instead of wikimarkup for the table code. That is the usual way we make meta-templates since wikimarkup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and some special characters in parameters.<br /> <br /> 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.<br /> <br /> For more technical details see the [[Template talk:Ambox|talk page]] and the &quot;See also&quot; links below. Since this template works almost exactly like {{tl|tmbox}}, {{tl|imbox}}, {{tl|cmbox}} and {{tl|ombox}} their talk pages and related pages might also contain more details.</div> Thomas Bull
https://wiki.sf.org.au/index.php?title=Template:Ambox/doc&feed=atom&action=history
wiki.sf.org.au
crawl=CC-MAIN-2022-33
19650
application/http; msgtype=response
sha1:FEMJ7KVO3FH36MI3HGCP5YRZFA2S6XBZ
<urn:uuid:10d68cdf-4622-4597-bbdb-0547d7e44439>
2022-08-15T06:24:00Z
173.230.252.29
application/atom+xml
sha1:TWNCS5OQRG3TEVO6XBD5LJPUOTC6E25J
<urn:uuid:56e53f90-90b5-4cae-bf23-5238fe61618c>
https://wiki.sf.org.au/index.php?title=Template:Ambox/doc&feed=atom&action=history
response
<urn:uuid:7686147c-13f4-4324-b685-310b47bc43d7>
isPartOf: CC-MAIN-2022-33
publisher: Common Crawl
description: Wide crawl of the web for August 2022
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-222
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.4-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/