Jump to content

Wikipedia talk:WikiProject Templates: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
→‎Me first template: hellip - html shortcut
(7 intermediate revisions by 2 users not shown)
Line 22: Line 22:
[[Template:Talk_header_for_guidelines]] needs a makeover. It's based on [http://en.wikipedia.org/w/index.php?title=Template:Talk_header&oldid=79555893 the October 2006 version] of [[Template:Talk header]], so it's years behind. --[[User:Michaeldsuarez|Michaeldsuarez]] ([[User talk:Michaeldsuarez|talk]]) 18:24, 27 April 2012 (UTC)
[[Template:Talk_header_for_guidelines]] needs a makeover. It's based on [http://en.wikipedia.org/w/index.php?title=Template:Talk_header&oldid=79555893 the October 2006 version] of [[Template:Talk header]], so it's years behind. --[[User:Michaeldsuarez|Michaeldsuarez]] ([[User talk:Michaeldsuarez|talk]]) 18:24, 27 April 2012 (UTC)


:I've taken a look and made [http://en.wikipedia.org/w/index.php?title=Template%3ATalk_header_for_guidelines&diff=489512511&oldid=316358102 a few changes] to it (superficial, mostly). Maybe the developer(s) of {{t|talkheader}} would be able/willing to update it. [[User:Benzband|<span style="color: green">benzband</span>]] ([[User talk:Benzband#Top|<span style="color: black">talk</span>]]) 19:00, 27 April 2012 (UTC)
:I've taken a look and made [http://en.wikipedia.org/w/index.php?title=Template%3ATalk_header_for_guidelines&diff=489512511&oldid=316358102 a few changes] to it (superficial, mostly). Maybe the developer(s) of {{tl|talkheader}} would be able/willing to update it. [[User:Benzband|<span style="color: green">benzband</span>]] ([[User talk:Benzband#Top|<span style="color: black">talk</span>]]) 19:00, 27 April 2012 (UTC)


== Question: "&lt;--" only in transclusion? ==
== Question: "&lt;--" only in transclusion? ==
Line 43: Line 43:
::I'm confused at what you are confused on? My question at [[Wikipedia:Requested_templates#Template_Help]] was:
::I'm confused at what you are confused on? My question at [[Wikipedia:Requested_templates#Template_Help]] was:


:::My template sometimes needs to make calls like <code><nowiki>{{Str number/trim|13<ref>a reference</ref>}}</nowiki></code> which return {{Str number/trim|13<ref>a reference</ref>}} rather than the correct answer of {{Str number/trim|13 <ref>a reference</ref>}} because the ref is being processed by the wiki software. Technically this is probably a bug in {{tl|Str number/trim}} and {{tl|Str letter/trim}} that should be fixed. The template makes this call via <code><nowiki>{{Str number/trim| {{{1}}} }}</nowiki></code>. I am wondering how I can call <code><nowiki><nowiki></nowiki></code> on <code><nowiki>{{{1}}}</nowiki></code>. It's worth noting that in testing even <code><nowiki>{{Str number/trim|<nowiki>13<ref>a reference</ref></nowiki>}}</nowiki></code> appears to return the incorrect results of {{Str number/trim|<nowiki>13<ref>a reference</ref></nowiki>}} nothing. If you would like to take a look at the code directly here is what I am working on: {{tl|Ranking movements/strip/sandbox}}.
:::My template sometimes needs to make calls like <code><nowiki>{{Str number/trim|13<ref>a reference</ref>}}</nowiki></code> which return <nowiki>{{Str number/trim|13<ref>a reference</ref>}}</nowiki> rather than the correct answer of <nowiki>{{Str number/trim|13 <ref>a reference</ref>}}</nowiki> because the ref is being processed by the wiki software. Technically this is probably a bug in {{tl|Str number/trim}} and {{tl|Str letter/trim}} that should be fixed. The template makes this call via <code><nowiki>{{Str number/trim| {{{1}}} }}</nowiki></code>. I am wondering how I can call <code><nowiki><nowiki></nowiki></code> on <code><nowiki>{{{1}}}</nowiki></code>. It's worth noting that in testing even <code><nowiki>{{Str number/trim|<nowiki>13<ref>a reference</ref></nowiki>}}</nowiki></code> appears to return the incorrect results of <code><nowiki>{{Str number/trim|<nowiki>13<ref>a reference</ref></nowiki>}}</nowiki></code> nothing. If you would like to take a look at the code directly here is what I am working on: {{tl|Ranking movements/strip/sandbox}}.


:::No confusion, just that you asked if you could ask for help here, and then promptly neglected to actually tell us what the problem was. I thought I'd rib you a bit on it. [[User:Vanisaac|Van]][[User talk:Vanisaac|Isaac]]<sub><small>[[WP:WikiProject Writing systems|WS]]</small></sub><sup style="margin-left:-2.9ex">[[Special:Contributions/Vanisaac|contribs]]</sup> 02:44, 16 May 2012 (UTC)
:::No confusion, just that you asked if you could ask for help here, and then promptly neglected to actually tell us what the problem was. I thought I'd rib you a bit on it. [[User:Vanisaac|Van]][[User talk:Vanisaac|Isaac]]<sub><small>[[WP:WikiProject Writing systems|WS]]</small></sub><sup style="margin-left:-2.9ex">[[Special:Contributions/Vanisaac|contribs]]</sup> 02:44, 16 May 2012 (UTC)


::The key part here is "I am wondering how I can call <code><nowiki><nowiki></nowiki></code> on <code><nowiki>{{{1}}}</nowiki></code>" or any other solutions you can think of to solve the problem really. The problem is with the ref tab which is processed by the wiki software. If the ref tag was not processed by the software it would stop at <code><</code> as it is not an acceptable character for {{tl|Str number/trim}}. E.g.: <code><nowiki>{{Str number/trim|13<reff>a reference</reff>}}</nowiki></code> -> {{Str number/trim|13<reff>a reference</reff>}} --[[User:Ben b|ben_b]] ([[User talk:Ben b|talk]]) 05:30, 15 May 2012 (UTC)
::The key part here is "I am wondering how I can call <code><nowiki><nowiki></nowiki></code> on <code><nowiki>{{{1}}}</nowiki></code>" or any other solutions you can think of to solve the problem really. The problem is with the ref tab which is processed by the wiki software. If the ref tag was not processed by the software it would stop at <code><</code> as it is not an acceptable character for {{tl|Str number/trim}}. E.g.: <code><nowiki>{{Str number/trim|13<reff>a reference</reff>}}</nowiki></code> -> <code><nowiki>{{Str number/trim|13<reff>a reference</reff>}}</nowiki></code> --[[User:Ben b|ben_b]] ([[User talk:Ben b|talk]]) 05:30, 15 May 2012 (UTC)
:::Putting nowiki before anything returns nothing since it's not seeing a number. The point of Str number/trim is it has to start with the number, so putting something in front of it defeats the purpose. As I said in the [[Wikipedia:Requested templates#Template Help|other thread]], the problem is the ref is messing up padleft. — [[User:Bility|Bility]] ([[User talk:Bility|talk]]) 16:40, 15 May 2012 (UTC)
:::Putting nowiki before anything returns nothing since it's not seeing a number. The point of Str number/trim is it has to start with the number, so putting something in front of it defeats the purpose. As I said in the [[Wikipedia:Requested templates#Template Help|other thread]], the problem is the ref is messing up padleft. — [[User:Bility|Bility]] ([[User talk:Bility|talk]]) 16:40, 15 May 2012 (UTC)
::::In the first example, the {{cite.php}} software is going to parse the content of the {{tag|ref|o}} tag. In the second, the {{tag|nowiki|o}} will escape the content of the {{tag|ref|o}} tag; see {{Bug|22555}}. ---'''''—&nbsp;[[User:Gadget850|<span style="color:gray">Gadget850&nbsp;(Ed)</span>]]<span style="color:darkblue">&nbsp;'''''</span><sup>[[User talk:Gadget850|''talk'']]</sup> 01:45, 16 May 2012 (UTC)
::::In the first example, the cite.php software is going to parse the content of the {{tag|ref|o}} tag. In the second, the {{tag|nowiki|o}} will escape the content of the {{tag|ref|o}} tag; see {{Bug|22555}}. ---'''''—&nbsp;[[User:Gadget850|<span style="color:gray">Gadget850&nbsp;(Ed)</span>]]<span style="color:darkblue">&nbsp;'''''</span><sup>[[User talk:Gadget850|''talk'']]</sup> 01:45, 16 May 2012 (UTC)


Here's a thought. Why don't you make an explicit "ref" parameter, so that anyone who tries to use the template will separate out any references from the main parameter. Then your template can call the trim templates with only the numbers / letters, then automatically place the reference after the result. The error might even help you because if someone does put the ''ref'' tag in, the result will look really wrong, and either the editor, or someone else will see to look at the template documentation, which shows a "ref" parameter, and gives them a clue that references don't belong in unnamed slots.
Here's a thought. Why don't you make an explicit "ref" parameter, so that anyone who tries to use the template will separate out any references from the main parameter. Then your template can call the trim templates with only the numbers / letters, then automatically place the reference after the result. The error might even help you because if someone does put the ''ref'' tag in, the result will look really wrong, and either the editor, or someone else will see to look at the template documentation, which shows a "ref" parameter, and gives them a clue that references don't belong in unnamed slots.
Line 66: Line 66:
:::I tested it, and yes, it seems to work now. Thank you! [[User:Coastside|Coastside]] ([[User talk:Coastside|talk]]) 07:01, 9 June 2012 (UTC)
:::I tested it, and yes, it seems to work now. Thank you! [[User:Coastside|Coastside]] ([[User talk:Coastside|talk]]) 07:01, 9 June 2012 (UTC)


== {{tlx|time ago}} transcluded effect ==
== time ago transcluded effect ==


I used {{tlx|time ago}} in a template. On the template page itself it functions as expected. Now when I transclude the template, the time used is that of the ''transcluding'' page (<nowiki>{{REVISIONTIMESTAMP}}</nowiki>). In this case, that is undesired. I'd like to read the template's time situation.
I used {{tlx|time ago}} in a template. On the template page itself it functions as expected. Now when I transclude the template, the time used is that of the ''transcluding'' page (<nowiki>{{REVISIONTIMESTAMP}}</nowiki>). In this case, that is undesired. I'd like to read the template's time situation.


Example in /sandbox and /testcases (edits welcome):
Example in /sandbox and /testcases (edits welcome):
* {{ti|Periodic table by article quality/sandbox}} (copy the master template)
* {{tl|Periodic table by article quality/sandbox}} (copy the master template)
* {{ti|Periodic table by article quality/testcases}}
* {{tl|Periodic table by article quality/testcases}}
:(Original pages with this problem: {{tlx|Periodic table by article quality}} (source template), [[Wikipedia:WikiProject Elements/Articles/Periodic Table by Quality]]).
:(Original pages with this problem: {{tlx|Periodic table by article quality}} (source template), [[Wikipedia:WikiProject Elements/Articles/Periodic Table by Quality]]).


Line 101: Line 101:
While rummaging through the article alert bot pages, I came across a new, essentially unreferenced, BLP. When I went to the user's page, I was surprised to discover that there doesn't appear to be a template saying "you made a BLP, we appreciate it but this is why it's not so good, can you fix it plz kthx". So I prepared the following; does anyone else think this might be a helpful addition? - [[User:The Bushranger|The Bushranger]] <sub><font color="maroon">[[User talk:The Bushranger|One ping only]]</font></sub> 17:21, 19 June 2012 (UTC)
While rummaging through the article alert bot pages, I came across a new, essentially unreferenced, BLP. When I went to the user's page, I was surprised to discover that there doesn't appear to be a template saying "you made a BLP, we appreciate it but this is why it's not so good, can you fix it plz kthx". So I prepared the following; does anyone else think this might be a helpful addition? - [[User:The Bushranger|The Bushranger]] <sub><font color="maroon">[[User talk:The Bushranger|One ping only]]</font></sub> 17:21, 19 June 2012 (UTC)


{{{icon|[[File:Ambox Content.svg|23px|alt=|link=]]}}} Hi there, and welcome to Wikipedia. I that an article you recently created{{<includeonly>safesubst:</includeonly>#if:{{{1|}}}|, [[:{{{1}}}]],}} is a [[WP:BLP|biography of a living person]]; as a BLP, it must meet higher standards for referencing than other articles to be kept on Wikipedia. The article's references are currently not up to the standards required by the BLP policy; please note that unreferenced biographies of living people are likely to be deleted. Your contributions are appreciated and valued, so if you could add additional [[WP:RS|reliable]], [[WP:SECONDARY|secondary]] sources to the article that establish why this living person is [[WP:BIO|notable]], that would be great. Thanks, and I hope you enjoy your time on Wikipedia! {{{2|A fellow editor.}}}
{{{icon|[[File:Ambox Content.svg|23px|alt=|link=]]}}} Hi there, and welcome to Wikipedia. I that an article you recently created <code><nowiki>{{<includeonly>safesubst:</includeonly>#if:{{{1|}}}|, [[:{{{1}}}]],}}</nowiki></code> is a [[WP:BLP|biography of a living person]]; as a BLP, it must meet higher standards for referencing than other articles to be kept on Wikipedia. The article's references are currently not up to the standards required by the BLP policy; please note that unreferenced biographies of living people are likely to be deleted. Your contributions are appreciated and valued, so if you could add additional [[WP:RS|reliable]], [[WP:SECONDARY|secondary]] sources to the article that establish why this living person is [[WP:BIO|notable]], that would be great. Thanks, and I hope you enjoy your time on Wikipedia! <nowiki>{{{2|A fellow editor.}}}</nowiki>


== Me first template ==
== Me first template ==
Line 107: Line 107:
I think this is the first time I've created a template and would like some feedback. It's at {{tl|Ellipsis}}. After a bit of feedback I intend to make it optionally-switchable between types of [[ellipsis]], thoughts on that would be appreciated too. <span style="background-color:#C0C0C0">[[User:Egg Centric|<font color="#222222">Egg</font>]] [[User_talk:Egg Centric|<font color="#7D7D7D">Centri</font>]][[Special:Contributions/Egg Centric|<font color="#FFFFFF">c</font>]]</span> 15:46, 15 July 2012 (UTC)
I think this is the first time I've created a template and would like some feedback. It's at {{tl|Ellipsis}}. After a bit of feedback I intend to make it optionally-switchable between types of [[ellipsis]], thoughts on that would be appreciated too. <span style="background-color:#C0C0C0">[[User:Egg Centric|<font color="#222222">Egg</font>]] [[User_talk:Egg Centric|<font color="#7D7D7D">Centri</font>]][[Special:Contributions/Egg Centric|<font color="#FFFFFF">c</font>]]</span> 15:46, 15 July 2012 (UTC)


:Looks good. Maybe you add that were possible, it should be substituted (<tt>{{tls|ellipsis}}</tt>)? Maybe also link to [[ellipsis]]: the article provides basic info on getting an ellipsis using the keyboard. [[User:Benzband|<span style="color: green">benzband</span>]] ([[User talk:Benzband#Top|<span style="color: black">talk</span>]]) 16:21, 15 July 2012 (UTC)
:Looks good. Maybe you add that were possible, it should be substituted (<nowiki><tt>{{tls|ellipsis}}</tt></nowiki>)? Maybe also link to [[ellipsis]]: the article provides basic info on getting an ellipsis using the keyboard. [[User:Benzband|<span style="color: green">benzband</span>]] ([[User talk:Benzband#Top|<span style="color: black">talk</span>]]) 16:21, 15 July 2012 (UTC)
::Good template.
::Good template.
::For the option thing: I just listed them in [[ellipsis#Unicode]] (another good thing your template did, they were missing). See what I did in the {{tlx|ellipsis/sandbox}}. It uses: 1. optional first parameter: {{code|1=<nowiki>{{{1|}}}</nowiki>}}. 2. Input into lowercase {{code|1=<nowiki>{{lc: }}</nowiki>}} to catch all input. 3. The {{code|1=<nowiki>{{#switch: }}</nowiki>}}. 4. Including the #switch thing {{code|1=#default=}}. I added some -not all- options. If you get the "parameter 1" thing you'll be king, and if you get the #switch essentials you are emperor. Next step could be owning Wikipedia. Have a nice edit. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 17:01, 15 July 2012 (UTC)
::For the option thing: I just listed them in [[ellipsis#Unicode]] (another good thing your template did, they were missing). See what I did in the {{tlx|ellipsis/sandbox}}. It uses: 1. optional first parameter: {{code|1=<nowiki>{{{1|}}}</nowiki>}}. 2. Input into lowercase {{code|1=<nowiki>{{lc: }}</nowiki>}} to catch all input. 3. The {{code|1=<nowiki>{{#switch: }}</nowiki>}}. 4. Including the #switch thing {{code|1=#default=}}. I added some -not all- options. If you get the "parameter 1" thing you'll be king, and if you get the #switch essentials you are emperor. Next step could be owning Wikipedia. Have a nice edit. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 17:01, 15 July 2012 (UTC)
::So it is used: {{tlx|ellipsis/sandbox|vertical|}} &rarr; {{ellipsis/sandbox|vertical}} -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 17:03, 15 July 2012 (UTC)
::So it is used: {{tlx|ellipsis/sandbox|vertical|}} &rarr; <code><nowiki>{{ellipsis/sandbox|vertical}}</nowiki></code> -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 17:03, 15 July 2012 (UTC)
::I have created a redirect to your template, because it may be spelled wrong (how do I know?): {{tlx|elipsis}}. And from [[template:hellip]] too, the html shortcut. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 17:08, 15 July 2012 (UTC)
::I have created a redirect to your template, because it may be spelled wrong (how do I know?): {{tlx|elipsis}}. And from [[template:hellip]] too, the html shortcut. -[[User:DePiep|DePiep]] ([[User talk:DePiep|talk]]) 17:08, 15 July 2012 (UTC)

== Request ==

I have a request pertaining to {{tl|Infobox music of}}, which is a template that's used to standardize the appearance of many "Music of individual country" navboxes. The problem is that {{tl|Infobox music of}} uses an entry field within the individual navboxes (e.g. {{tl|Music of Canada}}) to automatically generate and transclude a top-level category (e.g. {{cl|Canadian music}}) onto each and every article that the child template is added to, even if the article is already in a more appropriate subcategory (e.g. {{cl|Canadian music awards}}).

The result is that the only way to properly [[WP:DIFFUSE|diffuse]] the parent category to avoid duplicate categorization ends up being to remove the template entirely from pages where it ''should'' ordinarily be used. And, in fact, this very issue is one of the reasons why Wikipedia actually deprecates [[WP:TEMPLATECAT|using templates to artificially transclude categories onto articles]] in the first place, meaning that {{tl|Infobox music of}} shouldn't really be pushing extra categories onto articles at all; normally a page should only appear in categories that have been directly applied to the page itself, not in categories that have been imported by a template.

Thus I need to request one of two solutions — either the category-generating code in {{tl|Infobox music of}} should be removed entirely, so that the template never transcludes any categories at all, or such transclusion should be made optional using [[WP:CATSUP|category suppression]], so that the extra category can be turned off in cases where it's not wanted without interfering with the ability to use it in other cases. However, as I'm not well-versed in how to work with template coding syntax, I don't know how to do either one myself — which is why I'm requesting assistance. It's also worth noting, for the record, that this is ''not'' the first time I've asked for this. Thanks. [[User:Bearcat|Bearcat]] ([[User talk:Bearcat|talk]]) 21:52, 21 July 2012 (UTC)

Revision as of 22:06, 21 July 2012

Template for graphs

fr:Modèle:Graphique polygonal is a very interesting template for flexible graphs. Do we have something similar or would it be worth the while to translate it?  Sandstein  11:38, 17 April 2012 (UTC)[reply]

Looks like they're using EasyTimeline, which we have installed here (it's what powers most of these templates). Also see WP:GRAPH. — Bility (talk) 15:50, 17 April 2012 (UTC)[reply]
Thanks, that's interesting, but we do not seem to have a template for line charts, as in the French example. I'll try to port it.  Sandstein  20:25, 17 April 2012 (UTC)[reply]
Done, at {{Line chart}}.  Sandstein  22:00, 17 April 2012 (UTC)[reply]

Template:Talk_header_for_guidelines

Template:Talk_header_for_guidelines needs a makeover. It's based on the October 2006 version of Template:Talk header, so it's years behind. --Michaeldsuarez (talk) 18:24, 27 April 2012 (UTC)[reply]

I've taken a look and made a few changes to it (superficial, mostly). Maybe the developer(s) of {{talkheader}} would be able/willing to update it. benzband (talk) 19:00, 27 April 2012 (UTC)[reply]

Question: "<--" only in transclusion?

Hi. Some templates insert comments when substituded, like {{no more links}}. Assume we've got <!-- comment-xyz --> in Template:xyz. I'd like to make it:

  1. When transcluded, it's <!-- comment-xyz -->
  2. In Template:xyz, it's &lt;-- comment-xyz -->

Is it possible? I think it'll make the template doc less prone to getting obsolete, since the template content is printed at the top of Template:xyz. Thanks beforehand.--Ahora (talk) 12:45, 29 April 2012 (UTC)[reply]

This could be handled by using <includeonly>...</includeonly> around the comment syntax and <noinclude>...</noinclude> around <pre> tags to display the text on the template. — Bility (talk) 18:50, 29 April 2012 (UTC)[reply]

Sorry, I asked wrongly. Suppose the comment body is long, and I'd like to write the body only once, sharing it both for noinclude and includeonly. Put differently, is it possible to apply noinclude and includeonly only to <-- part by some complicated trick? Thanks Bility for your answer.--Ahora (talk) 00:33, 30 April 2012 (UTC)[reply]

You can surround any body of text within <noinclude> and </noinclude>, and it only applies to whatever body of text is between them, in this case, the word "and". Same thing with includeonly tags. VanIsaacWScontribs 00:50, 30 April 2012 (UTC)[reply]

Here's an example: Template:No more links/sandbox. — Bility (talk) 05:02, 30 April 2012 (UTC)[reply]

Thanks! It's simpler than I feared. :) --Ahora (talk) 05:40, 30 April 2012 (UTC)[reply]

Template Help

Where is the appropriate place to request help with a template? I have posted on Wikipedia:Requested_templates#Template_Help but on second thought this may also be the correct place to post. --ben_b (talk) 23:36, 14 May 2012 (UTC)[reply]

Ok, but you didn't actually request any help with anything here. I'll be perfectly frank with you, I checked at the requested templates thread, and I work a lot better with numbers than strings, so this is a bit out of my league, but I think if you wrote it up here, you would find some people with good expertise on these sorts of problems. I'm wondering if a 1 is getting past the {{Str number/logic}} sieve, so the whole ref line is getting treated as a number. It's a thought, but I don't know how good a one. VanIsaacWScontribs 04:05, 15 May 2012 (UTC)[reply]
I'm confused at what you are confused on? My question at Wikipedia:Requested_templates#Template_Help was:
My template sometimes needs to make calls like {{Str number/trim|13<ref>a reference</ref>}} which return {{Str number/trim|13<ref>a reference</ref>}} rather than the correct answer of {{Str number/trim|13 <ref>a reference</ref>}} because the ref is being processed by the wiki software. Technically this is probably a bug in {{Str number/trim}} and {{Str letter/trim}} that should be fixed. The template makes this call via {{Str number/trim| {{{1}}} }}. I am wondering how I can call <nowiki> on {{{1}}}. It's worth noting that in testing even {{Str number/trim|<nowiki>13<ref>a reference</ref>}}</nowiki> appears to return the incorrect results of {{Str number/trim|<nowiki>13<ref>a reference</ref>}}</nowiki> nothing. If you would like to take a look at the code directly here is what I am working on: {{Ranking movements/strip/sandbox}}.
No confusion, just that you asked if you could ask for help here, and then promptly neglected to actually tell us what the problem was. I thought I'd rib you a bit on it. VanIsaacWScontribs 02:44, 16 May 2012 (UTC)[reply]
The key part here is "I am wondering how I can call <nowiki> on {{{1}}}" or any other solutions you can think of to solve the problem really. The problem is with the ref tab which is processed by the wiki software. If the ref tag was not processed by the software it would stop at < as it is not an acceptable character for {{Str number/trim}}. E.g.: {{Str number/trim|13<reff>a reference</reff>}} -> {{Str number/trim|13<reff>a reference</reff>}} --ben_b (talk) 05:30, 15 May 2012 (UTC)[reply]
Putting nowiki before anything returns nothing since it's not seeing a number. The point of Str number/trim is it has to start with the number, so putting something in front of it defeats the purpose. As I said in the other thread, the problem is the ref is messing up padleft. — Bility (talk) 16:40, 15 May 2012 (UTC)[reply]
In the first example, the cite.php software is going to parse the content of the <ref> tag. In the second, the <nowiki> will escape the content of the <ref> tag; see Template:Bug. ---— Gadget850 (Ed) talk 01:45, 16 May 2012 (UTC)[reply]

Here's a thought. Why don't you make an explicit "ref" parameter, so that anyone who tries to use the template will separate out any references from the main parameter. Then your template can call the trim templates with only the numbers / letters, then automatically place the reference after the result. The error might even help you because if someone does put the ref tag in, the result will look really wrong, and either the editor, or someone else will see to look at the template documentation, which shows a "ref" parameter, and gives them a clue that references don't belong in unnamed slots.

If you can't fix the error, give people an alternate to causing the error in the first place, eh? VanIsaacWScontribs 03:12, 16 May 2012 (UTC)[reply]

RfC notice

3OR template bug on Project pages

It appears to me the {{3OR}} template has a bug when placed on a Wikiproject talk page. When {{subst:3OR|<text of opinion requested>|<response>|d=<anything>}} is placed on a Wikiproject talk page with the parameter "d=yes", the template expands to provide a full reply. However, the link to the relevant page, i.e., "... I have made no previous edits on <link to article>", produces an empty link. The template doesn't add the necessary "Wikipedia:" prefix to the link, or something like that. The same bug occurs in sandbox and user talk pages. Anyone know how to go about fixing this? Coastside (talk) 13:25, 8 June 2012 (UTC)[reply]

So, currently, it will subst in the variable PAGENAME. I think it should actually be SUBJECTPAGENAME. I'm going to go ahead and change it and test the result, but if anyone knows of any sneaky problems, feel free to revert me, because I don't really know all the nuance of variables and magic words. VanIsaacWScontribs 00:55, 9 June 2012 (UTC)[reply]
It seems to work now. VanIsaacWScontribs 01:01, 9 June 2012 (UTC)[reply]
I tested it, and yes, it seems to work now. Thank you! Coastside (talk) 07:01, 9 June 2012 (UTC)[reply]

time ago transcluded effect

I used {{time ago}} in a template. On the template page itself it functions as expected. Now when I transclude the template, the time used is that of the transcluding page ({{REVISIONTIMESTAMP}}). In this case, that is undesired. I'd like to read the template's time situation.

Example in /sandbox and /testcases (edits welcome):

(Original pages with this problem: {{Periodic table by article quality}} (source template), Wikipedia:WikiProject Elements/Articles/Periodic Table by Quality).

Any suggestions? -DePiep (talk) 15:32, 13 June 2012 (UTC)[reply]

Looking for a template

I'm looking for a template that will truncate leading zeros off the front of a hex number. I haven't been able to find one that can be adapted in all the Template:String templates see also text to no avail. It seems like this should already exist, but I've been trying every search term I can think of. Anybody know if this guy exists? I'd hate to spend the time recreating something that's already been done. VanIsaacWScontribs 22:59, 13 June 2012 (UTC):[reply]

I am working on one, today. Will be back here. -DePiep (talk) 08:00, 15 June 2012 (UTC)[reply]
I was hoping it would already exist. I'm looking to improve the presentation of HTML numeric character references for a template I am testing out at User:Vanisaac/charmap for writing systems character articles. VanIsaacWScontribs 08:30, 15 June 2012 (UTC)[reply]
Ooo! I think I just thought of an elegant way of doing this recursively. I wonder if the template architecture would balk at that. VanIsaacWScontribs 08:59, 15 June 2012 (UTC)[reply]
Recursion will give a warning and someone from WikiMedia will come over to edit in your userspace (howdo I know this)...
At {{unichar}}, it is solved: a) require valid hex input (leading 0 accepted), b) calculate to decimal once (needed in various subtemplates, we can use #ifexpr: and maths), c) recalc & format the decimal into U+hex for presentation: U+0069. -DePiep (talk) 09:36, 15 June 2012 (UTC)[reply]
Actually, that's a really good idea, and I think I'll use it. Thanks. The general template should still exist, though. This can't be the only time something like this would be handy. VanIsaacWScontribs 10:15, 15 June 2012 (UTC)[reply]

This affects the navigation archive box at WP:UNDELETE when the template max is exceeded. Searches are unaffected.--Trevj (talk) 12:08, 1 September 2011 (UTC)[reply]

Workaround to avoid using {{Archive list long}} now in place at WP:UNDELETE - see Template talk:Archive list long.--Trevj (talk) 18:47, 3 October 2011 (UTC)[reply]

Moved thread from WP:Requests_for_comment/Request_board Coastside (talk) 16:34, 14 June 2012 (UTC)[reply]

There is a discussion about a possible issue with template:linkSummaryLive at Wikipedia talk:WikiProject Spam#Google showing a spam link. --Guy Macon (talk) 09:53, 19 June 2012 (UTC)[reply]

uw-ublp?

While rummaging through the article alert bot pages, I came across a new, essentially unreferenced, BLP. When I went to the user's page, I was surprised to discover that there doesn't appear to be a template saying "you made a BLP, we appreciate it but this is why it's not so good, can you fix it plz kthx". So I prepared the following; does anyone else think this might be a helpful addition? - The Bushranger One ping only 17:21, 19 June 2012 (UTC)[reply]

Hi there, and welcome to Wikipedia. I that an article you recently created {{<includeonly>safesubst:</includeonly>#if:{{{1|}}}|, [[:{{{1}}}]],}} is a biography of a living person; as a BLP, it must meet higher standards for referencing than other articles to be kept on Wikipedia. The article's references are currently not up to the standards required by the BLP policy; please note that unreferenced biographies of living people are likely to be deleted. Your contributions are appreciated and valued, so if you could add additional reliable, secondary sources to the article that establish why this living person is notable, that would be great. Thanks, and I hope you enjoy your time on Wikipedia! {{{2|A fellow editor.}}}

Me first template

I think this is the first time I've created a template and would like some feedback. It's at {{Ellipsis}}. After a bit of feedback I intend to make it optionally-switchable between types of ellipsis, thoughts on that would be appreciated too. Egg Centric 15:46, 15 July 2012 (UTC)[reply]

Looks good. Maybe you add that were possible, it should be substituted (<tt>{{tls|ellipsis}}</tt>)? Maybe also link to ellipsis: the article provides basic info on getting an ellipsis using the keyboard. benzband (talk) 16:21, 15 July 2012 (UTC)[reply]
Good template.
For the option thing: I just listed them in ellipsis#Unicode (another good thing your template did, they were missing). See what I did in the {{ellipsis/sandbox}}. It uses: 1. optional first parameter: {{{1|}}}. 2. Input into lowercase {{lc: }} to catch all input. 3. The {{#switch: }}. 4. Including the #switch thing #default=. I added some -not all- options. If you get the "parameter 1" thing you'll be king, and if you get the #switch essentials you are emperor. Next step could be owning Wikipedia. Have a nice edit. -DePiep (talk) 17:01, 15 July 2012 (UTC)[reply]
So it is used: {{ellipsis/sandbox|vertical}}{{ellipsis/sandbox|vertical}} -DePiep (talk) 17:03, 15 July 2012 (UTC)[reply]
I have created a redirect to your template, because it may be spelled wrong (how do I know?): {{elipsis}}. And from template:hellip too, the html shortcut. -DePiep (talk) 17:08, 15 July 2012 (UTC)[reply]

Request

I have a request pertaining to {{Infobox music of}}, which is a template that's used to standardize the appearance of many "Music of individual country" navboxes. The problem is that {{Infobox music of}} uses an entry field within the individual navboxes (e.g. {{Music of Canada}}) to automatically generate and transclude a top-level category (e.g. Category:Canadian music) onto each and every article that the child template is added to, even if the article is already in a more appropriate subcategory (e.g. Category:Canadian music awards).

The result is that the only way to properly diffuse the parent category to avoid duplicate categorization ends up being to remove the template entirely from pages where it should ordinarily be used. And, in fact, this very issue is one of the reasons why Wikipedia actually deprecates using templates to artificially transclude categories onto articles in the first place, meaning that {{Infobox music of}} shouldn't really be pushing extra categories onto articles at all; normally a page should only appear in categories that have been directly applied to the page itself, not in categories that have been imported by a template.

Thus I need to request one of two solutions — either the category-generating code in {{Infobox music of}} should be removed entirely, so that the template never transcludes any categories at all, or such transclusion should be made optional using category suppression, so that the extra category can be turned off in cases where it's not wanted without interfering with the ability to use it in other cases. However, as I'm not well-versed in how to work with template coding syntax, I don't know how to do either one myself — which is why I'm requesting assistance. It's also worth noting, for the record, that this is not the first time I've asked for this. Thanks. Bearcat (talk) 21:52, 21 July 2012 (UTC)[reply]