Template:Archive is permanently
protected from editing because it is a
heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by
consensus, editors may use {{
edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or
categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases.
This is the
talk page for discussing improvements to the
Archive template.
If you go to an archived notice board discussion with {{Archive}}, like
this one. The template's link text changes from "current talk page" to "current main page", and it switches from calling the yellow {{Tmbox}} to the grey {{Mbox}}. It is using {{Namespace detect}} to make both switches. Can this template do the same? (I'm posting in this thread because it is a similar issue and in case anyone is subscribed) @
Andrybak and
Hilst: pinging you guys for expertise.
Rjjiii (
talk)
12:42, 23 July 2024 (UTC)reply
Thanks,
Hilst! I've pushed this live. On actual archives it looks fine:
Talk:Afghanistan/Archive_6, and it now renders grey like {{Archive}} does in mainspace. At the top of
Template:Automatic archive navigator it uses the grey {{tmbox}} (which makes sense as it's not a talk page). Is there a way to get the yellow rendering in the template's example like on
Template:Archive? I think this would more clearly signal to editors that they're in the right place. I hope I'm not putting too much on your plate; there's just a good bit here that's over my head.
Rjjiii (
talk)
00:32, 24 July 2024 (UTC)reply
Done! The implementation is not as neat as the one in {{Archive}} since we don't have <noinclude> on modules, but it should work. Please remember to remove "/sandbox" from
line 135 when pushing it to the live version. –
Hilst (
talk |
contribs)
13:12, 24 July 2024 (UTC)reply
@
Hilst: I copied the live version of this template to
Template:Archive/sandbox and copied the testcases over to
Template:Archive/testcases. I started to look into issues, but realized it would be more productive to just reach out. I copied the module over to
Module:Archive, and invoked it from {{Archive/sandbox}}. The banner always renders as {{aan}} would render, on its own, as if the module isn't seeing any parameters. If I copy the text from the sandbox and just invoke it inline, it works fine. The two examples below both have the same |prev= and |next= parameters from the testcases page:
@
Rjjiii: It's been fixed!
Line 352 was the one causing the problem, since it was trying to get the parameters from Aan. PS: The examples above are making it so I can't add a new section or reply to you quickly, can you remove them? –
Hilst (
talk |
contribs)
19:54, 26 July 2024 (UTC)reply
@
Hilst: I've commented them out, sorry about that. I should have been more patient; I changed that line just before posting, but maybe didn't wait long enough for the change to take effect. The box is still grey for me at the template page
Template:Archive/sandbox, but this is likely the same issue where I'll just have to wait a minute.
I'm going to start merging the templates' documentation next. On that note, is a |1= parameter meant to do something for this template? The docs say it suppresses a message, but using it seems to have no effect. And I don't know why it would be desirable to hide the message? {{Archive}} uses it to define a custom link for the main page, but I'm struggling to find a page that uses that in a useful way.
It's still grey because the line is pointing to the main template, not the sandbox.
The message only gets suppressed if the first parameter is 1, i.e. {{
Automatic archive navigator|1}}. It's a leftover from an old template that was previously merged into this one. It can probably be changed to how the parameter works on {{Archive}}, but I'd rather keep it how it works right now, for compatibility reasons. (Also, how many peopl realistically click that link?
Yeah, that's what I had in mind too. On a different note,
Module:Archive should probably be deleted in favor of
Module:Automatic archive navigator being moved to that title, since I'd like to keep its revision history intact.
"1=1" suppresses the message sounds good. I'll try to make it more clear in the /doc page. A parameter to change the link target really doesn't make much sense.
Once the testing module is deleted, I'll move the proper module over to
Module:Archive and make the same name changes. I'll have to go ahead and convert this template into a redirect so that it continues to work as intended. Thanks again,
Hilst,
Rjjiii (
talk)
21:44, 26 July 2024 (UTC)reply
@
Hilst: I'm looking over the doc page to do the merged one. There's a bit that seems wrong. It says "| style (minor warning) / notice (messages)" give the same effect as on {{tmbox}}. "|type=notice", "|style=notice", "|notice", and "|1=notice" all seem to do nothing in this template. Should this be removed or is the meaning unclear?
Rjjiii (
talk)
00:31, 27 July 2024 (UTC)reply
"style" and "notice" in this case mean the special types listed at
Template:Tmbox § Talk page message box types. It's supposed to be passed to {{Automatic archive navigator}} through |type=, but it seems like that functionality was not coded in (or only existed in a previous version). I've added it to the sandbox, so writing something like {{Aan|type=speedy}} will now give you a *very* menacing header. (Though I'm not sure if we should allow people to do that.) –
Hilst (
talk |
contribs)
00:50, 27 July 2024 (UTC)reply
I checked archive.org, and the parameter has done nothing for years.
[1] I think your sandbox version is what the doc intended, but I can't see how that's valuable. Especially when the free-form style parameters already allow changing the colors. I'm merging the two template nows and will archive this talk page soon.
Rjjiii (
talk)
01:07, 27 July 2024 (UTC)reply
Thanks for the ping :) I've manually updated all my archive pages, so I should be in the clear now. While I was at it, I went in and updated
SirFozzie as well. He's not going to mind! -
Alisontalk03:16, 22 July 2024 (UTC)reply
Oh, shoot, sorry about that. I appreciate the work you put in and your patience with my questions. (I moved that talk page over to
Template talk:Archive/Archive 2 here since it contains discussions about the current code base of the template.)
Rjjiii (
talk)
01:21, 27 July 2024 (UTC)reply
Template-protected edit request on 28 July 2024
This
edit request to
Module:Archive has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.
Yes, but I will have to be pinged about it later, because I am too tired at the moment to commit to some big-ass thing where I have to sit around for half an hour and make sure I do not break everything. jp×
g🗯️21:40, 28 July 2024 (UTC)reply
@
Hilst: I've done the above and also moved over the /doc and /sandbox pages. There are two sets of testcases pages that I haven't moved over yet.
[5] None of these are template-protected, but if you don't feel comfortable moving them, I can move these also. @
JPxG: I did the changes requested above. Because moving a module leaves a redirect behind,
Module:Automatic archive navigator editsection will continue to function as it did before; you can update whenever you wish. I had reached out because I've been avoiding messing with any of the custom userspace headers while merging these templates;
some are pretty complex and specific-to-the-person.
Rjjiii (
talk)
20:18, 29 July 2024 (UTC)reply