[go: nahoru, domu]

Jump to content

Template talk:Editnotice

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

This is an old revision of this page, as edited by Andy M. Wang (talk | contribs) at 16:36, 7 September 2016 (→‎Tracking when editnotices become notices on redirects: small note added). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

New parameter

I'd like to add a new parameter to this template (perhaps |category=) to specify a category used to check usage of the edit notice. For example Category:Pages with editnotice Romeo notice tracks usage of {{Romeo notice}}. Currently this is hard-coded in each template, but I think it could be simpler for this meta template to handle it. — Martin (MSGJ · talk) 19:24, 15 September 2014 (UTC)[reply]

Background colour

I'm working on a warning editbox for an inactive project's talkpage and want the warning pink background to run under the text AND the image. Setting textstyle = #fdd will do it for the text, but not for the image. I've succeeded by substing then replacing the type in the call to fmbox from "editnotice" to "warning". (Example) Could a parameter be added to expose the type of the call to fmbox with a default of "editnotice" and an option of "warning"? Bazj (talk) 13:49, 14 February 2015 (UTC)[reply]

The issue is {{fmbox |type = editnotice, where editnotice sets a transparent background per {{fmbox}}. Looks like the {{fmbox}} editors presumed that editnotices would never have a backgrount but the {{editnotice}} editors added support for background.
We could change |type=editnotice to |type={{{type|editnotice}}}. Then setting |type=warning would set the warning triangle and the pink background.
Discussion? --  Gadget850 talk 14:18, 14 February 2015 (UTC)[reply]
The version I currently have in the sandbox uses :
|{{fmbox
  |type      = {{#ifeq: {{{warning_notice|}}} | warning | warning | editnotice }}
to protect against any other (invalid) values for the fmbox's type. Bazj (talk) 14:36, 14 February 2015 (UTC)[reply]
You say that you are setting textstyle = #fdd - this shouldn't do anything at all, since the |textstyle= parameter is intended for a CSS declaration-list - a semicolon-separated list of valid CSS declarations (with optional whitespace between tokens), and #fdd is not a CSS declaration. --Redrose64 (talk) 18:04, 14 February 2015 (UTC)[reply]
Sorry, should have copied & pasted what I meant to say... | textstyle = background-color: #fdd; Bazj (talk) 18:40, 14 February 2015 (UTC)[reply]
  • Parameter renamed type as suggested. Also included fmbox's "system" type in the same way as "warning". Test cases updated & checked.

{{edit template-protected}} Please copy sandbox to live. Bazj (talk) 15:07, 20 February 2015 (UTC)[reply]

If we are going to do this, I favour Gadget850's simplistic approach. But better still, why not just use {{fmbox}} instead? — Martin (MSGJ · talk) 15:46, 20 February 2015 (UTC)[reply]
I took the wordier approach to prevent invalid types being passed to fmbox. The reason for doing it here is that I intend using it in a shedload of editnotices and it seemed more logical to fix up the editnotice template rather than use fmbox. Having found the peculiarity that a colour could be placed under the text but NOT under the image it seemed the responsible thing to try and fix it. (Edit request on hold pending your reply) Bazj (talk) 16:21, 20 February 2015 (UTC)[reply]

Please copy sandbox to live. Bazj (talk) 22:37, 25 February 2015 (UTC)[reply]

Not done: please establish a consensus for this alteration before using the {{edit template-protected}} template. Hex color codes should be 6 digits, not 3. Also, I don't see the consensus here. I see "let's do this", "no, let's do it like this instead", "yeah, I like that idea better", "no, I'm doing this way instead"... That does not a consensus make. — {{U|Technical 13}} (etc) 14:33, 28 February 2015 (UTC)[reply]
@Bazj: The proposed change won't work as intended, since {{#ifeq}} only takes four parameters; any additional parameters are ignored. This means the fallback type is "system" rather than "editnotice". You may want to use {{#switch}} instead.
@Technical 13: "Hex color codes should be 6 digits, not 3." – Who says that? Also, neither the sandbox nor the live template currently contains any color codes.
SiBr4 (talk) 14:48, 28 February 2015 (UTC)[reply]
Technical 13, I'm aware discussion makes consensus. Unfortunately experience in this thread shows that discussion only starts once I ask for the edit to be executed. Other efforts to get the discussion to progress have failed.
Your summary of the discussion so far rather mis-represents it. I see a series of comments to which I've replied and then met with silence.
  • Gadget850 suggested a pithier parameter name, which I implemented in the sandbox. G850 also suggested some syntax, I already had similar in the sandbox and explained that my version would prevent invalid values being passed through to fmbox. No further comment received on the issue.
  • Redrose64 raised a point about my initial problem, I corrected myself. No further comment received on the issue.
No comment for 6 days - so I raise edit request.
  • MSGJ suggested using fmbox instead. I explained my reasoning. Despite prompting, no further comment received on the issue.
No comment for 3 days - so I raise edit request.
T13, what else would you have me do to establish consensus? I'm happy to wait for the matter to be discussed further, so long as there is some discussion. I'm also aware I still owe you some comments promised at WT:WPT#Participants List regarding your non-consensual edit.
SiBr4 thanks for pointing out the deficiencies in ifeq. Will fix. Bazj (talk) 16:45, 28 February 2015 (UTC)[reply]
Done. Bazj (talk) 17:05, 28 February 2015 (UTC)[reply]
  • SiBr4 As was pointed out by Redrose64 in this comment three-digit hex codes like #F00 for red are a different matter, since they are not recognised by earlier versions of IE.
  • "No further comment" is not the same as "commented as resolved". Have you tried going to the talk page of those editors who raised concerns and asking them if their concern was resolved or addressed? I don't see a consensus to make an edit here. Even your own summary (which differs only slightly from mine and doesn't offer yourself the same amount of WP:AGF that mine did), shows there is no consensus and goes a step further to say that your reply to MSGJ is simply WP:IDHT. Anyways, I won't make this edit for you at this time, but feel free to ask the user's whom objected (two of them are administrators) and are as versed or more so in templates and code as/than I am and would be happy to make a change for you once everything is resolved. Good luck and happy editing! — {{U|Technical 13}} (etc) 20:47, 28 February 2015 (UTC)[reply]
  • background-color:#FDD - I'd like to be able to point you to the location from which I lifted the colour code so that you could fix them. However none of the 6 templates which use that code rings a bell. Widening the search to templates, articles,and user pages throws up 15 matches, none of which is familiar to me, not even User:Technical 13/Scripts/Gadget-codeAnchors.js.
  • I take your point that my suggestion and the pings to elicit further comment have done nothing but stir up apathy. The sandbox has been restored to a copy of live and the testcases relevant only to this change removed. Bazj (talk) 12:51, 2 March 2015 (UTC)[reply]
  • I'm sorry I didn't have time to respond to your earlier comment. I think the underlying request is uncontroversial; it's just the way you were proposing it that seemed to reach disagreement. I've passed the type parameter to fmbox now. If that's all that's required, I think we can mark this as resolved. — Martin (MSGJ · talk) 17:08, 2 March 2015 (UTC)[reply]
Thank you. I've refreshed the sandbox again but left the testcases since the changes weren't relevant to the live version. Bazj (talk) 08:11, 3 March 2015 (UTC)[reply]

Any objections to sync Template:Editnotice/notice/sandbox to live?

@MSGJ: The issue is that the expiry notice for an editnotice as {{Editnotices/Namespace/Module}} is incorrectly pointing to the mainspace page Module rather than a link to, say, the Module namespace. Currently, at {{Editnotice/notice/sandbox}}, I put in special cases for editnotices with a prefix "Template:Editnotices/Group" and "Template:Editnotices/Namespace". (I don't know if there are other special cases.) — Andy W. (talk ·ctb) 07:51, 17 May 2016 (UTC)[reply]

Thanks for fixing this. I don't have time to check your code right now, but will try and find time later today — Martin (MSGJ · talk) 07:55, 17 May 2016 (UTC)[reply]
I'm confident to sync what I have, but I can wait. I did some preliminary testing by switching the prefix and seeing its output, and it looks okay to me. The thing that's left to resolve is whether there are other special cases. — Andy W. (talk ·ctb) 08:01, 17 May 2016 (UTC)[reply]
Looks fine to me. There are no special cases that I'm aware of. (I must say I can't stand all the <!-- --> stuff you've added to the code. But this is just my personal preference.) — Martin (MSGJ · talk) 15:08, 17 May 2016 (UTC)[reply]
Tweaked the code a bit. I don't think your code would work for subpages (e.g. Template:Editnotices/Group/Template:Taxonomy/preload). Please check my revised code. Regards — Martin (MSGJ · talk) 15:13, 17 May 2016 (UTC)[reply]
@MSGJ: Further tweaks. If we don't have a default case, no need to print "(for )". I'm planning on syncing in about 12 hours. Thanks for the review! — Andy W. (talk ·ctb) 16:41, 17 May 2016 (UTC)[reply]
Live. I left the prefix to check the full 2 base levels to avoid a weird case like "User:Example/Namespace/Module" or something. Thanks for looking this over — Andy W. (talk ·ctb) 05:08, 18 May 2016 (UTC)[reply]
Looking good on pages like Template:Editnotices/Group/Wikipedia:In the news/Candidates and Template:Editnotices/Namespace/TimedText — Andy W. (talk ·ctb) 05:12, 18 May 2016 (UTC)[reply]

Auto-tag G8

@MSGJ, Redrose64, Callanecc, Nyttend, and Amalthea: who were involved at some point in editing the page in question

I have a suggested change for {{Editnotice/notice}} in its sandbox. (Special:Diff/726208381/727286188) What it does: for page and protection editnotices, if the target page does not exist AND is not specially create-protected in any way, we automatically tag it with WP:G8 for deletion. I've tested this in preview mode on Template:Editnotices/Page/Add article (protected) and Template:Editnotices/Page/Addd articlee (and the {{db-g8}} box pops up). It depends on the fact that {{editnotice}} is used in the first place, but should help. Do you think this is a good idea? — Andy W. (talk ·ctb) 23:33, 27 June 2016 (UTC)[reply]

I don't understand parser functions one bit (except for stuff like {{{1}}} being used for fillable parameters), so I can't comment on whether your proposal should be implemented. However, I think the idea itself is great: why shouldn't these pages be auto-tagged, if it's possible? Nyttend (talk) 00:33, 28 June 2016 (UTC)[reply]
Was thinking about this a bit more. The only slight problem might be that the G8s cannot be declined, unless the target page is re-created. — Andy W. (talk ·ctb) 01:24, 28 June 2016 (UTC)[reply]
[Assuming that the template does as designed] Why would this be a problem? I can't understand why you'd want to decline it, unless (1) the page shouldn't have been deleted, in which case undeletion or recreation is correct, or (2) the editnotice somehow needs to be moved to a new title. Do we ever intentionally have editnotices for nonexistent pages, e.g. "Template:Editnotice/Willy on wheels" existing with a message of "Don't create this page. We mean it!" I can't see why we'd do that, since there's no real point to saying "Don't create this title", unless the page has been recreated so many times that we should protect it. Nyttend (talk) 01:35, 28 June 2016 (UTC)[reply]
Salt detection prevents db-g8 from showing up at Template:Editnotices/Page/Enter your new article name here, for example. And actually, the "decline" problem is not too bad (sometimes I have lapses). The 4 ways to decline: 1. recreate the target; 2. blank the notice; 3. use an fmbox instead; 4. salt the target. — Andy W. (talk ·ctb) 03:39, 28 June 2016 (UTC)[reply]
I think we're in agreement here; I can't imagine why we'd need an editnotice for an unsalted target, and the protection log excerpt at top will serve the purpose of an editnotice for a salted one. Nyttend (talk) 13:15, 28 June 2016 (UTC)[reply]

Elaborated on rationale. (effective diff) I plan to act on this in a few days unless I hear otherwise. Thanks — Andy W. (talk ·ctb) 18:11, 28 June 2016 (UTC)[reply]

In the "how to decline this tag" bit, you offer "Blank this notice page itself" as an option. Is there a way to force it to produce a link to the editnotice page itself? If I were unfamiliar with editnotices, I wouldn't have a clue how to do this. Nyttend (talk) 20:01, 28 June 2016 (UTC)[reply]
The db-g8 nom is not by default visible on the target page above the edit box. On the editnotice itself, a link wouldn't really be necessary anyway. The link becomes bolded instead, and, override with red text, so there is no link. — Andy W. (talk ·ctb) 21:04, 28 June 2016 (UTC)[reply]
But how am I supposed to blank the editnotice if I'm not familiar with how it works? Maybe we're talking past each other (I don't understand why we can't have a link), but it would help to have the Jerusalem editnotice display a link to https://en.wikipedia.org/w/index.php?title=Template:Editnotices/Page/Jerusalem&action=edit (it would work; it wouldn't be bolded) if Jerusalem is a redlink. Nyttend (talk) 22:26, 28 June 2016 (UTC)[reply]
@Nyttend: Ahh, misunderstood. Applied your suggestion. I'm unaware if it's possible to replace an existing page's contents in the edit box with something else. preload and preloadparams work only for nonexistent pages. Thanks — Andy W. (talk ·ctb) 22:50, 28 June 2016 (UTC)[reply]
Great; thanks! I figured I was misunderstanding a bunch of stuff. Nyttend (talk) 22:52, 28 June 2016 (UTC)[reply]
@Nyttend: I just discovered 2 pages with potential issues (so far). Template:Editnotices/Page/List of Filipino architects and Template:Editnotices/Page/List of Canadian architects appear to be created in advance, expecting a page at the location, due to the existence of a bunch of other "List of * architects". I can see reason to keep them, but it's weak reasoning. What I could do is make a special case for "List of"-prefixed pages. — Andy W. (talk ·ctb) 01:06, 29 June 2016 (UTC)[reply]

Arbitrary break 1

@Nyttend: So the only remaining issue after a scrub through the pseudospace is potentially Template:Editnotices/Page/Wikipedia:Bots/Requests for approval/Approved/sandbox, whose target, "Wikipedia:Bots/Requests for approval/Approved/sandbox" doesn't exist. The title does makes sense though in the scheme of templates. I'm now thinking that a tracking category for editnotices with (unsalted) redlink targets is more appropriate, which I plan to write in a day or two. (A few dozen other issues were CSD resolved, and 3-4 other issues are at MfD, surely to be deleted.) — Andy W. (talk ·ctb) 02:22, 4 July 2016 (UTC)[reply]

Tracking when editnotices become notices on redirects

The current editnotice system is somewhat lacking in awareness when their pages (targets) are moved. 6 weeks back, the introduction of Category:Editnotices with unsalted non-existent targets, which started tracking editnotices that have become unused/unnecessary on red-links, resulted in cleanup of about a dozen pages. I'm proposing a new category, Category:Editnotices whose targets are redirects (or something similar) (self-explanatory name). Many editnotices that would appear in this category may need to be moved, though some, like Template:Editnotices/Page/Giants, are valid.

To track editnotices on redirects, the change would be something like this (with the check returning the category, not the string of course). Let me know if there's any feedback or comments. If none, I'll create the tracking category and update the notice subtemplate. Cheers, — Andy W. (talk ·ctb) 01:01, 31 August 2016 (UTC)[reply]

I have made the notice subtemplate start populating Category:Editnotices whose targets are redirects. Expecting several templates to start popping up. Any questions, let me know :) — Andy W. (talk ·ctb) 00:04, 6 September 2016 (UTC)[reply]
Good idea. Could you also add a note to this effect on Template:Editnotice/notice? Perhaps it could even contain a move link to the editnotice of the target of the redirect. — Martin (MSGJ · talk) 08:35, 6 September 2016 (UTC)[reply]
@MSGJ: Thanks. A note shouldn't be a problem. Though about the move link: I suppose we could add one, but I think there are many examples where a move link might not be appropriate (such as the one for Giants), since they are intended only for the redir page, and to detect this, might need some more expensive parser functions to detect this properly. I'll ponder this, and might get to some of this later in the week as time permits. — Andy W. (talk ·ctb) 16:32, 6 September 2016 (UTC)[reply]
A small note added to the effect, along with some additional logic updates. Could add a move link, but ideally, possibly making it aware an editnotice already exists for the new title (though that could get semantically even heavier on parser functions... not sure) — Andy W. (talk ·ctb) 16:36, 7 September 2016 (UTC)[reply]