User talk:Terasail

From Wikipedia the free encyclopedia

Main Page Talk Page Templates Contributions
This is my Wikipedia userpage. This is not an encyclopedia article.

Tech News: 2021-06[edit]

17:40, 8 February 2021 (UTC)

Tech News: 2021-07[edit]

17:54, 15 February 2021 (UTC)

Wikipedia:WikiProject Edit requests[edit]

Hi, I saw your comment you made a while ago on Category talk:Requested edits about the newly created usescript. I'm not sure if you have heard of Wikipedia:WikiProject Edit requests, but I thought you might be interested in joining. Thanks, P,TO 19104 (talk) (contribs) 17:25, 21 February 2021 (UTC)

Tech News: 2021-08[edit]


00:16, 23 February 2021 (UTC)

Orphaned non-free image File:Dota Dragon's Blood Title Text.png[edit]

⚠

Thanks for uploading File:Dota Dragon's Blood Title Text.png. The image description page currently specifies that the image is non-free and may only be used on Wikipedia under a claim of fair use. However, the image is currently not used in any articles on Wikipedia. If the image was previously in an article, please go to the article and see why it was removed. You may add it back if you think that that will be useful. However, please note that images for which a replacement could be created are not acceptable for use on Wikipedia (see our policy for non-free media).

Note that any non-free images not used in any articles will be deleted after seven days, as described in section F5 of the criteria for speedy deletion. Thank you. --B-bot (talk) 03:24, 23 February 2021 (UTC)

Module:SelectServiceAward[edit]

@Terasail:, I was using the Service Award Template, and it seems to be not functioning properly. Specifically if we set |noinc=yes, then the ribbon changes to always be Editorrib05.svg. I dug into it a little bit, and I think the problem is with the while loop you added to Module:SelectServiceAward. See below for a rundown of the bug I am seeing.

Code evaluation
start line = 30, noincremental = "yes", numpos = 1
Line numpos value counter value Notes
30 1 - Enter if statement
31 1 20 Set initial counter value
32 1 20 Enter while loop since counter >= 4
33 1 20 Enter if statement since numpos <= counter
34 17 20 Math
35 17 20 Exit if statement
36 17 16 Math
37 17 16 Return to beginning of while loop
32 17 16 Enter while loop since counter >= 4
33 17 16 Do not enter if statement since numpos > counter
35 17 16 Exit if statement
36 17 12 Math
37 17 12 Return to beginning of while loop
32 17 12 Enter while loop since counter >= 4
33 17 12 Do not enter if statement since numpos > counter
35 17 12 Exit if statement
36 17 8 Math
37 17 8 Return to beginning of while loop
32 17 8 Enter while loop since counter >= 4
33 17 8 Do not enter if statement since numpos > counter
35 17 8 Exit if statement
36 17 4 Math
37 17 4 Return to beginning of while loop
32 17 4 Enter while loop since counter >= 4
33 17 4 Do not enter if statement since numpos > counter
35 17 4 Exit if statement
36 17 0 Math
37 17 0 Return to beginning of while loop
32 17 0 Do not enter while loop since counter < 4
37 17 0 Exit while loop
38 17 0 Exit if statement
39 17 0 return numpos=17
The returned value should be 1
Any value of numpos<=20 will return 17

I think I have a fix for the bug (see below), but I am not an expert at wikicoding. Would you be willing to either test this or help me learn how to test this so that we can fix this bug?

	if noincremental == "yes" and numpos > 0 and numpos <= 20 then 		local counter = math.floor( ( numpos - 1 ) / 4 ) 		numpos = ( 4 * counter ) + 1 	end 	return (numpos) end  return p 

Brvhelios (talk) 07:05, 25 February 2021 (UTC)

@Brvhelios: The code you put here does work. I will explain how to check for yourself for the future, I have used this module for the examples below:
  • With templates/modules, create a sandbox version with the change, such as Module:SelectServiceAward/sandbox and modules also requre the template sandbox aswell: {{Service awards/sandbox}}
  • Test the change by editing a page with the template (Your userpage / sandbox) and change {{Service awards}} to {{Service awards/sandbox}} and click preview.
  • It will show the changes in action, you should be able to tell if the change works.
  • Another option is to use /testcases to check multiple small paramter changes against each other. Example: Template:Archives/testcases however this would not work well for topicons.
  • If the change works how expected implement them after following WP:TPECON.
However here I have tested and this is non controversial, so just copy over the sandbox to the module version & the change will be made. That way you will be given attribution for this change. Hope this helps Terasail[✉] 13:39, 25 February 2021 (UTC)
@Terasail: Thanks for all your help! I would have been much more nervous about making this change without it, especially you testing it yourself. I've made the change.
I noticed that |noinc= is missing from the documentation for the template, though. Since it was your work to add the functionality in the first place, do you want to add it there so that you get the attribution? Brvhelios (talk) 05:26, 26 February 2021 (UTC)

The Signpost: 28 February 2021[edit]

The Downlink – March 2021[edit]

DNLImg.svg The Downlink The WikiProject Spaceflight Newsletter
1 February 2021 — 28 February 2021

MediaWiki message delivery (talk) 12:58, 1 March 2021 (UTC)

Tech News: 2021-09[edit]


19:06, 1 March 2021 (UTC)

Tech News: 2021-10[edit]

17:50, 8 March 2021 (UTC)