Template talk:Attack

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Documentation[edit]

Warning templates should always be used with the "subst:" keyword, as strongly suggested on Wikipedia:Template substitution. They are shown without subst here to reduce the display space occupied by this table, not to encourage their use without subst. For example, type {{subst:uw-vandalism1}}~~~~ (not {{uw-vandalism1}}) to warn common first-time vandals.

The levels of templates are:

  1. Assumes good faith
  2. No faith assumption
  3. Assumes bad faith; stern cease and desist
  4. Assumes bad faith; strong cease and desist, last warning


Usage[edit]

Usage Output
{{subst:Attack}}

Please do not make personal attacks. Wikipedia has a strict policy against personal attacks. Attack pages and images are not tolerated by Wikipedia and are speedily deleted. Users who continue to create or repost such pages and images in violation of our Wikipedia:Biographies of living persons policy will be blocked from editing Wikipedia. Thank you.

{{subst:Attack|Article}}*

Please do not make personal attacks as you did at Article. Wikipedia has a strict policy against personal attacks. Attack pages and images are not tolerated by Wikipedia and are speedily deleted. Users who continue to create or repost such pages and images in violation of our Wikipedia:Biographies of living persons policy will be blocked from editing Wikipedia. Thank you.

Request for edit of template.[edit]

{{Editprotected}}

I would like to request that this section:

{{<includeonly>subst:</includeonly>#if:{{{header|}}}|=={{{header-text|Attacks in the article [[:{{{1}}}]]}}}==}}

be changed as follows:

=={{#if:{{{header|}}}|{{{header}}}|Attacks in {{#if:{{{1|}}}|the article [[:{{{1}}}]]|Wikipedia articles}}}}==

The template is currently broken and displays a {{{1}}} variable in the header if the user applying it does not specify an article to link to; I've fixed that and changed the default text to "Attacks in Wikipedia articles". In addition, should the template be substituted (as it is nominally supposed to be), an extra "subst:" appears in the warning--I understand this was added by User:Graham87, but from reading through m:Migration to the new preprocessor and testing a working page at Special:ParserDiffTest, I can't find a reason why this should be included.

In addition to fixing these problems, this change also adds additional functionality in the form of the header variable, allowing the user applying the template to specify a custom header (e.g. {{subst:Attack|header = Don't be mean.|Articlename}}). It looks like someone tried to add that functionality before but couldn't settle on a variable name.

I've set up a working copy at User:Jonny-mt/Attacktest, so feel free to try it out if you'd like before making the changes. Incidentally, a pre/post changeover comparison of the current page is here, and a similar comparison of my working copy is here. --jonny-mt 16:31, 23 January 2008 (UTC)[reply]

I can't find any indication that the new parser changes anything for the subst - the reason for the extra subst is so that the resulting text is just a plain header rather than a parserfunction; I think the parserdifftext only looks at the fully expanded markup, which wouldn't catch the issue with section edit buttons. —Random832 16:45, 23 January 2008 (UTC)[reply]
{{not done}}, your version doesn't provide for the default case of _not_ including any header at all. I'll look at this later though. —Random832 16:49, 23 January 2008 (UTC)[reply]
I've fixed the issue of a missing parameter 1 - the rest needs more discussion. —Random832 16:52, 23 January 2008 (UTC)[reply]
An explanation: the "header" parameter is a yes-no (well, set vs empty) switch of whether to include a header at all, not a way to specify a custom header. If you want to specify a custom header, you can type your own header and use the template without a header. —Random832 16:55, 23 January 2008 (UTC)[reply]

...or, at least - it's _supposed to_ - any idea why it doesn't? —Random832 16:59, 23 January 2008 (UTC)[reply]

Restoring editprotected tag to get another opinion. —Random832 17:01, 23 January 2008 (UTC)[reply]

Sorry about the delay in getting back to you; I went to bed right after posting (imho, parser code should only be written late at night :P). Let's see if I can't answer some of your concerns:
So first things first--the code above allows for the default case of not providing header text by then including its own text, which takes variable {{{1}}} But since you don't need that, the point is moot.
The good news is there's more fun to be had. Basically, the implementation of a header variable as you describe it would require another #if loop in order to allow the setting of an article parameter to remain optional:
{{#if:{{{header|}}}|==Attacks in #if:{{{1|}}}|the article [[:{{{1}}}]]|Wikipedia articles}}==}}
The problem is that only the inner one of these can be substituted or the whole thing breaks when the parser tries to substitute the outer conditional--from what I can tell, it just evaluates it and leaves behind the resulting text (i.e. the raw code of the second #if conditional). From testing and reading, the ability to substitute nested #if conditionals doesn't seem to be something that will be/has been (I'm GMT+9, so I'm not exactly sure what time this is going live) implemented in the new parser, which means that if you want to retain the header functionality, I think the best you can hope for is something like this:
{{#if:{{{header|}}}|==Attacks in {{{{{subst|}}}#if:{{{1|}}}|the article [[:{{{1}}}]]|Wikipedia articles}}==}}
Naturally, this will only substitute the inner #if loop, and then only if the subst=subst: parameter is set. There is an alternate method, but it requires copying the inner #if loop to a second template, which would itself have a {{{subst}}} variable and be called with subst = within this template. If you're all right with that, I'd be glad to set it up for you.
If that's not so good, then given that the header functionality isn't documented for this template, if substitution of the parser code is important then my honest suggestion would be to simply get rid of it and go with something like this:
==Attacks in {{{{{subst|}}}#if:{{{1|}}}|the article [[:{{{1}}}]]|Wikipedia articles}}==
However, if you can live with leaving a single #if loop in the wikitext, then the version with the header variable above should be used. --jonny-mt 05:41, 24 January 2008 (UTC)[reply]
So first things first--the code above allows for the default case of not providing header text by then including its own text, I don't think you understand - your suggestion does not provide for any way for the template not to emit a header at all, which seems to be what the existing code attempts to do. —Random832 14:47, 24 January 2008 (UTC)[reply]

I've implemented something that seems to work well with the parser in use right now (which I've been told is actually the new one, on en.wikipedia at least). —Random832 14:57, 24 January 2008 (UTC)[reply]

Incidentally, the reason for this trickery is not to prevent any parser code from showing up in the wikitext at all, it is to guarantee that _if_ there is a header visible on the page, with a section edit link, that section edit link will go to the correct section (i.e. _header_ wikitext, the ==== markup, has to show up in the resulting raw wikitext - the rest isn't as important.) —Random832 15:00, 24 January 2008 (UTC)[reply]

Request for changes[edit]

{{Editprotected}} Random832 made changes to the template, however, there seems to be a mistake as the header does not work as shown below. Icestorm815 (talk) 20:24, 25 January 2008 (UTC)[reply]

Reverted to last version (i swear, though, it worked when I tried it) —Random832 21:00, 25 January 2008 (UTC)[reply]
I'll look at this more this weekend. —Random832 21:01, 25 January 2008 (UTC)[reply]
Best of luck, hope you figure it out! Icestorm815 (talk) 03:12, 26 January 2008 (UTC)[reply]

Attacks in {{{{{subst2}}}#if:Siddharth Gupta|the article Siddharth Gupta|Wikipedia articles}}[edit]

Please do not make personal attacks as you did at Siddharth Gupta. Wikipedia has a strict policy against personal attacks. Attack pages and images are not tolerated by Wikipedia and are speedily deleted. Users who continue to create or repost such pages and images, especially those in violation of our Wikipedia:Biographies of living persons policy, will be blocked from editing Wikipedia. Thank you.

problems[edit]

There are issues with the new parser that are causing problems with all user warning templates; I'm not going to be able to do this until that is fixed. —Random832 02:42, 27 January 2008 (UTC)[reply]

Request for addition[edit]

{{editprotected}} I would like to know if it is possible to add an image to the template, as to the right of the first line to allow it to attract attention, as other warning templates have. Thank you. ←Signed:→Mr. E. Sánchez Get to know me! / Talk to me!←at≈:→ 14:56, 14 November 2008 (UTC)[reply]

 Done. If Image:Stop hand.svg would be preferred, I think that would be fine as well. Huntster (t@c) 03:06, 15 November 2008 (UTC)[reply]

Wikipedia:BLP[edit]

{{editprotected}} Hi there. Could we please pipe [[Wikipedia:Biographies of living persons]] into [[Wikipedia:Biographies of living persons|biographies of living persons]] just to help the text flow a bit better. Thanks - Kingpin13 (talk) 15:41, 3 October 2009 (UTC)[reply]

 DoneJake Wartenberg 16:50, 3 October 2009 (UTC)[reply]
Thanks Jake - Kingpin13 (talk) 17:56, 3 October 2009 (UTC)[reply]

Substing[edit]

{{editprotected}} Hello again :). Could we subst the page title link in the header (parameter1) as shown here. Best, - Kingpin13 (talk) 10:45, 11 November 2009 (UTC)[reply]

 Done, and fixed another as well I think. Could you test it and let me know if it's not working correctly? — Martin (MSGJ · talk) 11:56, 11 November 2009 (UTC)[reply]
Yeah, the second one is also substed now. Thanks :) - Kingpin13 (talk) 14:29, 11 November 2009 (UTC)[reply]

Proposed deletion[edit]

{{editprotected}} Please add the following to the top of the page:

<noinclude>{{db-t3|~~~~~|uw-npa2}}</noinclude>

--Bsherr (talk) 23:29, 18 September 2010 (UTC)[reply]

Rather than make the actual edit (which seems somewhat unnecessary given that I may as well delete the thing if I agree), I'm going to decline the speedy on the grounds that this isn't covered by the npa series of templates; it's either the {{uw-biog}} or {{uw-defamatory}} series, although I'm not totally sure which. I'd recommend taking this to TFD for discussion. Also, since this template is always substed, it's hard to know if it's not being used or not. Hersfold (t/a/c) 03:44, 19 September 2010 (UTC)[reply]
Got it. I was relying on the WikiProject User Warnings recommendation, but it looks like the template is mislabeled as a test template. No need to TfD. I'll make the modifications. --Bsherr (talk) 04:32, 19 September 2010 (UTC)[reply]
Actually, looking at the log for the page, it appears that moves have occured making the version on the page different from the version that originally accompanied the documentation. --Bsherr (talk) 04:35, 19 September 2010 (UTC)[reply]