Module talk:Module wikitext

Template-protected edit request on 16 June 2026

Please implement my changes in the sandbox, which add a function which can wrap exported packages, so stuff like TfD templates can be shown when a template or module uses a module nominated at TfD. Aasim (話すはなす) 19:35, 16 June 2026 (UTC)Reply

@Awesome Aasim: Sorry for the late response, but what exactly is the actual use case of this (or can you give an example)? I can't quite figure out what this change is meant to do. Aidan9382 (talk) 21:48, 26 July 2026 (UTC)Reply
This change is supposed to make it possible to add TfD tags around functions which export modules nominated at TfD. So if Module:Foo was nominated for deletion, if Module:Foo was nominated for deletion, all invocations would spit out the "see TfD" text. Aasim (話すはなす) 21:58, 26 July 2026 (UTC)Reply
Ok, I think I get it. My main concern here is replacing the output of every function that returns a string could make some meta-functions misbehave in very unpredictable ways, so it might make more sense being manually targetted. Also, judging from what I'm reading here, if two wrappers get defined by two different modules in the same call chain, one will supercede the other in a possibly very buggy way, so that might need some work.
On that note, I don't see why this needs to be implemented into this module directly. I feel like this might make more sense being made part of a current or new TfD-related module rather than just being placed into this module. Aidan9382 (talk) 22:18, 26 July 2026 (UTC)Reply
I was considering that as well but I don't know if that is the best approach. We would have to do the same for TfM, and there may be other future use cases where one would have to add in extra informational text before a module invocation. Aasim (話すはなす) 02:16, 27 July 2026 (UTC)Reply
In that case I still think it'd make more sense as either a new module (or an addition to a TfX module if it makes sense) which behaves similarly to your sandbox edit, in which you can wrap the returned p and specify which functions to hook and some text that'll be preprocessed and placed before/after the output to make adding any notice easier to module outputs. One thing that is coming to mind though, is how often is a module used directly in wikitext as opposed to through a template, which would probably be an easier point to insert a TfX notice at? Aidan9382 (talk) 12:43, 27 July 2026 (UTC)Reply
Recently I nominated a module used by some templates for deletion and because technical reasons there wasn't a way to include a TfD notice on all of the templates that transcluded that module. Aasim (話すはなす) 23:45, 27 July 2026 (UTC)Reply
See Module:Module_wikitext/demo as an example. Aasim (話すはなす) 21:13, 28 July 2026 (UTC)Reply

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.