Jump to content

Template talk:Warning message

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 2 years ago by Xaosflux in topic Protected edit request on 19 May 2022

Editprotected request

[edit]

{{editprotected}} Please use the new #safesubst:, as so:

{| class="messagebox plainlinks user-block" style="margin-left:0; padding:5px; background:#F9F9F9; {{{CSS-box|}}}"
| {{<includeonly>#safesubst:</includeonly>#ifeq:{{{image}}}|none||[[{{{image|File:Stop x nuvola.svg}}}|50px]]}}
| {{{msg}}}
|}

The ParserFunction will be substed when this template is substed, and will remain the same when this template is transcluded. MC10 (TCEM) 04:30, 9 November 2010 (UTC)Reply

Tried it, and that seems to have broken the template (substituting produced an extraneous "none}}" and transclusion simply pasted the template code with "subst:"). Could you test the code in a sandbox first? Jafeluv 10:03, 9 November 2010 (UTC)Reply
Now it should work. I have created Template:Warning message/sandbox and Template:Warning message/testcases. I put an extra # in front of safesubst; it should just be safesubst:, not #safesubst:. The following code should work:
{| class="messagebox plainlinks user-block" style="margin-left:0; padding:5px; background:#F9F9F9; {{{CSS-box|}}}"
| {{<includeonly>safesubst:</includeonly>#ifeq:{{{image}}}|none||[[{{{image|File:Stop x nuvola.svg}}}|50px]]}}
| {{{msg}}}
|}
Cheers, MC10 (TCEM) 03:26, 16 November 2010 (UTC)Reply
Done Jafeluv 09:46, 16 November 2010 (UTC)Reply

Editprotected request

[edit]

{{editprotected}} Is there any way to center this and other templates, ala the rest of the Wikimedia projects? Maybe I've missed something, but it would probably be good to have it look more like other WMF sites when we template things. Kevin Rutherford (talk) 07:41, 23 February 2016 (UTC)Reply

Never liked so much the current design. Have any ideas in mind? Template:Warning message/sandbox. Best regards, —MarcoAurelio 15:36, 25 February 2016 (UTC)Reply
@MarcoAurelio: Maybe using Template:Mbox as a base would work, ala this example on the English Wikipedia. Kevin Rutherford (talk) 15:43, 14 March 2016 (UTC)Reply

Protected edit request on 19 May 2022

[edit]
Extended content
Line 1: Line 1:
{|class={{{otherclass|"messagebox plainlinks user-block" style="margin-left:0; padding:5px; background:#F9F9F9; {{{CSS-box|}}}"}}} {| class={{{otherclass|"messagebox plainlinks user-block" style="margin-left: 0; background: #F9F9F9; padding: 5px; {{{CSS-box|}}}"}}}
| {{<includeonly>safesubst:</includeonly>#ifeq:{{{image}}}|none||[[{{{image|File:Stop x nuvola.svg}}}|50px]]}} | style="padding: 1em;" | {{<includeonly>safesubst:</includeonly>#ifeq:{{{image}}}|none||[[File:{{<includeonly>safesubst:</includeonly>PAGENAME:{{{image|File:Stop x nuvola.svg}}}}}|50px]]}}
| {{{msg}}} | style="padding: 1em;" | {{{msg|}}}
|}<noinclude> |}<noinclude>
{{documentation}}
==Usage==
This template is intended for use inside other templates.

<pre>
{{warning message
|image = Filename.svg
|msg = text here
}}
</pre>

Remove the 'image' parameter to use a default [[File:Stop x nuvola.svg|12px]] icon, or set it to 'none' to have no icon at all.

{{warning templates}}

[[Category:Formatting templates|Warning message]]
</noinclude> </noinclude>

Please replace the content of this template with the sandbox version and move all documentation to the dedicated subpage. I added some padding. NguoiDungKhongDinhDanh 13:40, 19 May 2022 (UTC)Reply

Donexaosflux Talk 13:56, 25 May 2022 (UTC)Reply