Module:Unsubst is permanently protected from editing because it is a heavily used or highly visible module. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use ((edit protected)) to notify an administrator to make the requested edit.
|
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I get this error:
Lua error in Module:Unsubst at line 18: attempt to call field 'isSubsting' (a nil value).
Shouldn't that be isSubstring? ☠MarkAHershberger☢(talk)☣ 16:27, 25 November 2013 (UTC)
|$N=
[edit]You can get the template name from mw.getCurrentFrame():getTitle()
— Keφr 08:59, 27 March 2014 (UTC)
mw.getCurrentFrame():getParent():getTitle()
, and it does work. (And above, I actually meant mw.getCurrentFrame().parent:getTitle()
, which does not.) — Keφr 09:50, 27 March 2014 (UTC)
((#invoke:Unsubst|unsubst))
, when actually it's just ((#invoke:Unsubst|))
. As for the expensive mw.title.new, I agree that if it only gets called on subst then it shouldn't be a problem. — Mr. Stradivarius ♪ talk ♪ 12:20, 27 March 2014 (UTC)
I have a local wikipedia copy and get the 'Lua error in Module:Unsubst atline 18: attempt to call field 'isSubsting' (a nill value)' error and I have changed the Unsubst module to the new one but still get the error, is there anything else I need to do?
$N
(template name) parameter in the #invoke text, whereas in the latest version this is not necessary. — Mr. Stradivarius ♪ talk ♪ 12:25, 22 April 2014 (UTC)
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Please make these changes. Jackmcbarn (talk) 15:04, 22 August 2014 (UTC)
Using this module imposes a time penalty. Not surprising, that. I have been experimenting with a module to translate ((Literatur))
(a template that attempts to translate de.wiki's Vorlage:Literatur to a ((citation))
template). In its current form, ((Literatur))
is always subst'd so I tweaked ((citation/new))
(the sandbox) to use this module. At Help talk:Citation Style 1 § non-English translator templates and substing I was queried about the time penalty. My simple experiments show that there is a significant time penalty for no benefit.
In that discussion, I wondered if the translator module might call a special substable version of ((citation))
so I created ((citation/subst))
which uses this module and then modified the translator module to call that template. The substitution worked as it should except that the substituted template name was ((citation/subst))
. In that discussion at WT:CS1, I also wondered if this module might be tweaked to support a template invocation name override parameter. I have tweaked the sandbox to support |$template-name=
. ((citation/subst))
uses this parameter to set the template name to citation/new
and when a ((Literatur/sandbox))
template is subst'd, the result is an invocation of ((citation/new))
.
If there are no objections, I will update the live module from the sandbox. Comments, of course, are welcome.
—Trappist the monk (talk) 18:06, 20 August 2021 (UTC)
I'm looking to add a signature option to ((Dashboard.wikiedu.org assignment)) using this template so that if someone adds the template, a bot can subst the call and return the original template call plus the user's signature (or maybe even just a timestamp). However, I am concerned that adding in something dynamic like a timestamp will cause issues if the template is substed. Basically, I'm not sure how to code it so that it gives accurate information that stays static after substing. Example:
((dashboard.wikiedu.org assignment | course = Wikipedia:Example | assignments = [[User:Primefac]] | start_date = 2022-01-24 | end_date = 2022-05-13 ))
Substing the template call would ideally give something like
This is primarily to allow for archiving when the course is over (because at current, sections like this won't ever be archived). Please let me know how far off the mark I am. Thanks! Primefac (talk) 08:17, 16 March 2022 (UTC)
__DATE__
that is replaced with the current month and year when adding the parameter while substing. This is used in maintenance templates. Anomie⚔ 11:44, 16 March 2022 (UTC)