Template talk:Attack

Usage

 * You can use Article to substitute the contained ParserFunctions.

Request for edit of template.
Editprotected

I would like to request that this section:

====

be changed as follows:

====

The template is currently broken and displays a 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. ).  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 - m t  16:31, 23 January 2008 (UTC)


 * 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)


 * 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)


 * I've fixed the issue of a missing parameter 1 - the rest needs more discussion. —Random832 16:52, 23 January 2008 (UTC)


 * 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)

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

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


 * 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  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   variable as you describe it would require another #if loop in order to allow the setting of an article parameter to remain optional:

==}}


 * 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   functionality, I think the best you can hope for is something like this:


 * Naturally, this will only substitute the inner #if loop, and then only if the  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   variable and be called with   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  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 ==


 * However, if you can live with leaving a single #if loop in the wikitext, then the version with the  variable above should be used. -- jonny - m  t  05:41, 24 January 2008 (UTC)


 * 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)

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)

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)

Request for changes
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)
 * Reverted to last version (i swear, though, it worked when I tried it) —Random832 21:00, 25 January 2008 (UTC)
 * I'll look at this more this weekend. —Random832 21:01, 25 January 2008 (UTC)
 * Best of luck, hope you figure it out! Icestorm815 (talk) 03:12, 26 January 2008 (UTC)

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, especially those in violation of our Biographies of living persons policy, will be blocked from editing Wikipedia. Thank you.

problems
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)

Request for addition
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)


 * ✅. 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)

Wikipedia:BLP
editprotected Hi there. Could we please pipe  into   just to help the text flow a bit better. Thanks - Kingpin13 (talk) 15:41, 3 October 2009 (UTC)
 * ✅ —  Jake   Wartenberg  16:50, 3 October 2009 (UTC)
 * Thanks Jake - Kingpin13 (talk) 17:56, 3 October 2009 (UTC)

Substing
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)
 * ✅, and fixed another as well I think. Could you test it and let me know if it's not working correctly? &mdash; Martin (MSGJ · talk) 11:56, 11 November 2009 (UTC)
 * Yeah, the second one is also substed now. Thanks :) - Kingpin13 (talk) 14:29, 11 November 2009 (UTC)

Proposed deletion
editprotected Please add the following to the top of the page: --Bsherr (talk) 23:29, 18 September 2010 (UTC)


 * 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. Hers fold  (t/a/c) 03:44, 19 September 2010 (UTC)
 * 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)
 * 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)