User talk:Aidan9382/Archives/2

Latest comment: 10 months ago by MSGJ in topic Pattern

Bot issue report

Hi there. Your bot (User:Aidan9382-Bot) tried to fix Lowercase Sigmabot III's archive location for Talk:MGM+ after it was moved from Talk:Epix, but the bot got confused by the plus sign and made this edit to Talk:MGM instead. Thanks! InfiniteNexus (talk) 06:19, 15 January 2023 (UTC)

@InfiniteNexus: Sorry, and thanks for the notice. I'll be working on a fix (plus some redundancy most likely), but for now I'll keep the bot offline. Aidan9382 (talk) 08:31, 15 January 2023 (UTC)
Found the time yesterday to sit down and work on this. A lot of stuff has changed internally (mainly request-based stuff), so I'm going to probably have it on supervised for a few days once I finish converting and testing the task script, but it should be back to running soon (and without all the stupid errors). Aidan9382 (talk) 07:17, 23 January 2023 (UTC)
And it's up. Aidan9382 (talk) 07:51, 24 January 2023 (UTC)
Thanks. InfiniteNexus (talk) 23:35, 24 January 2023 (UTC)

As promised...

 

You now have a goat. It's adorable. Enjoy your goat.

Fred Gandt · talk · contribs 07:52, 29 January 2023 (UTC)
Thanks! Aidan9382 (talk) 08:26, 29 January 2023 (UTC)

Invisible edit summary content???

In an edit to the page User talk:JAGAMNADE you gave an edit summary which looks like "Remove promotional edits", but I got a notification that you had mentioned me in the edit summary. After some searching around, I discovered that in what looks like just a space between "Remove" and "promotional" there's an invisible link, and if I click on it, it takes me to my user page. I have never come across this before. How did you do it? JBW (talk) 15:37, 6 February 2023 (UTC)

Ah yes, wikitext fun. The precise edit summary I used was Remove[[User:JBW| ]] promotional edits, which displays like this (you'll notice the magical wikilink to your page in the first space):
Remove promotional edits
I originally tried doing Remove[[User:JBW| ]]promotional edits, but thanks to wikilink logic, that actually moves the wikilink onto both the space and the word "promotional", like the following:
Remove promotional edits
Hope that gives a good rough idea, and glad to see it was as subtle as I'd hoped it was. Aidan9382 (talk) 16:25, 6 February 2023 (UTC)
Yes... Now that you have pointed it out, it's obvious, but I would probably never have thought of it. Obviously if you did it in the content of a page, it would be easy to check how you did it, but as far as I know there's no way of seeing such hidden text in an edit summary. JBW (talk) 22:29, 6 February 2023 (UTC)
As far as I know, the easiest way to get the raw text of an edit summary is to use the Edit summary search tool on the contribs page like so, since any summaries on-wiki are always parsed. Aidan9382 (talk) 07:06, 7 February 2023 (UTC)
Well well... Yet more stuff I didn't know and probably would never have thought of, 🤔 but again straightforward enough once you point it out. ☺️ JBW (talk) 22:53, 7 February 2023 (UTC)

Question

What is the reason to replace "|" with pipemarker in Module:Template parameter value? — Martin (MSGJ · talk) 21:10, 17 February 2023 (UTC)

@MSGJ: The way the module finds a parameter within a template is by finding the assocated key (roughly in the format |%s*KEYNAME%s*=%s*([^|}]+)%s*[|}], though thats an off-the-top-of-the-head regex so don't trust it). The key point here is that the pipe is relied on as a breaking point. However, pipes are used for breaking points in other things, such as a wikilink or a subtemplate, but these don't control our main template's parameters. For that reason, we temporarily replace those unwanted pipes with some string (doesn't really matter what as long as its obscure enough) so that we can find parameters easily, and then just replace our special string with pipes at the end as if nothing happened. The same approach is used within Transcluder's getParameters() function.
I noticed on Qwerfjkl's talk that you mentioned about recoding the module. To be honest, Looking at it myself a bit ago, I felt it needed some attention (quite a few glaring issues with processing which I found during testing). Are you planning on doing this? Aidan9382 (talk) 22:01, 17 February 2023 (UTC)
Thanks, these lua patterns are making my head hurt. I may have a look at that module one day if I can get my head around what's going on! Sounds like you may be better placed to do this than me though :) At the moment I am trying to get Module:WikiProject quality assessment working - if you wouldn't mind taking a look because it currently has the same problem as the other module - it gets parameters from other templates — Martin (MSGJ · talk) 15:41, 18 February 2023 (UTC)
@MSGJ: I'll take it the function you need working is readarticleclass. I'll probably have some spare time within the next few hours, so I'll work on it then. All I can say is that you won't be able to do it with just a single string.match, despite how nice that would be - far too many things to account for in just a single regex without making some assumptions, such as |class= always coming before |1= (which probably isn't true considering how used the WP banner template is). Chances are I'll implement a simplified version of Transcluder's getParameters, since it accounts for all the main edge cases I can imagine, and a minor change to how it finds the template to begin with. Aidan9382 (talk) 16:15, 18 February 2023 (UTC)
@MSGJ: I've implemented an initial draft that should fix a couple of the issues with the previous implementation, such as under capturing (E.g. not finding A from {{WPB|something=whatever|class=A}}), and hopefully just generally improved the integrity of it. I'm not exactly sure where the testcases are at, so I can't give it a proper test run, but it should work, though feel free to touch it up wherever needed. If any of it's a bit confusing, feel free to ask for an explanation.
Also, side note: I noticed you had % escaped some of the pipes in regexs. When it comes to lua, pipes don't actually have meaning, meaning something like ABC|123 matches the literal string ABC|123 instead of ABC or 123. Don't worry, it trips me up a lot too. Theres a helpful guide here on the offical docs for patterns. Aidan9382 (talk) 20:46, 18 February 2023 (UTC)
Brilliant, many thanks. Yes that seems to be working perfectly. When Module:Template parameter value is updated (and callable from a module) then it will be nice to be able to call it with "require". But this is just great for now. Yes, I have a lot to learn on these topics — Martin (MSGJ · talk) 20:56, 18 February 2023 (UTC)
@MSGJ: Well then, in that case, I'll get on that. Quick note though - reading the documentation of {{Template parameter value}} is confusing me. Is args[3] really serving a purpose here? args[5] and args[3] sound very similar (identical??) in purpose (hell, does the purpose of args[5] even make sense? Multiple usages of a parameter within a single template? what happened to DUPEARG?), and I'm not sure whats going on here. Plus, the wording is, weird? Dunno if it's me but I can't make sense of it. My main guess is that args[5] is actually doing the behaviour of what args[3] claims it does and it's just really awkwardly made, but at this point idk. I can't start implementing things until I know what the goal here is, and relying on the code which doesn't exist to to figure it out myself is, well, not exactly possible, so any initial sandbox edits should be taken with a grain of salt. Any ideas? Aidan9382 (talk) 21:40, 18 February 2023 (UTC)
You're right, this is confusing - it looks like a completely different implementation to what we are doing. {{Episode table}} contains multiple instances of {{Episode list}}, so PARAMETER-COUNT is actually looking inside different templates (but still inside the same call of {{Episode table}}). I think the examples on the documentation page explain it clearly. Perhaps this is incompatible with my usage, or perhaps there could be a |look_inside_nested_templates= option parameter, which defaults to yes. — Martin (MSGJ · talk) 22:04, 18 February 2023 (UTC)
@MSGJ: I see what you mean - it does indeed seem to be talking about parameters inside the parent template. Considering the existing version of the module actually captures everything after the first requested template, this feels like an unintended side effect turned into an unstable feature. I'll see if I can manage to hack in something like that nested keys parameter you mention (perhaps something like |ignore_subtemplates= which by default is false? Idk, I'm not good at naming stuff, so do give suggestions).
I've written an initial ideal plan for how a module like this could work on the sandbox, which I'll add this nested parameters logic to now. It should be in a somewhat stable state (assuming my theory code works as my head thinks it does), so do give some suggestions on it if you have any. Also, I noticed on the doc page it listed an associated template, {{Get parameter}}, which seems to be an alternative to {{Template parameter value}} but with different limitations. Ideally, this should remove the need to decide between 2 different templates. Aidan9382 (talk) 22:28, 18 February 2023 (UTC)
@MSGJ: Finished implementing the above into the sandbox. I've tried to recreate the logic behind the template without relying on the same poor behaivour, and I think I've managed to pull it off (minus improper matching, such as matching "Episode list/sublist" when "Episode list" was the requested template - this feels like it'll cause more trouble than good to keep). It also now includes the option to ignore subtemplates by setting either ignore_subtemplates or ist to some form of "yes" (This is different for the module entry point - see the code). It works for all of the testcases provided in the documentation (see here). Opinions? If it seems all fine, I'll probably leave a note on the template's talk page about the new changes and hopefully get it implemented sooner or later into the live version (after a bit more testing). Aidan9382 (talk) 23:14, 18 February 2023 (UTC)
Great! Thanks for this. There is an output of 26 missing from the last example on sandbox3 I think? — Martin (MSGJ · talk) 22:11, 20 February 2023 (UTC)
Oops - forgot that the version of getParameters I used always turned it into a string value for the key, but Transcluder's version could be either string (E.g. |1=5 makes {["1"]=5}) or a number (E.g. |5 makes {[1]=5}). Fixed that locally, though I may see if theres a reason for it being like that in the first place in Transcluder. I'll probably leave a message on the talk for TPV soon, since I imagine the sandbox version is close to completion at this point, and it'd be nice to get it implemented. Hope it helps! Aidan9382 (talk) 08:09, 21 February 2023 (UTC)
Oh and, quick side note, regarding this comment, letter is not undefined - its the letter thats part of the current gsub of %a, meaning it would replace a string like aB12c with [Aa][Bb]12[Cc]. That code seems fine. Aidan9382 (talk) 22:07, 17 February 2023 (UTC)

Hi Aidan! A month of more ago you were kind enough to get the "getparameters" function in Module:WikiProject quality assessment working. I am just wondering whether it would be worthwhile to switch to using Module:Template parameter value after your time spent on that module? — Martin (MSGJ · talk) 21:45, 22 March 2023 (UTC)

@MSGJ: I'd recommend giving Module:Template parameter value a shot, since it has a few extra checks not present in Module:WikiProject quality assessment's implementation. I also intend to add one of the features from this to the TMPV module hopefully soon to fix some rare issues after I'm sure it does what I want it to do (still deciding if it should be a seperate module or not).
As for using TMPV through a module, I've implemented something that should work just fine into WPqa. Feel free to change that however you need to. Aidan9382 (talk) 07:38, 23 March 2023 (UTC)
Thanks, you've got above and beyond as usual. That module (WPQA) will be getting tested thoroughly in the near future so hopefully we should spot anything untoward — Martin (MSGJ · talk) 09:09, 23 March 2023 (UTC)
I'm wondering how easy it would be to use your TMPV module to distinguish between the template being used on the page with a blank or defined parameter, and the template not being used at all. It might be nice if the former produced an empty output and in the latter it was the false boolean. — Martin (MSGJ · talk) 09:31, 26 March 2023 (UTC)
@MSGJ:   Done - It'll now return false if the parameter isn't defined in the target template (empty but existing definitions will still return true). Not sure why I didn't do that originally, but eh. Aidan9382 (talk) 09:41, 26 March 2023 (UTC)
Okay, thanks. Not quite what I was asking but possibly useful for other applications. I'll try and make my request a bit clearer.
  1. {{WikiProject banner shell|class=C}} produces success=true, result="C"
  2. {{WikiProject banner shell|class=}} produces success=true, result="" (or maybe that will break existing uses?)
  3. {{WikiProject banner shell}} produces (I'm not sure, but in my case I would like to lump this in with case 2.)
  4. (Template not used) produced success=false
— Martin (MSGJ · talk) 09:54, 26 March 2023 (UTC)
@MSGJ: Case 1 and 2 are already like how you describe them. Case 3 used to act like case 2, but I've instead made it act like case 4 in this diff, which was what I thought you were asking. Case 4 is already like how you describe it. There's no major concern over breaking existing uses - the only currently existing uses are those through the template entry point, which will return an empty string if it fails anyways, so changing the behaviour of case 3 isn't a major concern here.
If you'd like case 3 to function like case 2, then I can revert it to how it was before. Aidan9382 (talk) 10:03, 26 March 2023 (UTC)
(I am subscribed to this thread so no need to keep pinging.) In that case, sorry for troubling you!! I can see a use case for distinguishing between cases 2 and 3, but in my particular case I am going to treat these as the same. Normally |class= is used as an invitation to add the parameter and rarely an explicit definition to be blank. — Martin (MSGJ · talk) 10:16, 26 March 2023 (UTC)
Hope you don't mind but I've undone that change so it's the same as it was before — Martin (MSGJ · talk) 21:46, 26 March 2023 (UTC)

Template editing

I think this might be useful to you? — Martin (MSGJ · talk) 17:51, 23 February 2023 (UTC)

I've considered it - might apply soon, who knows. I'm just not sure what to consider as "a demonstrated need for the right". Most of my template editing just happens when I see something needing fixing/making, and it isn't always (or often) to TPE protected pages. Aidan9382 (talk) 18:42, 23 February 2023 (UTC)
Well you didn't say no, so I've added to your account as I'm convinced you meet the criteria. Thanks in advance for your future work on templates and modules, and any assistance at User:AnomieBOT/TPERTable would be much appreciated. A standard templated message will appear here shortly. — Martin (MSGJ · talk) 22:04, 23 February 2023 (UTC)
Oh. Well then, thanks! Aidan9382 (talk) 06:37, 24 February 2023 (UTC)
 

Your account has been granted the "templateeditor" user permission, allowing you to edit templates and modules that have been protected with template protection. It also allows you to bypass the title blacklist, giving you the ability to create and edit editnotices. Before you use this user right, please read Wikipedia:Template editor and make sure you understand its contents. In particular, you should read the section on wise template editing and the criteria for revocation.

You can use this user right to perform maintenance, answer edit requests, and make any other simple and generally uncontroversial edits to templates, modules, and edinotices. You can also use it to enact more complex or controversial edits, after those edits are first made to a test sandbox, and their technical reliability as well as their consensus among other informed editors has been established. If you are willing to process edit requests on templates and modules, keep in mind that you are taking responsibility to ensure the edits have consensus and are technically sound.

This user right gives you access to some of Wikipedia's most important templates and modules; it is critical that you edit them wisely and that you only make edits that are backed up by consensus. It is also very important that no one else be allowed to access your account, so you should consider taking a few moments to secure your password.

If you do not want this user right, you may ask any administrator to remove it for you at any time.

If you were granted the permission on a temporary basis you will need to re-apply for the permission a few days before it expires including in your request a permalink to the discussion where it was granted and a {{ping}} for the administrator who granted the permission. You can find the permalink in your rights log.

Useful links

Happy template editing! — Martin (MSGJ · talk) 22:04, 23 February 2023 (UTC)

Page mover granted

 

Hello, Aidan9382. Your account has been granted the "extendedmover" user right, either following a request for it or demonstrating familiarity with working with article names and moving pages. You are now able to rename pages without leaving behind a redirect, move subpages when moving the parent page(s), and move category pages.

Please take a moment to review Wikipedia:Page mover for more information on this user right, especially the criteria for moving pages without leaving a redirect. Please remember to follow post-move cleanup procedures and make link corrections where necessary, including broken double-redirects when suppressredirect is used. This can be done using Special:WhatLinksHere. It is also very important that no one else be allowed to access your account, so you should consider taking a few moments to secure your password. As with all user rights, be aware that if abused, or used in controversial ways without consensus, your page mover status can be revoked.

Useful links:

If you do not want the page mover right anymore, just let me know, and I'll remove it. Thank you, and happy editing! Extraordinary Writ (talk) 23:05, 27 February 2023 (UTC)

CSDs and blanking

Hi Aidan, when you are tagging a page for speedy deletion, please do not blank it (unless it is an attack page). Needing to look through the page's history to even see what was on the page is somewhat of a waste of time for the patrolling admin. Thanks! Primefac (talk) 13:30, 3 March 2023 (UTC)

Alright, I'll keep that in mind. Aidan9382 (talk) 13:34, 3 March 2023 (UTC)

Disruption at Fortaleza Airport

Hi Aidan, thanks for your help as related to Fortaleza Airport. For your information, this person has been causing trouble in the article for years, under many aliases. Actually he/she is the very reason why the article has been permanently protected. (Brunoptsem (talk) 12:01, 15 March 2023 (UTC))

Suspected so after seeing the article's history. Thanks for the notice. If the disruption continues on the talk page, it might be worth requesting temporary protection for the talk page at WP:RFPP. Aidan9382 (talk) 12:08, 15 March 2023 (UTC)
FYI, He/she seems to want to keep the article clear from accidents, even though the listed one (with two sources) is according to Wikipedia:WikiProject Airports guidelines. Perhaps the person in question is from Fortaleza and has its own interpretation of history. Unfortunatelly, the protection of the talk page seems the best strategy at the moment. (Brunoptsem (talk) 12:11, 15 March 2023 (UTC)).

Counter updating

Aidan - you provided this advice (with thanks), which I have done using the null edit and cache clearing several times, but the counter remains stuck.

What about a script or technical look for a bug? I have had the counter present on my page for many years with no need for clearing cache or null editing. I suspect a new bug which began when I updated my editor status to MEIII on 16 Apr. Irregular counter updating since. Thanks again. Zefr (talk) 00:42, 14 May 2023 (UTC)

@Zefr: I've just gone ahead and given your user page a null edit right now, and the counter updated from 26 to 27 days, so a null edit should still continue to fix the counter fine. As for why it stopped updating automatically, I'm not entirely sure. You'll have to ask someone more knowledgable than me on that. Aidan9382 (talk) 06:17, 14 May 2023 (UTC)

Thanks!

Thanks so much for catching this [1]! I must have been far too tired to have been editing last night; when I added the archive I remember getting distracted by a Banner issue and I must've just forgotten to go back. Great work--Jerome Frank Disciple 12:58, 15 May 2023 (UTC)

All good. Lowercase sigmabot III will refuse to archive a page if the target location given isn't a subpage (bar some exceptions), so there's no major issue over getting it wrong. The worst thing that'll happen is the page gets put into this tracking category and either me or other me will fix it. Aidan9382 (talk) 13:56, 15 May 2023 (UTC)
Oh good to know! I'll try to keep an eye on that category, too, and maybe someday pay it forward.--Jerome Frank Disciple 13:59, 15 May 2023 (UTC)
I keep forgetting the name of the category, having to return here to find it, and I'm not very practiced at keeping track of categories in general ... but I just wanted to say that I did manage to pay it forward ... uh, once. Haha sorry to be of no help at all, but thanks again!--Jerome Frank Disciple 15:16, 16 May 2023 (UTC)
Haha, no problem, and thanks. I've got an entire page dedicated to listing categories I keep track of (or used to) among other things, since the only other choice is watchlisting the category and then turning on Category changes in the watchlist, and if I did that, I think my watchlist might just explode.
Just a quick side comment - the fix you linked was mostly fine, although one thing you missed was that the previous page had an unmoved subpage, which I've fixed myself here. I wouldn't lose sleep over that mistake though - you'd be far from the first person (or even the first thousand people) to do it (with the page you fixed in particular having an unfinished move before not once but twice). Aidan9382 (talk) 15:42, 16 May 2023 (UTC)
That's a smart move! And shoot! Well, thanks again for cleaning up my mess: always great to start a section being like "from here on out, I won't create any more work for you—TAKE THAT TO THE BANK", and then fail within 24 hours. I appreciate the patience.
Also, can I ask how you checked for the other archives? I could have sworn that I had thought to check for pre-existing archives after I updated the template. From memory, I went back in the page history to see if an archive was in the pre-updated version of the page (that is, the version of the page that featured the "Talk:2022–2023 abortion protests/Archive %(counter)d" language in the archive template), and I didn't see anything.
It's at least possible I'm misremembering—sometimes I set out to do something, get distracted by another tab, and then forget I never did what I set out to do—so if your reaction is "that would have worked", don't feel bad at all about telling me "you never did that you dummy"--Jerome Frank Disciple 15:55, 16 May 2023 (UTC)
Once again, it's all good. It was quite the minor mess in comparison to some other pages I've seen.
Here's the rough rundown of how I check for other archives. I check the history, find the title the page was moved from, and then check its page information (this page). If "Number of subpages of this page" lists any Redirect or Non-redirect subpages, you can click the link it shows, which takes you here and gives you a list of what may or may not need moving. You can alternatively look in the page history for any archives by bots, which should link the page content was archived to (useful for when the history is all jumbled and the move was a while ago).
I'm a slight bit confused by what you described you did. Do you mean you checked the page originally listed in the archive parameter for old archives? If so, that should've worked, so I'm not entirely sure what you might've done there. If you instead mean you went into the history and viewed an older version of the page, that won't work. The archives listing is normally generated by either {{Talk header}} or {{Archives}}, and both of those will check for subpages under the current title of the page, so it would have actually been looking for archives under the title Talk:2022–2023 United States abortion protests instead of the old title, which of course had none since the archive wasn't moved, and therefore it didn't list them. Aidan9382 (talk) 17:04, 16 May 2023 (UTC)
Thanks so much! Yeah, the second thing is what I did ... I (wrongly) figured that the {{talk header}} template would check for archives under the root as defined in its "archive" parameter. Thank you for the tutorial! --Jerome Frank Disciple 17:09, 16 May 2023 (UTC)
Yeah, {{User:MiszaBot/config}} doesn't actually list any archives itself, it just encourages User:Lowercase sigmabot III to automatically archive the page, so {{Talk header}}'s only real choice without the archive parameter is to check under the current page (which is the standard approach). No problem for the tutorial - if there's a slight bit you're still confused on (or you're just interested on reading up), Help:Archiving a talk page lists about everything there is to know on archiving talk pages. Aidan9382 (talk) 17:16, 16 May 2023 (UTC)

Nomination for deletion of Template:Infobox file display

 Template:Infobox file display has been nominated for deletion. You are invited to comment on the discussion at the entry on the Templates for discussion page. Izno (talk) 08:19, 1 June 2023 (UTC)

Seen, comment left. Aidan9382 (talk) 08:48, 1 June 2023 (UTC)

McLaren Automotive page

Hi! I am trying to update the McLaren Automotive page with new information regarding the management structure of the company. Michael Leiters was appointed July 2022 as Chief Executive Officer for McLaren Automotive (citation: McLaren Newsroom). As one of the most recent Wikignomes to edit the page, I was wondering if you could assist? 86.188.218.211 (talk) 14:00, 2 June 2023 (UTC)

Thanks for the notice, but this isn't an area I'd likely to be able to help on. Aidan9382 (talk) 15:50, 2 June 2023 (UTC)

Default sort

I've just re-read your edit summary here. Do you mean it shouldn't be in the output? I assumed that was a mistake, and it does seem to be working when included in the output. Regards — Martin (MSGJ · talk) 14:23, 6 June 2023 (UTC)

Let me try explain
  • If you attempt to add the default sort by literally appending the text {{DEFAULTSORT:XYZ}} to the output of the function, it will display as raw text when it reaches the page.
  • If you preprocess the {{DEFAULTSORT:XYZ}} text using frame:preprocess (or anything alike), the sort key will be applied to the page the function is called on, and the magic word produces no output. This means that if you append it to the output, you are basically appending an empty string. It doesn't really matter if you append the preprocessed version to the output as long as it is preprocessed. Or at least, that's how it went in my tests using this dummy function.
Does that explain it a bit better? I'm not entirely sure just what you're confused over, so I've tried to explain everything I can think of. Aidan9382 (talk) 15:32, 6 June 2023 (UTC)
Yep, that's clear, thanks — Martin (MSGJ · talk) 15:40, 6 June 2023 (UTC)
Do you think the {{#assessment:}} parser function could be used with the same frame:preprocess method? — Martin (MSGJ · talk) 12:49, 11 June 2023 (UTC)
#assessment: is a new one to me. I've just given it a shot on my sandbox, and the same module magic word logic (Must be processed, but returning it isn't required since it evaluates to an empty string) applies as visible here. Aidan9382 (talk) 13:34, 11 June 2023 (UTC)
Thanks, I'll try it again because it wasn't working on my template sandbox — Martin (MSGJ · talk) 18:20, 11 June 2023 (UTC)
Alright. If you still can't get it to work, I'd be willing to give it a look. Aidan9382 (talk) 18:31, 11 June 2023 (UTC)
Seems to be working, thanks — Martin (MSGJ · talk) 08:02, 12 June 2023 (UTC)

Thanks for your fix. That code was Izno's not mine! But admittedly I never tested it. — Martin (MSGJ · talk) 20:12, 20 June 2023 (UTC)

All good. I only picked it up cause I was testing a sandbox module of mine (Module:Sandbox/Aidan9382/CodeAnalysis) and it picked up that the argument was defined but never used. Everything else seems fine at an initial glance. Aidan9382 (talk) 20:20, 20 June 2023 (UTC)

Re-set my talk page to archive the discussions every 60 days (rather than every 7)

Hello, I re-set my user talk page to archive discussions every 60 days, rather than every 7 (the previous setting)--it was cleaning out the discussions too often. So, I went into the edit and changed |algo = old(7d) to |algo = old(60d). I hope I did it correctly. If not could someone help me do it correctly? GloryRoad66 (talk) 03:28, 22 June 2023 (UTC)

Your edit is fine and posts should start being archived after 60 days of inactivity. Aidan9382 (talk) 06:09, 22 June 2023 (UTC)
Thanks. GloryRoad66 (talk) 22:03, 22 June 2023 (UTC)

Pattern

Hi Aidan! From the string |note 1={{{needs-photo|{{{needs-image|{{{image-needed|{{{photo-needed|{{{image-requested|}}}}}}}}}}}}}}}|NOTE_1_TEXT = I would like to extract needs-photo, needs-image, image-needed, photo-needed and image-requested. Can I use string.gmatch for this? I would be very happy if you could help me with the pattern, thanks — Martin (MSGJ · talk) 20:27, 28 July 2023 (UTC)

@MSGJ: So you want to get the potential parameters that are there I assume? If we are guaranteed to be in the format you have above (I doubt there's anything too absurd), doing something like for param in string.gmatch(input, "{{{([^|}]+)") do [...] end should work fine as long as the input string is as controlled as the example you give. This would also pick up both {{{param-name|}}} and {{{param-name}}}, and won't pick up any default of the param, though I assume that's not needed for whatever you're doing. Aidan9382 (talk) 20:55, 28 July 2023 (UTC)
No there are no defaults, so that would be okay. I am currently using parameter .. '%s*=%s*{%{%{([%a%d_%s-]*)' where parameter = 'note 1', etc. Perhaps I first need to get the wikicode relating to note 1 up until the first } and then use the gmatch with your pattern? — Martin (MSGJ · talk) 21:04, 28 July 2023 (UTC)
My example regex will attempt to find any occurance of {{{ and then match all characters after it that aren't | or }, so as long as it includes the text from just the wanted parameter, it shouldn't really matter what the surrounding wikitext is as it shouldn't pick up anything wrong. You could force it to stop at the first } to be safe, but assuming your input text stops at |NOTE_1_TEXT = already, it should be fine. You can always just chuck the gsub in a sandbox or the debug console and give it a swing to see how it behaves. Apologies if I'm not fully understanding the question here, since I am a little confused on what you're asking. Aidan9382 (talk) 21:12, 28 July 2023 (UTC)
That will be me not explaining it well. No the input did not stop there, I shortened it to illustrate. Anyway, with your pointers I've managed to get it working in Module:WikiProject banner/sandbox — Martin (MSGJ · talk) 21:37, 28 July 2023 (UTC)