Module talk:WikiProject banner/Archive 5: Difference between revisions

Content deleted Content added
MiszaBot II (talk | contribs)
m Archiving 3 thread(s) from Template talk:WPBannerMeta.
MiszaBot II (talk | contribs)
m Archiving 3 thread(s) from Template talk:WPBannerMeta.
Line 125:
 
I'm going to reply on [[Template talk:WikiProject Japan]]. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:09, 21 April 2009 (UTC)
== Banner substitution ==
 
Could we perhaps brainstorm some ideas of detecting and preventing editors from substituting project banners? There must surely be a way to do this. I have been spending some time finding substituted {{tl|WPAFC}} banners and there seem to over 200 of them. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 11:03, 12 April 2009 (UTC)
 
:I've done two templates: [[User:WOSlinker/Banner]] & [[User:WOSlinker/Banner/core]] to simulate [[Template:WPBannerMeta]] & [[Template:WPBannerMeta/core]].
 
You then need to try normal transculsion & substituting the test banner on a test page:
<pre>
{{User:WOSlinker/Banner|text=Test1}}
{{subst:User:WOSlinker/Banner|text=Test2}}
</pre>
 
And you'll see a warning & an extra category used for the substituted version. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 16:26, 12 April 2009 (UTC)
 
:That's all very well, but it's not {{tlx|WPBannerMeta}} that's being substituted (leaving direct calls to {{tlx|WPBannerMeta/core}} out in the wilderness). It's {{tlx|WikiProject Tulips}} being substituted to leave direct transclusions of {{tlx|WPBannerMeta}}; your idea would require each individual banner to implement the bulk of the anti-subst checks, with the extra difficulty of how to react to banners not correctly implementing the check. Could be tricky. But I admit, probably not as tricky as building a subst check system that is coded entirely in WPBM itself... <tt>:D</tt> <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 16:57, 12 April 2009 (UTC)
 
::Yes, the check would need to be an extra parameter added to each banner (just like small, category & listas) but the checking part would be in WPBannerMeta. The extra parameter should be written so that if it's blank then the banner isn't using the checking option and no warnings would ever be shown. Each banner that wanted subst checking would need to add something similar to:
<pre>
|substcheck = <includeonly>{{subst:</includeonly><includeonly>yesno|SUBST|SUBST}}</includeonly>
</pre>
and then WPBannerMeta would need to check if the substcheck parameter was equal to SUBST and then display a warning message or add another category. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 17:07, 12 April 2009 (UTC)
:::That looks like a nice neat and easy way to do it. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 22:47, 12 April 2009 (UTC)
Shall we implement this? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:10, 17 April 2009 (UTC)
:All it would take is adding
<pre>
{{#ifeq:{{{substcheck|}}}|SUBST|[[Category:WikiProject banners with substitution issues|{{PAGENAME}}]]}}
</pre>
in that bit at the end of WPBannerMeta (with possibly a better name for the category). Then project banners can opt-in if they want to. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 13:19, 17 April 2009 (UTC)
:Can we add an angry warning box as well? And what about simply [[:Category:Substituted WikiProject banners]]? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:28, 17 April 2009 (UTC)
::Got a draft version of an angry box at [[Template:WPBannerMeta/substwarning]]. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 16:42, 17 April 2009 (UTC)
:::That looks ok. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 18:41, 17 April 2009 (UTC)
<pre>{{#ifeq:{{{substcheck|}}}|SUBST|{{WPBannerMeta/substwarning}}}}</pre>
::::So is it better to display the warning ''as well as'' the banner or ''instead of''? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:27, 17 April 2009 (UTC)
Well I'm answering my own question and I decided that it's probably better to have it as well as. Therefore I suggest combining the two warnings pages into [[Template:WPBannerMeta/warnings]] and moving putting it on the main template instead of the core. I think we can use the existing category [[:Category:WikiProject banners with formatting errors]] for both types of error (with different sort key). I have proposed code at [[Template:WPBannerMeta/sandbox]]. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:15, 18 April 2009 (UTC)<p>
Oh, and instead of using the {{tl|yesno}} template, which creates a lot of mess when substituted, I suggest using a new one {{tl|substcheck}} which just contains the word "SUBST". &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:17, 18 April 2009 (UTC)<p>
Last thing: there are demonstrations of all combinations of the warnings at [[User:MSGJ/Sandbox3]] and [[User talk:MSGJ/Sandbox3]]. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:25, 18 April 2009 (UTC)
:Hmn, I wrote a response to the "as well as or instead of" question, also asking about why we were using {{tlx|yesno}}; seems to have got lost, but looks like you read my mind anyway! The warning look very good; I especially like the "Please replace it with this"... I just wonder if it's worth passing the {{para|class}} and {{para|importance}} parameters through so we can say "please replace it with ''this''" and not have them lose any assessments in the process...? Would be impossible to do it for any of the trigger parameters that get renamed, but we could do it for those two... Otherwise, I love it! <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 09:06, 19 April 2009 (UTC)
::Implemented. Hopefully there will be no problems ... Shall we add these to all the banners or just stick a information box on templatepage to advise of the new feature? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 07:36, 20 April 2009 (UTC)
:::Perhaps we should be building a 'queue' of changes that need to be rolled out to the banners; then we can run occasional bot runs to implement whatever changes are waiting all at once, minimise disruption to people's watchlists. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 09:07, 20 April 2009 (UTC)
::::Good idea. There might be a few things to do soon ... Umm, the substcheck syntax has wrecked the documentation layout because it's so long. I'm not sure how to fix it. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 09:37, 20 April 2009 (UTC)
:::::I fixed it, but god knows what it'll look like on small screens (or wide screens for that matter) <tT>:D</tt> <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 10:13, 20 April 2009 (UTC)
::::::Unfortunately it looks horrible on IE :( &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:13, 20 April 2009 (UTC)
 
=== istemplate niggles ===
#Regarding [http://en.wikipedia.org/w/index.php?title=Template:WPBannerMeta/warnings&curid=22465646&diff=284997894&oldid=284965829 this edit], it was deliberate not a slip: I was thinking that it might be simpler if we could enfore that sandboxes must use the subpagename rather than their fullpagename. It is my most common error when copying a sandbox over :)
#We seem to have a possible problem with /testcases pages. Unless category=no it is interpreted as templatepage which is not usually desirable. Would it be a good idea to put an exception for that in istemplate? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:13, 20 April 2009 (UTC)
::/testcases ''should'' always be {{para|category|no}}. If we included an exception in /istemplate for testcases not to be templatepages, then the locwarning message would start cropping up, telling them to set {{para|category|no}} anyway. I'm not sure if it's worth it, although it could probably be done fairly elegantly. But what about /Testcases, /test, /testing, etc etc?? We can't make exceptions for all of them. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 18:58, 22 April 2009 (UTC)
 
=== subst testcases ===
I don't suppose anyone could offer a method for testing subst detection functionality that doesn't actually involve substing the tested template? The only methods I am aware of which could even come close are typing <code><nowiki>{{subst:templatename}}</nowiki></code> while editing a page and clicking "preview", or substing the template into another template (e.g. {{tlf|templatename/substtest}}) which is then transcluded onto a testpage, but neither of these are completely optimal (since they both require extra steps, and the one that actually saves something still substs and must thus be re-substed with new versions of the template). If anyone is curious, I'm wondering about this for [[Template:WikiProject Anime and manga/testcases]] (and yeah, I ripped the subst detection code from here ^_^ ). <span style="white-space: nowrap;">「[[User:Dinoguy1000|ダイノ]][[User talk:Dinoguy1000|<span style="color: #080; font-weight: normal;">ガイ</span>]][[Special:Contributions/Dinoguy1000|<span style="color: #F90;">千</span>]]?!」<sup>(Dinoguy1000)</sup></span> 18:38, 22 April 2009 (UTC)
:I'm sorry there's too many long words in that question so I can't answer :P But I have another question. Are you going to keep reinventing the wheel or are you going to convert that template to WPBM :) &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 19:14, 22 April 2009 (UTC)
::Would transcluding a different page consisting only of <code><nowiki>{{<includeonly>subst:</includeonly>templatename}}</nowiki></code> work? [[User:Dendodge|<em style="color:blue">Den</em><em style="color:red">dodge</em>]] <sub>[[User talk:Dendodge|T]]</sub>\<sup>[[Special:Contributions/Dendodge|C]]</sup> 19:18, 22 April 2009 (UTC)
:::Maybe... I'd have to test, though. <span style="white-space: nowrap;">「[[User:Dinoguy1000|ダイノ]][[User talk:Dinoguy1000|<span style="color: #080; font-weight: normal;">ガイ</span>]][[Special:Contributions/Dinoguy1000|<span style="color: #F90;">千</span>]]?!」<sup>(Dinoguy1000)</sup></span> 19:21, 22 April 2009 (UTC)
 
== ASSESSMENT_CAT ==
 
On a similar note, it's been bugging me for some time that the syntax of {{Para|PROJECT}} as it applies to categories, and {{para|ASSESSMENT_CAT}}, are not the same: in the latter case you have to append "articles". Every instance of ASSESSMENT_CAT has to include the word "articles", as all [[:Category:FA-Class Foo articles]] cats have that word at the end. It's pointless, therefore, to have it as a separate parameter. We should change the syntax of {{para|ASSESSMENT_CAT}} to be just the "Foo" from "FA-Class Foo articles", just like {{para|PROJECT}} is. I'm reasonably confident that this can be done silently. If it can, is it a good idea? <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 09:30, 13 April 2009 (UTC)
:Could we add a tracking parameter to find out how many projects do not have ASSESSMENT_CAT either undefined, or defined as PROJECT articles? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 12:57, 17 April 2009 (UTC)
::None of them, unless you can find me a category in [[:Category:FA-Class articles]] that doesn't end with "articles". Setting {{para|ASSESMENT_CAT}} to something other than "Foo articles" would change this value too, so no one is going to be doing it. I'll knock up a tracking cat for templates actually using the parameter at all. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 13:15, 17 April 2009 (UTC)
::I've added a tracking cat [[:Category:WPBannerMeta banners using ASSESSMENT_CAT]] that should catch all uses of an explicit {{para|ASSESSMENT_CAT}} parameter (unless it's set to PROJECT articles, of course), and hopefully will sort them by the index of the substring "articles" in the parameter value, which is pretty neat. Any that pop up sorted under "-1" need to be investigated more thoroughly. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 13:21, 17 April 2009 (UTC)
:::I used "pages" in {{tl|WPAFC-admin}} because there are no articles :) When I said PROJECT above I was referring to the actual parameter name. Lots of different variations are used apart from PROJECT articles: ''PROJECT-related articles'', ''WikiProject PROJECT articles'', etc. etc. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:31, 17 April 2009 (UTC)
::::Trus you to be responsible for the one anomaly <tt>:P</tt> I see what you mean, and while I don't like them, they are unavoidable, and the reason for the parameter in the first place. My point is that they all have the common feature of ending in "articles", so we can (assuming we can do it silently) move that part into WPBM proper and thus improve the consistency of the syntax. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 15:26, 17 April 2009 (UTC)
:::::Well, if it's only AFC that's the anomaly then I suppose I won't stand in the way :) But this seems like one of those situations where it would have been better to do something differently in hindsight but perhaps not worth the bother in changing it. I hope you don't mind me saying, but the COMMENT -> COMMENTS change has got to be the biggest waste of expert template coders time ever! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 16:18, 17 April 2009 (UTC)
::::::Looks like it's only AfC and the mysterious [[Wikipedia:WikiProject Editing trends|WikiProject Editing trends]] that use anything other than "articles". I largely agree with you, this would have been much easier a long time ago. But it's the little things that make the big things happen <tt>:D</tt> <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 10:16, 20 April 2009 (UTC)
:::::::Okay, WPAFC won't stand in the way of progress ;) By the way, I thought I'd offended you there for a while. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:24, 20 April 2009 (UTC)
::::::::What, by calling me an expert template coder? Yes, mortally <tt>:D</tt>. Now watch how much time I waste on the Image &rarr; File conversion! <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 18:59, 22 April 2009 (UTC)
 
== Help with peer review hook ==
 
There was an error with the ''title'' parameter of the peer review hook. I tried to fix it but it's not working correctly yet. We've got
<pre>{{SUBJECTPAGENAME{{#if:{{{title|}}}|:{{{title}}}}}}}</pre>
The problem is that the colon is acting as an indent for some reason. Help please. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:59, 20 April 2009 (UTC)
:One possible way might be to do this. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:01, 20 April 2009 (UTC)
<pre>{{SUBJECTPAGENAME:{{#if:{{{title|}}}|{{{title}}}|{{FULLPAGENAME}}}}}}</pre>
::That should be safe. What is the problem, exactly? It can probably be filed as a bug. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 14:10, 20 April 2009 (UTC)
:::I tried to explain as best I could ... the colon in <nowiki>:{{{title}}}</nowiki> is interpreted as a paragraph indent rather than a colon which the magic word requires. Therefore the output looks like
{{SUBJECTPAGENAME
:something}}
:::and the magic word doesn't get parsed properly. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:16, 20 April 2009 (UTC)
::::WTF!?! That's crazy! <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 15:34, 20 April 2009 (UTC)
:::::Yeah, this is actually a bug that affects all characters which are used to denote list wikimarkup, and one I've bashed my head against trying to fix more than once (unfortunately, there are often cases where simply enclosing it in &lt;nowiki/> tags won't work, such as the above (I think)). I have the distinct feeling that the only reason other markup doesn't do this as well is because list wikimarkup is really the only type that requires a single character to trip the parser. <span style="white-space: nowrap;">「[[User:Dinoguy1000|ダイノ]][[User talk:Dinoguy1000|<span style="color: #080; font-weight: normal;">ガイ</span>]][[Special:Contributions/Dinoguy1000|<span style="color: #F90;">千</span>]]?!」<sup>(Dinoguy1000)</sup></span> 18:44, 22 April 2009 (UTC)