Wikipedia talk:Substitution/Archive 2

Latest comment: 18 years ago by Pathoschild in topic Help request
Archive 1 Archive 2 Archive 3 Archive 4 Archive 5

Recent changes to the template

The following discussion has been copied from a different article. -- Zondor 19:32, 15 November 2005 (UTC)

Just wondering why the template now says "do not... move this article"? Changing an article name is often an important part of fixing it. JYolkowski 22:20, 15 Mar 2005 (UTC)

It breaks the link to the VfD subpage. Goplat 00:33, 16 Mar 2005 (UTC)
That's why you use subst:, so that it doesn't. JYolkowski 01:47, 16 Mar 2005 (UTC)
It will whether you use subst: or not, although if you used subst: you can just fix the link without having to manually copy the template's text into the article first. Goplat 02:43, 16 Mar 2005 (UTC)
You're right, I got somewhat confused there. Thanks, JYolkowski 03:07, 16 Mar 2005 (UTC)

Disputed

The following templates were suggested for subst'ing by one user, and opposed by another. Discussion welcome.

Radiant_>|< 09:52, 1 November 2005 (UTC)

I'm fairly sure I'm the one that suggested those, but whatever ;) oops, my bad. Radiant_>|< 15:14, 1 November 2005 (UTC)
I suggested the user talk page warning templates. ;) // Pathoschild 15:51, 1 November 2005 (UTC)

I don't see any problem with substing {{tl}} and {{cl}} they expand to &#123;{[[Template:foo|foo]]}} and [[:Category:foo|Cat:foo]] respectively, hardly a huge clutter. The rest do dump a fair bit of wikicode into the page though... --Sherool 13:29, 1 November 2005 (UTC)

If you have multiple {{tl}} or {{cl}} entries on a line, they look much nicer unsubsted. Compare:
{{tl|test}}, {{tl|test2}}, {{tl|test2a}}, {{tl|test3}}, {{tl|test4}}, {{tl|test5}}
{{[[Template:test|test]]}}, {{[[Template:test2|test2]]}}, {{[[Template:test2a|test2a]]}}, {{[[Template:test3|test3]]}}, {{[[Template:test4|test4]]}}, {{[[Template:test5|test5]]}}
~~ N (t/c) 14:34, 1 November 2005 (UTC)
I don't mind them like that; there are a lot of things that don't look too nice in WikiCode. As long as it's relatively clear, I think subst'ing works fine. Radiant_>|< 15:14, 1 November 2005 (UTC)
I don't see any problem with substing all the templates listed above. All but {{vandal}} output very little wiki markup, and {{vandal}} is typically used on vandalism-related pages or talk pages. Only on article pages do large blocks of wiki markup become a problem, because they tend to intimidate users unfamiliar with it. // Pathoschild 19:27, 1 November 2005 (UTC)

I strongly oppose auto-substing {{tl}} and {{cl}} These are the usual method of referning to a template or a category, rather than using it. Subst will rather more than triple the length of the wikicode in such cases, and make it significantly less celar, adn harder for newcomers to learn to write. I never use subst with tl or cl, adn I don't plan to start. Indeed often replace Template:Foo with {{Foo}}. DES (talk) 18:11, 2 November 2005 (UTC)

I'd oppose this also. These are used heavily on stub-sorting discussion pages, which would end up that bit less readable if auto-subst'd. If they get lots of use elsewhere, in contexts where subst'ing is actually desirable (can't think where), split them into two flavours (one to be subst'd, one not). Alai 19:50, 2 November 2005 (UTC)

{{tl|template}} versus {{tls|template}}

User:Zondor replaced all the {{tl}}'s with {{tls}}'s, which results in "{{subst:template}}" instead of "{{template}}". This being a list of templates, the only difference seems to be a messier page with more visual clutter. I've reverted the replacements (but left his other changes); if he (or anyone else) prefers {{tls}}, please discuss. // Pathoschild 15:51, 1 November 2005 (UTC)

main

Oppose subst {{main}}: It contributes a certain appearance to part of an article. If the appearance of the template changes again, updates to an article may produce inconsistent appearance for such article links. (SEWilco 20:30, 1 November 2005 (UTC))

Agree. ~~ N (t/c) 23:20, 1 November 2005 (UTC)
Agreed. This one is so common in the article space that it should probably be excluded from any bot actions until a consensus is reached on subst-ing it. HorsePunchKid 03:22, 2 November 2005 (UTC)
  • I think that, for the sake of not confusing newbie editors, we should generally not auto-subst any template that goes on an article page. Although I'll make an exception for {{clear}} and such because their expanded code is not very long and about equally clear. Radiant_>|< 10:40, 2 November 2005 (UTC)

Stub templates

While no one has listed them as of yet, this is a pre-emptive vote against substituting stub templates.

I don't think the same arguments apply. The stub templates are little more than a line of text with a category tag. There's nothing there to confuse the new editor. // Pathoschild 15:46, 2 November 2005 (UTC)
A line of text? More like four or five, in edit windows. Here's one, selected off the top of my head:
<div class="boilerplate metadata" id="stub">[[Image:Flag of the United States.svg|25px|United States]]''This [[United States]] [[biography|biographical]] article is a [[Wikipedia:Perfect stub article|stub]]. You can [[Wikipedia:Find or fix a stub|help]] Wikipedia by [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} expanding it]''.</div>[[Category:American people stubs]]
Not especially sightly for the new or faint at heart. Come to that, I've written several of these, and I'd hate to look at them in article pages on a regular basis. Alai 19:43, 2 November 2005 (UTC)
  • Good point actually. I'm enquiring at WSS what they think. Radiant_>|< 15:48, 2 November 2005 (UTC)
  • I for one strongly oppose the use of subst on stub temples -- indeed i would be tempted to revert any such changes as near vandalism. Here are my reasons: 1) when a stub is changed (via stub-sortign to a more specific or correct stub type) all that need be doen is edit the tag. If the tempalte is subst'd, the resulting code and the category must be removed, and the new tempalte applied; 2) when an articel is no loger a stub it is easy to tell novice editors "just remove the stub tag" but would be much harder to describe all the code to remove including the category, if subst had been used; 3) when the extx of an existign stub tag is changed, that shcnage should apply to all currently tagged articels. this would be much more work if the code had been subst; 4) when a stub type is renamed or deleted, removing or altering it would also be harder 5) sometimes a stub type is altered so that the category it applies is changed or renamed. applying these changes to currently tagged articles would be MUCH harder if subst had been used. DES (talk) 18:18, 2 November 2005 (UTC)
    • Agreed on all points. Alai 19:43, 2 November 2005 (UTC)
  • I'll also weigh in as strongly opposing subst'ing stub templates, for all the reasons DES gave and more. While I can understand the use of subst on templates that do not require changing once in place, there are many potential problems with subst on any template which may later require updating (as is the case when new stub categories are split from overgrown categories). Take just one common example as a strong reason against subst: Someone creates a new template, but does not add a category (at WP:WSS we find about half a dozen cases of this a month). Normally, to find all the articles that contain the stub, so that we can null-edit them and put them in a category, we'd use "what links here". But if the template has been subst'ed, what links here will be empty. Grutness...wha? 00:19, 3 November 2005 (UTC)
  • Agreed .. I also oppose the subst: of stub-templates (the arguments above suffice to cover most of my concerns). thanks, Radiant, for bringing this to WSS ... even if I did come down hard in a bout of "anti-panic". Courtland 00:31, 3 November 2005 (UTC)

"include" vs "subst"

Keep in mind that the "include" wiki markups clash with subst:. Various templates are having things moved into template space which don't work with subst:. (SEWilco 04:59, 2 November 2005 (UTC))

Perhaps anything currently in <noinclude> tags could be moved to the talk page, as per meta:Template talk pages. // Pathoschild 06:26, 2 November 2005 (UTC)
i wonder why does not the mediawiki software accomodate this by ignoring includeonly and noinclude when subst'ing. this would seem to be more appropriate. -- Zondor 06:40, 2 November 2005 (UTC) perhaps because these tags may wanted to be included literally. -- Zondor 06:40, 2 November 2005 (UTC)
I suspect it is because *include are very new and subst: behavior was overlooked. Hard to know, as features are often not being documented nor announced well. (SEWilco 13:51, 2 November 2005 (UTC))
  • Includeonly is a nice feature, but abused on some templates. If it is plausible that a user would want to subst a template, then it shouldn't have informational text in includeonly. For instance, since {{afd}} is strongly recommended to always subst in our AFD guidelines, it is reasonable to expect users to also subst {{tfd}} (etc) at times. And they did, which messed up some categories and such, so I moved those tl's includeonly sections to their talk page. Radiant_>|< 10:40, 2 November 2005 (UTC)

{{Nn-warn}}

{{Nn-warn}} and {{nothanks-sd}} (which i drafted) specify the invariable use of subst in the usage section on their talk pages. therefor auto-substign them would probably be appropriate. DES (talk) 18:24, 2 November 2005 (UTC)

test (warning) templates

I oppose the use, much less the auto-use, of subst with {{test}}, {{test2}} and their successors and varients. i find it useful, when seeing a talk page, to see exactly what level the wrnings have reached, without needing to consult the exact wordign of the warnings, particuarlly wjhen that wording sometimes undergoes significant changes (such changes were recently proposed). As a result i never use subst with any of these templates, and I urge other people using them not to sue subst either, and I stringly oppose them being targets for auto-subst. DES (talk) 18:27, 2 November 2005 (UTC)

I've had this problem, too. At the very least, it would be nice if templates like this would include their name in a comment (<!-- Template:test2 -->), so that when they're substituted, you can still tell where they came from. HorsePunchKid 21:18, 2 November 2005 (UTC)
Tht would serve the purpose, since one would only see the name when editing anyway. DES (talk) 15:55, 3 November 2005 (UTC)
As per Wikipedia:Transclusion costs and benefits, the server strain caused by not substing templates as oft-used as the user warning templates may well be overwhelming. Although I've never had trouble deducing the warning levels from the output text, I see no problem with adding <!-- template_name --> to the output if it helps others do so from the edit view. May I interpret DES's above comment as retracting his opposition if the names are commented in the templates? // Pathoschild 17:55, 3 November 2005 (UTC)
You may. in fact I think i'll go add such comments myself. DES (talk) 18:22, 3 November 2005 (UTC)
  • I note that a number of the templates listed in {{TestTemplates}} are not listed on the project page, but much the same reasons apply to all of them. DES (talk) 18:59, 3 November 2005 (UTC)
Indeed they are not. I intend on adding them once we're agreed on adding user_talk templates. // Pathoschild 19:54, 3 November 2005 (UTC)

{{PAGENAME}} and {{PAGENAMEE}}

The use of these on templates should not be subst'd, as these then refer to the page the template is included in. This is how edit links on stub templates work. The same issue might also occur on other pages that are transcluded. --Mairi 20:20, 2 November 2005 (UTC)

These variables don't lose functionality when subst'd. Once {{PAGENAME}} has been used on User:10.7.1.336, for example, the result remains forevermore "10.7.1.336", subst'ed or not. Continually calling the variable instead of simply echoing the unchanging result may add to the server load problem. The only real difference is in readability, and I think for the better. Compare:
This IP address, {{PAGENAME}}, belongs to X organisation...
This IP address, 10.7.1.336, belongs to X organisation...
The same readability change (improvement?) without functionality loss applies in all other places {{PAGENAME}} is used, particularly in URLs.
// Pathoschild 17:38, 3 November 2005 (UTC)
The value does change when it's used on a template. Take for instance {{Bio-stub}}. When viewing the template itself, {{PAGENAME}} expands to Bio-stub as expected. However when looking at an article it's used on, say Munuza, {{PAGENAME}} expands to the name of the article, in thise case Munuza. --Mairi 18:31, 3 November 2005 (UTC)
I fail to see your argument. If {{bio-stub}} is used on Example, {{PAGENAME}} will expand to "Example" whether or not it's subst'd. The templates (or variables, in this case) won't be subst'd immediately upon use; they'll be subst'd when encountered by the bot. The bot will logically ignore the template namespace, where templates and variables must not be subst'd under any circumstance. // Pathoschild 20:08, 3 November 2005 (UTC)
Alright; i was taking "should always be subst'd" to mean everywhere, including the template namespace. I'll clarify on the page that it doesn't apply to that. --Mairi 20:20, 3 November 2005 (UTC)

Subst'ing PAGENAME and PAGENAMEE (and all other special variables) gains very little, since unlike normal templates (which causes database hits, slowdowns when purging, etcetera), they are replaced directly by the parser (and thus the cost is almost nothing). Not subst'ing them, on the other hand, allows the value to change if the page is moved (which is why a lot of pages in the Wikipedia: namespace use {{PAGENAME}} as the category sort key, instead of copying the page name directly). --cesarb 21:09, 3 November 2005 (UTC)

I see. I've removed them from the list. // Pathoschild 01:42, 5 November 2005 (UTC)

Templates outside the Template: namespace

What will happen with templates that reside outside of the Template: namespace, (i.e. in the user namespace)? Will things like {{PAGENAME}} be subst'ed in them? If so, how can it be prevented? – ABCDe 01:07, 5 November 2005 (UTC)

The templates themselves would not be not touched; only their occurances in the article namespace (other namespaces are possible, but I doubt it). In that case, it doesn't make a difference whether the template originates in the user or template namespace. Further, if the bot will be a user-controlled bot, the user will decide. // Pathoschild 01:38, 5 November 2005 (UTC)

nowiki test

I suggest that the bot not do any replacements in pages which contain <nowiki>. This is used in replace.py as a way to detect pages which are discussing templates or presenting them in examples. (SEWilco 14:02, 7 November 2005 (UTC))

Perhaps it'd be more reasonable to ignore template tags that are actually between <nowiki> tags. That sounds rather difficult to do, though. // Pathoschild 05:14, 9 November 2005 (UTC)

{{sofixit}}

Why is {{sofixit}} listed as something not to substitute. I generally substitute this when I use it, and it seems like this is proper bot fodder. What am i missing here? DES (talk) 18:59, 7 November 2005 (UTC)

  • Ah. That would be because it's often used as a meme, by simply listing {{sofixit}}. Come to think of it that's not really a good reason, now is it? Ok, change it back. Radiant_>|< 23:29, 7 November 2005 (UTC)
    • If someone wants to invoke the meme, not the text, s/he should write {{tl|sofixit}} or just "sofixit", neither of which the bot wioll touch, i presume. DES (talk) 01:10, 8 November 2005 (UTC)

subst'ing user talk pages

Before my bot starts subst'ing thousands of templates, can I confirm that we think it's a good idea to subst user talk pages, as it means thousands of users are going to get a "you have new messages" notice, and possibly be confused by the fact they have no message. Martin 19:06, 7 November 2005 (UTC)

  • Perhaps if changes are made to a user's page the bot could add a section "Subst-bot was here" with content "Templates on this page were substituted as per Wikipedia:Subst " DES (talk) 19:39, 7 November 2005 (UTC)
  • Are user pages viewed often enough that transclusion of these templates causes significant server load? (SEWilco 19:52, 7 November 2005 (UTC))
  • I think that user talk pages for active users are considerably more frequently viewed than articles on obscure topics. DES (talk) 19:57, 7 November 2005 (UTC)
  • I dont think adding a message is a good idea, it would be a bit of an overkill, an edit summary should be good enough if we think it is worth it at all, plus I can't make my bot add a message very easily. thanks Martin 20:12, 7 November 2005 (UTC)
  • Nah, just use the edit summaries. That's what they're there for. And any active user is likely to have a bunch of daily messages anyway, and any non-active user is likely not to notice, so I don't think it's a disturbance. Radiant_>|< 00:30, 8 November 2005 (UTC)

Proposed -> guideline

If we are about to start actign on thsi, shouldn't the "proposed" tag be changed to {{guideline}} or even {{policy}}? DES (talk) 20:50, 7 November 2005 (UTC)

Yeah, I'd say it is a guidline now. Martin 20:58, 7 November 2005 (UTC)
  • Guideline is fine, but then we should probably move the page to a more comprehensive title. How about "template substitution"? Radiant_>|< 23:29, 7 November 2005 (UTC)
  • Whatever we call it, it should be merged with Help:Subst, I dont like having seperate pages on the same thing. Martin 23:35, 7 November 2005 (UTC)
  • I disageee with ther merge, Help:Subst is about how to use subst, and ewhat it does, this page is about what templates must be subst'd, adn wil be auto-subst'd. But I will add a link. DES (talk) 00:49, 8 November 2005 (UTC)
I support the merge. Help:Subst explains subst, while this page lists templates that should be subst'ed. The fact that two bots now use this list as a reference point for subst'ing isn't what most readers will be interested in, and therefore no split is necessary. Bluemoose merged the two pages and added some information, which I then expanded somewhat. // Pathoschild 05:11, 9 November 2005 (UTC)

old conversations about why the use of subst

the project page should explain why the use of subst as a technical issue. -- Zondor 04:08, 8 November 2005 (UTC)

Bluemoose has merged Help:Subst with this page, and I subsequently expanded on the information. // Pathoschild 05:11, 9 November 2005 (UTC)

strikeout?

Some deletion-related templates were struck out on the main page, but no reason for that was given. I've restored them for now, maybe we should discuss it? It concerns {{tfd}} and the umbrella versions of {{cfd}}. Radiant_>|< 14:10, 9 November 2005 (UTC)

{{cfdu}} {{cfr}} {{cfru}} {{cfm}} has some no include information. -- Zondor 14:24, 9 November 2005 (UTC)
  • Ah, thanks. However, they shouldn't have noinclude sections - since it's a longstanding tradition that {{afd}} must always be subst'ed, people have a tendency to also subst related templates such as these. Last week I removed the noinclude parts from {{cfd}} among others because it screwed up some cats; looks like I missed these. Radiant_>|< 14:31, 9 November 2005 (UTC)

Document use in Edit summaries?

It seems like Wikipedia:Template_substitution should strongly encourage editors following this guideline to document the specific message they subst'd in the Edit summary whenever they do it. For example, if I look at a user Talk page and see {{test2}} I know exactly what level of warning they are on. But if I just see a bunch of text, I don't know unless I look it up (no, I have not memorized the exact text of all the various {test__} messages). If I see {{subst:test2}} in the History, then I get the info much quicker. Waterguy 19:42, 10 November 2005 (UTC)

I already do this (although I'll use {{test}} even though my tag was actually {{subst:test}}), and comments were recently added to the test templates' text so that you can see what level it if if it does get subst'd. -Greg Asche (talk) 22:08, 10 November 2005 (UTC)
Specifically for the test tempaltes, they all now include an HTML comment showing the anme of the templte, so if you edit the page you can see exactly what tempalte was used, adn need not depend on any edit summery. Any other tempalte on the auto-subst list can include a similar comment. Still encouraging an explicit mention in the edit summery is not a bad idea. DES (talk) 19:12, 11 November 2005 (UTC)

{{delete}} and other speedy delete tags

Someone suggested {{delete}} for substing. I think this is a bad idea -- in fact I think all the speedy delete tags should be listed in the "do not subst" section. My reasons are:

  1. All these templaates contain "noinclude" directives and "include only" direcives which are not well handled by subst.
  2. If a patroller considers the nomiantion invalid, the normal remady is to remove the tag, which is much harder if it has been subst'ed
  3. These tages will rarely if ever stay on an articel long -- either they are removed or the article is deleted, and the articels in question are usually not frequently viewed. Therefore these tags contribute little to server load.
  4. When such articles are deleted, if one of the reason-sepcific tags (such as {{nonsense}} or {{db-bio}}) is used and not substed, the tag name will generally appear in the deletion log, thus clearly documeting the deletion reason. This doesn't apply to {{delete}} but it does to most of the otehr speedy tags.
  5. The expanded code is fairly lengthy and includes significant formatting which burdens possible future editing.
  6. In a diff the un-subst'd tag makes particualrtly clear what the tagger did.

I hope that others will agree with my reasoning here. DES (talk) 17:19, 14 November 2005 (UTC)

Yes, I don't subst'ed them for those reasons. Martin 17:25, 14 November 2005 (UTC)
  • In the absence of any objections I have listed these in the "should NOT be subst'd" section on the project page. DES (talk) 16:31, 15 November 2005 (UTC)

Help request

I need some help watching over Category:Internal link templates. This category tag should in almost all cases be on the template's talk page, because people have a tendency to subst those templates. Noinclude sections can be considered harmful in many cases and its use should not be automatic. I think it may be worthwhile to get a SQL-queried list of all templates that have a 'noinclude' section, because they are already screwing up a number of categorizations. Radiant_>|< 10:25, 15 November 2005 (UTC)

A recent software fix corrected this problem, and <noinclude> are no longer a problem for subst'ing. // Pathoschild 02:25, 27 November 2005 (UTC)

CfD related tempaltes and include tags

{{cfdu}}, {{cfr}}, {{cfru}}, and {{cfm}} all contain both noinclude and includeonly directives at the current time. Perhaps i was mistaken, but I understood these not to work well with subst. I think that either these tempaltes should be removed from the "always subst" list, or they should be edited not to use the include feature, until and unless the software is altered to improve the interaction between noinclude/includeonly and subst. DES (talk) 21:36, 15 November 2005 (UTC)

Mysterious pretty table usage

Lots of UK Parliament constituency articles e.g. Clwyd South (UK Parliament constituency) are on the what links here of the prettytable template, yet they do not contain the prettytable template. Now you're all thinking that is because the prettytable template is in another template in the mentioned article, well it isn't (afaict). I can't tell how these articles contain the prettytable template at all, so I can't subst: them. Anyone know what is going on? Martin 16:19, 17 November 2005 (UTC)

  • What happened here is that a template in those articles used to contain {{prettytable}}, but it doesn't any more, and because of a lack of database recursion, a cache wasn't updated, and the whatlinkshere still falsely lists those pages. Indeed, I did a null edit on West Tyrone (UK Parliament constituency), and it disappeared from Template:Prettytable's whatlinkshere. So I think that your bot should do a null edit if it encounters a linked page that doesn't actually contain the template. Radiant_>|< 11:59, 18 November 2005 (UTC)
  • I see, I'll null edit them soon, thanks Radiant! Martin 13:26, 18 November 2005 (UTC)