MediaWiki talk:Gadget-geonotice-core.js
To request a geonotice, please go to Wikipedia:Geonotice. |
This page has archives. Sections older than 28 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present. |
Protected edit request on 6 October 2018
[edit]This edit request to MediaWiki:Gadget-geonotice-list.js has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please replace the UK20180930
entry with the following:
UK20181006: /* last 8 chars of ID is date of last amendment in CCYYMMDD format - change this if making major amendment or adding a meetup; leave alone if minor amendment or removing a meetup */ {
begin: '5 October 2018 17:00 UTC', /* yesterday's date - amend only if the ID was altered */
end: '21 October 2018 17:00 UTC', /* set this to date of last meetup shown */
country: 'GB',
text: 'Interested in having a chat with fellow Wikipedians? There are forthcoming meetups in: [[m:Meetup/London/135|London, 14 October]]; and [[m:Meetup/Oxford/66|Oxford, 21 October]]!' /* try to limit this to four meetups, no more than one per town/city, and no more than four weeks in advance; shorten month names to three letters if four meetups are shown */
},
Thanks. --Redrose64 🌹 (talk) 16:22, 6 October 2018 (UTC)
- Any particular reason I'm pulling the still active one?—CYBERPOWER (Chat) 16:48, 6 October 2018 (UTC)
- Because I don't want two banners both for the same geographic area and both linking London, 14 October. --Redrose64 🌹 (talk) 20:29, 6 October 2018 (UTC)
- Done I didn't notice that the content was identical to what was already there. :p—CYBERPOWER (Chat) 21:05, 6 October 2018 (UTC)
- It's not completely identical. Oxford, 21 October is added, two dates amended (one of which was, strictly speaking, unnecessary because it's a past date) and the ID is updated so that it redisplays to those who have already dismissed it. --Redrose64 🌹 (talk) 21:38, 6 October 2018 (UTC)
- Close enough.—CYBERPOWER (Chat) 00:51, 7 October 2018 (UTC)
- It's not completely identical. Oxford, 21 October is added, two dates amended (one of which was, strictly speaking, unnecessary because it's a past date) and the ID is updated so that it redisplays to those who have already dismissed it. --Redrose64 🌹 (talk) 21:38, 6 October 2018 (UTC)
- Done I didn't notice that the content was identical to what was already there. :p—CYBERPOWER (Chat) 21:05, 6 October 2018 (UTC)
- Because I don't want two banners both for the same geographic area and both linking London, 14 October. --Redrose64 🌹 (talk) 20:29, 6 October 2018 (UTC)
London is past
[edit]This edit request to MediaWiki:Gadget-geonotice-list.js has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
please amend the string 'Interested in having a chat with fellow Wikipedians? There are forthcoming meetups in: London, 14 October; and Oxford, 21 October!' to read 'Interested in having a chat with fellow Wikipedians? There is a forthcoming meetup in: Oxford, 21 October!' leaving everything else alone. --Redrose64 🌹 (talk) 20:20, 14 October 2018 (UTC)
Protected edit request on 4 November 2018
[edit]This edit request to MediaWiki:Gadget-geonotice-list.js has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please add the following entry:
UK20181104: /* last 8 chars of ID is date of last amendment in CCYYMMDD format - change this if making major amendment or adding a meetup; leave alone if minor amendment or removing a meetup */ {
begin: '3 November 2018 17:00 UTC', /* yesterday's date - amend only if the ID was altered */
end: '18 November 2018 17:00 UTC', /* set this to date of last meetup shown */
country: 'GB',
text: 'Interested in having a chat with fellow Wikipedians? There are forthcoming meetups in: [[m:Meetup/London/136|London, 11 November]]; [[m:Meetup/Oxford/66|Oxford, 18 November]]!' /* try to limit this to four meetups, no more than one per town/city, and no more than four weeks in advance; shorten month names to three letters if four meetups are shown */
},
Thanks. --Redrose64 🌹 (talk) 13:31, 4 November 2018 (UTC)
- Done ~ Amory (u • t • c) 19:22, 4 November 2018 (UTC)
- @Amorymeltzer: the link in the above is wrong, it should be m:Meetup/Oxford/67. Hut 8.5 20:10, 4 November 2018 (UTC)
- Right you are! Fixed. ~ Amory (u • t • c) 20:16, 4 November 2018 (UTC)
- You see, this is what annoys me about no longer being able to fix typos, not even my own. I also forgot to put the word "and" between the two links, like this. --Redrose64 🌹 (talk) 21:49, 4 November 2018 (UTC)
- Done Apologies, I bumped on that but thought you had phrased it that way intentionally. RR, is there a reason you haven't requested IA rights? ~ Amory (u • t • c) 22:03, 4 November 2018 (UTC)
- I think I read somewhere that people aren't supposed to request it purely for geonotices, but given the continuing inconvenience it seems like it would be sensible for RR to have the ability. — Amakuru (talk) 08:54, 5 November 2018 (UTC)
- I would very much support it if Redrose64 applies for IAdmin - he knows geonotices better than I. The process of requesting IAdmins is supposed to be lightweight. Deryck C. 12:53, 5 November 2018 (UTC)
- Thank you for those comments; I have not only maintained geonotices, I have also amended some site CSS (and indeed site JS, see history of MediaWiki:Gadget-edittop.js) and some user CSS/JS pages (other than my own). I am trying to find some time so that I can go back through my edits of the last 7 years to find good examples with which to build a case. --Redrose64 🌹 (talk) 00:02, 6 November 2018 (UTC)
- @Redrose64: In case you didn't see the process for becoming IAdmin for existing sysops is easier than during the transition period now. Take a look at Wikipedia:Interface_administrators#Process_for_requesting to see. There are a few ideas being worked on to fix the geonotices issue, but neither is ready yet. — xaosflux Talk 00:57, 6 November 2018 (UTC)
- I'll add too that you're very active and helpful on VPT. ~ Amory (u • t • c) 01:53, 6 November 2018 (UTC)
- Yep, @Redrose64: you can just go and request the right whenever you're ready. No need to dig through old contributions and evidence unless anyone queries it. Otherwise it's just subject to a 48-hour holding period to ensure no objections. And then make sure your login/password etc are secure so that a random hacker can't mess up the entire Wiki! — Amakuru (talk) 16:12, 6 November 2018 (UTC)
- I didn't request it, and it seems that I am no longer allowed to: see m:Special:Diff/18694065. I do not have 2FA, and do not wish to have it, since I do not wish to be permanently locked out should I use another machine. Nor do I think that I can have it, since some of the machines that I use are not capable (they're not state-of-the-art), and some are not mine to install software on. What the hell am I going to use to scan a QR code, in any case? The whole idea has not been properly thought through. Also, the fact that m:Help:Two-factor authentication#See also mentions "Known bugs" worries me. --Redrose64 🌹 (talk) 23:54, 1 January 2019 (UTC)
- Yep, @Redrose64: you can just go and request the right whenever you're ready. No need to dig through old contributions and evidence unless anyone queries it. Otherwise it's just subject to a 48-hour holding period to ensure no objections. And then make sure your login/password etc are secure so that a random hacker can't mess up the entire Wiki! — Amakuru (talk) 16:12, 6 November 2018 (UTC)
- I'll add too that you're very active and helpful on VPT. ~ Amory (u • t • c) 01:53, 6 November 2018 (UTC)
- @Redrose64: In case you didn't see the process for becoming IAdmin for existing sysops is easier than during the transition period now. Take a look at Wikipedia:Interface_administrators#Process_for_requesting to see. There are a few ideas being worked on to fix the geonotices issue, but neither is ready yet. — xaosflux Talk 00:57, 6 November 2018 (UTC)
- Thank you for those comments; I have not only maintained geonotices, I have also amended some site CSS (and indeed site JS, see history of MediaWiki:Gadget-edittop.js) and some user CSS/JS pages (other than my own). I am trying to find some time so that I can go back through my edits of the last 7 years to find good examples with which to build a case. --Redrose64 🌹 (talk) 00:02, 6 November 2018 (UTC)
- I would very much support it if Redrose64 applies for IAdmin - he knows geonotices better than I. The process of requesting IAdmins is supposed to be lightweight. Deryck C. 12:53, 5 November 2018 (UTC)
- I think I read somewhere that people aren't supposed to request it purely for geonotices, but given the continuing inconvenience it seems like it would be sensible for RR to have the ability. — Amakuru (talk) 08:54, 5 November 2018 (UTC)
- Done Apologies, I bumped on that but thought you had phrased it that way intentionally. RR, is there a reason you haven't requested IA rights? ~ Amory (u • t • c) 22:03, 4 November 2018 (UTC)
- You see, this is what annoys me about no longer being able to fix typos, not even my own. I also forgot to put the word "and" between the two links, like this. --Redrose64 🌹 (talk) 21:49, 4 November 2018 (UTC)
- Right you are! Fixed. ~ Amory (u • t • c) 20:16, 4 November 2018 (UTC)
convert to use json
[edit]Seems like phab:T198758 has been delivered, anyone want to work on updating this gadget to use that JSON page directly so we can stop relying on a bot copy job? — xaosflux Talk 15:11, 17 January 2022 (UTC)
- See also mw:ResourceLoader/Migration_guide_(users)#Package_Gadgets. — xaosflux Talk 15:11, 17 January 2022 (UTC)
- Move Wikipedia:Geonotice/list.json to MediaWiki:Gadget-geonotice-list.json
- Soft redirect MediaWiki:Gadget-geonotice-list.js and Wikipedia:Geonotice/list.json to MediaWiki:Gadget-geonotice-list.json.
- Copy contents of the geonotices list to the json list, but remove the comments (not allowed in json) and
- Make this edit to MediaWiki:Gadget-geonotice-core.js.
- Modify MediaWiki:Gadgets-definition to look like: That should do it. —TheDJ (talk • contribs) 19:14, 18 January 2022 (UTC)
geonotice-core[ResourceLoader|dependencies=mediawiki.util,mediawiki.storage|package]|geonotice-list.json|geonotice-core.js|geonotice-core.css
- @TheDJ: thank you for the steps, in #3 above I'm missing why this is needed? Is that in case Wikipedia:Geonotice/list.json is out of sync while all the change is being processed? — xaosflux Talk 23:57, 18 January 2022 (UTC)
- Note that the bot converts wikitext in the current JSON page to HTML (using the API) while moving it, so the transition is not that straightforward. The gadget needs to be edited so that it uses mw.jQueryMsg to parse the wikitext (it could also use the API – but that would slow down rendering). Courtesy pinging the bot operator: @MusikAnimal. – SD0001 (talk) 04:38, 19 January 2022 (UTC)
- My hope was that we'd have the gadget do all the work. The bot also did some validations such as the country code, coordinates and dates. Since the bot first went live, it looks like there were only two erroneous edits to the configuration [1][2] so this validation logic may not be worth porting to the gadget (and logging with
mw.log.warn()
for example). - I will be very busy for the next two weeks or so, but whenever the time comes please feel free to disable the task at User:MusikBot II/GeonoticeSync/Run. Thanks to all, and especially to SD0001 for making JSON behind ResourceLoader a reality! — MusikAnimal talk 05:33, 19 January 2022 (UTC)
- This can also just be directions to the admins updating the json page. The gadget should likely do some input validation on that data too. — xaosflux Talk 23:11, 19 January 2022 (UTC)
- My hope was that we'd have the gadget do all the work. The bot also did some validations such as the country code, coordinates and dates. Since the bot first went live, it looks like there were only two erroneous edits to the configuration [1][2] so this validation logic may not be worth porting to the gadget (and logging with
- Note that the bot converts wikitext in the current JSON page to HTML (using the API) while moving it, so the transition is not that straightforward. The gadget needs to be edited so that it uses mw.jQueryMsg to parse the wikitext (it could also use the API – but that would slow down rendering). Courtesy pinging the bot operator: @MusikAnimal. – SD0001 (talk) 04:38, 19 January 2022 (UTC)
- @TheDJ: thank you for the steps, in #3 above I'm missing why this is needed? Is that in case Wikipedia:Geonotice/list.json is out of sync while all the change is being processed? — xaosflux Talk 23:57, 18 January 2022 (UTC)