Jump to content

Module talk:Check for unknown parameters: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
m Archiving 1 discussion(s) to Module talk:Check for unknown parameters/Archive 1) (bot
m top: Removed {{WikiProject Templates}}, it should only be transcluded in the Wikipedia talk, Help talk, or Category talk namespace(s)
Line 1: Line 1:
{{Permanently protected}}
{{Permanently protected}}
{{WikiProject Templates}}
{{oldtfdfull|date= 2019 December 30 |result=no consensus |disc=Module:Check for deprecated parameters|merge=self}}
{{oldtfdfull|date= 2019 December 30 |result=no consensus |disc=Module:Check for deprecated parameters|merge=self}}
{{talk header}}
{{talk header}}

Revision as of 17:01, 13 October 2023

Use from module

Is it possible to use this module directly from another module, or does it always need to be placed on a template page? — Martin (MSGJ · talk) 16:11, 30 December 2022 (UTC)[reply]

@Frietjes: any chance you could help me with the above? — Martin (MSGJ · talk) 19:04, 8 January 2023 (UTC)[reply]
Something like this should work for you:
	local validArgs = { ... }
	local checkForUnknownParameters = require("Module:Check for unknown parameters")
	local result = checkForUnknownParameters._check(validArgs, args)
Gonnym (talk) 11:41, 9 January 2023 (UTC)[reply]
MSGJ, see the end of Module:Rugby box for a simple example or Module:Infobox3cols or Module:Flag for more complicated examples. Frietjes (talk) 15:50, 9 January 2023 (UTC)[reply]
Thanks both, I will give it a try — Martin (MSGJ · talk) 12:10, 11 January 2023 (UTC)[reply]

Works great. I will add instructions to the documentation when I get time. Non-urgent feature request: it would be nice if I could specify which namespaces I want to check unknown parameters in. Easy enough to do locally of course, but would be tidier if it was in this module. — Martin (MSGJ · talk) 13:15, 11 January 2023 (UTC)[reply]

Pagenames involved

For de-confusion, pagenames involved:

-DePiep (talk) 07:37, 28 February 2023 (UTC)[reply]