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

Content deleted Content added
MiszaBot II (talk | contribs)
m Archiving 2 thread(s) from Template talk:WPBannerMeta.
MiszaBot II (talk | contribs)
m Archiving 4 thread(s) from Template talk:WPBannerMeta.
Line 283:
::It occurs to me now that you might have meant the main banner image rather than the portal image. In which case, you can just tweak my code! &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 19:18, 21 March 2009 (UTC)
:::Yeah, i was meaning replacing the banner image with the portal image, but the other thing that has happened is fair as well. [[User:Simply south|Simply south]] ([[User talk:Simply south|talk]]) 20:45, 21 March 2009 (UTC)
== Comments ==
 
Would there be any concerns about having a templatepage version of the comments subtemplate? I think it would be helpful to see that on the templatepage. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 13:09, 9 March 2009 (UTC)
:I think that would be a good idea; but how do you suggest it should be designed? <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 14:23, 9 March 2009 (UTC)
::I think the version in [[Template:WPBannerMeta/comments/sandbox]] should work. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 15:20, 10 March 2009 (UTC)
:::Tried it, it doesn't work, because the call in /templatepage sets {{para|category|no}}, and /istemplatepage therefore decides that it's not a templatepage (and has to do so, or genuine examples in template documentation would break). <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 16:45, 10 March 2009 (UTC)
::::Puzzled. Why is it any different to the many other templatepage versions of things that we have? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 16:49, 10 March 2009 (UTC)
:::::It's because the /comments stuff is part of the core banner, but isn't called by an explicit parameter. For things like taskforces or notes, we do some clever stuff on /templatepage to see if the parameter is defined, and always set it to yes in that one demo; there's nothing in /taskforce that checks for is-templatepage-ness. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 17:02, 10 March 2009 (UTC)
 
On a related note, I like you moving the {{para|COMMENTS_CAT}} default out into the mask where it belongs; but I've reverted your change from {{para|COMMENTS_CAT}} to {{para|COMMENT_CAT}}. While that's something that's bugged me for a while, I think the way to resolve it is to change the external syntax to the plural form. Otherwise we still have the external inconsistency of the main parameter {{para|COMMENTS}} being plural, but the others being singular. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 14:23, 9 March 2009 (UTC)
:Just posted on your talkpage about this. I care little about semantics, but I do care that it took me half an hour to debug some code on templatepage due to the slightly different parameter name on different templates :) Whatever it is called, it should be the same on all, IMHO. &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 14:27, 9 March 2009 (UTC)
::{{done}} transition complete. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 20:34, 25 March 2009 (UTC)
 
== Please pass parameters FQS and B_CHECKLIST on to custom overrides of WPBannerMeta/class ==
 
{{tlx|editprotected}}
{{tl|WPBannerMeta}} passes the FQS parameters and B_CHECKLIST parameters to {{tl|WPBannerMeta/class}}, but at the top of WPBannerMeta/class, when it checks for a custom class override, it doesn't pass those parameters on to the {{{BANNER_NAME}}}/class template, as opposed to the class and b1 through b6 parameters which are passed through.
 
Please pass those parameters through to the customized class template so they can utilize them. [[User:DeFaultRyan|DeFaultRyan]] ([[User talk:DeFaultRyan|talk]]) 16:10, 13 March 2009 (UTC)
:They are not needed because a custom class mask is only relevant to one banner and so the values of those two parameters are known and the mask can be designed with them in mind. Is there a particular banner you'd like help with? &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 16:23, 13 March 2009 (UTC)
::I appreciate the prompt reply, so I don't want to take an obnoxious tone here, but why would you tell me what is or isn't needed in my template? And if I've overlooked some feature of this template that makes this request moot, I apologize for wasting your time. That being said, it would be useful to have those parameters so I can make the class mask more robust in the face of changing the banner template, and other class masks are free to ignore the parameters like they always have. The banner in question is {{tl|WikiProject College football}}, and I've put the class mask in {{tl|WikiProject College football/class}}. The main reason for the existence of this class is to support more extended assessment classes (future, current, needed, etc). The rest of the behavior works just fine for me, so I'd like to have access to the FQS and B_CHECKLIST parameters so I don't have to rewrite the class mask if/when we modify the parent banner to use the B-Class checklist option. If those parameters are passed through, I can leave the default behavior in place and it will work as-is when we enable the checklist. Even better would be a way to enable those extended classes as an option in {{tl|WPBannerMeta}} directly, in order to leave in the rest of the default behavior (such as the notices that show up when an assessment category is missing) and completely eliminating the need for my custom mask in the first place. I'd imagine that there are other projects that would like to support these assessment extra assessment classes, but don't need any other type of custom class mask functionality. Perhaps something like QUALITY_FUTURE=yes, or similar... [[User:DeFaultRyan|DeFaultRyan]] ([[User talk:DeFaultRyan|talk]]) 20:06, 13 March 2009 (UTC)
:::Firstly you don't need to use editprotected to get our attention. I've deactivated it again. The FQS parameter only picks between two sets of predefined classes, neither of which includes the exotic ones like Future and Needed. So it's completely irrelevant if you are using a custom mask. About the B-checklist, either your project is using it or it isn't - it's not something which will be changing often. After replying to you yesterday I edited [[Template:WikiProject College football/class]] and fixed it for you. As you are not using the checklist now I removed the code for it. If you ever decide to implement it in the future it will be simple enough to add the code later. Hope this helps, &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 06:48, 14 March 2009 (UTC)
::::I'm in agreement with [[User:DeFaultRyan|DeFaultRyan]] in that these parameters should be passed to the custom class template. IMO there should be absolutely no reason for a project to have to re-edit a custom class template should they decide to enable/disable B_CHECKLIST or FULL_QUALITY_SCALE. As it stands currently, these two parameters do not function as documented when a custom class template is used since they can only change values in the default class template. If another editor ended up taking on one of these projects and tried to change these settings, not getting the intended result would most likely confuse them. To me, as a programmer, I consider this to be a bug/design oversight, albeit easy to correct. Going over the code, I was also wondering why we even passed FQS to the default class template instead of FULL_QUALITY_SCALE, as it seems to me it would clarify the code if we just used the full parameter name vs reassigning it to a shorter name. For the record, an edit to [[Template:WikiProject IRC/class|this]] class template is what brought me to this talk page. (Yes, I'm aware of the cosmetic bug this edit [http://en.wikipedia.org/w/index.php?title=Template:WikiProject_IRC/class&diff=278375995&oldid=278176535] introduced, and I'm not too worried about it atm since constantly editing these files just forces needless rebuilds and extra server load.) [[User:Tothwolf|Tothwolf]] ([[User talk:Tothwolf|talk]]) 22:09, 19 March 2009 (UTC)
::::Sorry about the editprotected thing: I'll keep that in mind. [[User:Tothwolf|Tothwolf]] basically summed up my opinion. First step over at [[WP:CFB]] was to standardize the banner. I'm considering introducing the B-checklist in the near future, but that means I'll have to update my class template again. Not really a big deal, but like Tothwolf said, it could trip up a newer editor, just like it tripped me up. And it causes the banner not to behave in a non-intuitive fashion (copy/pasting the default class template breaks FULL_QUALITY_SCALE). But if you guys really feel strongly about it, then I'll drop it. Anyway, thanks for helping edit my class template, and thanks for discussing this issue with me. What about that other idea of mine? The possibility of leaving the default class template in place, and enabling the other assessment categories on a parameter-by-parameter basis? The only reason I'm using the custom class template is to utilize the non-standard quality classes - in every other way, the default behavior is what I want. Is it feasible to "turn on" the extended classes by means of a template parameter? [[User:DeFaultRyan|DeFaultRyan]] ([[User talk:DeFaultRyan|talk]]) 23:00, 25 March 2009 (UTC)
:::::"copy/pasting the default class template breaks..." is the desired behavior: it stops people doing precisely that when there is no need to do so; this would result in a banner unnecessarily using a custom mask, and hence not being able to take advantage of improvements to the default mask. Custom masks should and must be designed somewhat differently to WPBM's default mask, as individual banner masks do not need to be able to adapt to multiple possible configurations of the overlying banner template, as MSGJ noted.
:::::The whole point of the class mask system (which is computationally significantly more expensive than a parameter system) was to allow projects to have complete and easy control over which classes they wanted to allow. The parameter alternative would require the banner to have code for every possible class requested by every project using the banner, with an open-ended list of parameters to enable and disable them. This would be detrimental to the vast majority of projects who do not use these nonstandard classes. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 23:34, 25 March 2009 (UTC)
::::::Perhaps I'm misunderstanding your response, or the other way around, but I wholeheartedly agree with keeping the class mask system in place. In fact, I agree with nearly everything you said. I think the class mask system is valuable for complete and flexible control. I think that individual masks should be a bit different from the default. That's where the seeming contradiction enters my mind. [[WP:CFB]] isn't using any completely different classes, like B-plus, or what have you. So there's probably not a need for our custom class mask to be very different from the default. However, the desire to use the "quasi-standard" classes of Future, Current, and Needed, neccessitated a custom class mask that was a copy/paste from the default, because that was the only way to enable those classes in our banner. My request for a parameter system wasn't for the set of all possible classes that could arise in any project (I agree, that's untenable). It was for a parameter to enable the "quasi-standard" classes of Future, Current, and Needed (and possibly Merge), in much the same way as FULL_QUALITY_SCALE=yes enables Category, Template, etc without the need for a custom class mask. {{tl|WPBannerMeta/class}} even says "Please do not just copy the contents of this subpage to create a custom mask. If the banner does not need to have a significantly different handling of the |class= inputs, then leave the default mask in place.", but that's precisely what I was forced to do in order to enable Future, Current, and Needed with otherwise default behavior. My question to is, does merely using the Current, Future, Needed, and/or Merge classes need to constitute a significantly different handling of the |class= inputs? I don't believe the answer is "yes", because the only difference in handling is adding 3 lines: "|needed = Needed, |current = Current, |future = Future". If the answer is "no", then shouldn't there be an alternative way of utilizing these categories without incurring the overhead and risk of a custom class mask, i.e., a parameter to enable them similar to FULL_QUALITY_SCALE. I'd just as soon use something like that and delete our custom mask altogether. I suspect other projects that deal with annual events might also want to utilize Current and Future class without creating a custom class mask. [[User:DeFaultRyan|DeFaultRyan]] ([[User talk:DeFaultRyan|talk]]) 00:23, 26 March 2009 (UTC)
:::::::The "Future", "Current", etc, classes are now considered no different to any of the other wierd and wonderful custom classes we have [[:Category:Classification templates|available]]. There isn't a particular distinction between these and wierd things like {{tlx|AfD-class}}. So the "quasi-standard" grouping that you describe doesn't really exist. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 11:43, 26 March 2009 (UTC)
 
I strongly disagree with the assumption that a custom class template does not need to be able to adapt to multiple configurations. It should still be ''possible'' to design a custom class template that will properly handle both the FULL_QUALITY_SCALE and B_CHECKLIST parameters that are passed to {{tl|WPBannerMeta}}. Not passing these parameters to the custom class template imposes an artificial limitation on what can be done within the template and this is always something that should be avoided in modular programming.<br />While I can understand wanting to discourage people from using a custom class template when it isn't really needed, I wanted to make use of some of the newer class types that are not present in the default class template. In particular, I intend to make extremely heavy use of the Needed and Merge classes as I'm sorting out and overhauling an entire hierarchy of categories and articles with tons of redirects.<br />''"(which is computationally significantly more expensive than a parameter system)"''<br />Are you certain? In most programming languages, switch statements are ''much'' more efficient than cascaded or sequential if statements.<br />I'd like to propose a compromise. Why not pass B_CHECKLIST and FULL_QUALITY_SCALE to the custom class templates and have the default class template continue to use FQS and possibly something like BCHKLST (instead of B_CHECKLIST). This would prevent anyone from doing a simple copy/paste of the default class template as a custom template and still allow those of us who wish to make use of B_CHECKLIST and FULL_QUALITY_SCALE in custom class templates to do so. Passing the real parameter names to the custom class template makes the most sense anyway as it makes it clear that these are the same parameters that are used for {{tl|WPBannerMeta}} itself.<br />--[[User:Tothwolf|Tothwolf]] ([[User talk:Tothwolf|talk]]) 01:42, 26 March 2009 (UTC)
:Now this is an interesting idea, which may well be workable. I'll have a think, but I can't see any immediate reason why this wouldn't work.
:The mask system uses an #ifexist: statement to check whether the custom mask exists or not, which is three orders of magnitude heavier on the servers than either #switch: or #if:/#ifeq:. So while you're right about nested ifs vs switches, the #ifexist: blows that completely out of the window. Fortunately, we [[WP:PERFORMANCE|don't need to worry]] about load on the servers, only on how our code affects the end-user. Just FYI <tt>:D</tt>. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 11:43, 26 March 2009 (UTC)
::I forgot about the #ifexist: in the parent code. Still, even with [[WP:PERF]] there's no point in using an expensive parser function if its not needed.<br />Is there a reason #ifexist: was used instead of passing a parameter to {{tl|WPBannerMeta}} pointing to the custom class template? If done as a parameter, it would be possible to keep different flavours of class templates with {{tl|WPBannerMeta}} itself. Perhaps something like <code>CUSTOM_CLASS_MASK = full_path/to/template</code>? [[User:Tothwolf|Tothwolf]] ([[User talk:Tothwolf|talk]]) 16:41, 26 March 2009 (UTC)
:::That would be rather bizzarre centralisation: the whole point of the mask system is to move control over which classes are supported to the invidual banners, ''away'' from the core code that has to be shared with every project. There is no need to require the banner coder to specify in a parameter what can be determined automagically. The point of [[WP:PERF]] is to say "ignore the performance impact ''at our end'', do whatever is best ''for the reader/user'' and we'll pick up the pieces as far as possible". <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 18:10, 26 March 2009 (UTC)
::::The other thing that comes to mind is won't #ifexist: return true even for an empty or redirected file? If the class template is blanked or moved (leaving a redirect) in an attempt to remove it, the parent code will still try to use it and not the default class template. [[User:Tothwolf|Tothwolf]] ([[User talk:Tothwolf|talk]]) 18:32, 26 March 2009 (UTC)
:::::Nothing wrong with a redirect; that could be just moving the mask to a more convenient ___location. Difficult to check if a custom mask is blank, but the ''other'' reason to 'outsource' the masks is to say "you use a mask, it's your problem if things go wrong". Obviously if people come here saying "my banner's broken" we can check and quickly see what the problem is, and fix it; but trying to build exception handling into wikitext is a fundamentally Bad Idea: it's a markup, not a programming language. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 18:45, 26 March 2009 (UTC)
::::::Well, I'm wondering if it might be better to have the custom mask template specified as a parameter to {{tl|WPBannerMeta}} because it would allow someone without the admin bit to remove the custom mask template from their project banner. With the current #ifexist: check it isn't possible for a non-admin to effectively remove the custom mask template from a project banner because even if they blank the custom class template or move it elsewhere the parent code is still going to try to use it. Just something to think about anyway I guess... [[User:Tothwolf|Tothwolf]] ([[User talk:Tothwolf|talk]]) 18:58, 26 March 2009 (UTC)
:::::::That's what {{tlx|db-g6}} is for <tt>:D</tt> I do see your point, but I think it's a fairly minor issue. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 20:01, 26 March 2009 (UTC)
::::::::Not everyone knows about the speedy delete templates or how to use them though. It is a minor issue, but still something that could be confusing for people who haven't looked at the code used by {{tl|WPBannerMeta}}. Maybe this is something that could go on the to do list for the next update? [[User:Tothwolf|Tothwolf]] ([[User talk:Tothwolf|talk]]) 20:36, 26 March 2009 (UTC)
:::::::::If you mean a more rigorous check for if the custom mask 'exists', that can be done. My ''personal'' reaction to the parameter suggestion is {{wontfix}}. Of course this isn't bugzilla; there may be consensus to the contrary, but I don't think such a move is a Good Idea. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 20:58, 26 March 2009 (UTC)
:::::::::I've made a modification such that empty (blanked) custom masks will now be ignored. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 21:23, 26 March 2009 (UTC)
::::::::::Good deal, that should help prevent some confusion. I still think it may be better as a long term solution to have the custom template ___location passed as a parameter to {{tl|WPBannerMeta}} but I'm well aware that this would be a multi-step change that would involve modifying any project templates that use a custom class template so it wouldn't be a simple thing to implement. For that fact, it would also allow a project to use different custom class templates for different sub-project banners via a subtemplate, but there probably aren't too many projects that currently do that. [[User:Tothwolf|Tothwolf]] ([[User talk:Tothwolf|talk]]) 21:40, 26 March 2009 (UTC)
 
{{done}}: parameters {{para|FULL_QUALITY_SCALE}} and {{para|B_CHECKLIST}} are now available to custom masks; copying WPBM's own mask will still break. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 18:45, 26 March 2009 (UTC)
 
== Random useful fact ==
 
Now that [[Special:MostLinkedTemplates]] has been out of action for so long, we've had no way to know just how many pages this was being used on. I've just run a database query on the toolserver's replicated copy of the templatelinks table; it took eleven minutes to run, and returned, wait for it, '''1,709,150 pages'''. There have probably been some other changes at the top, but I don't think there's any doubt that we're now working on a top-ten, probably top-five, template. Keep up the good work! <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 12:34, 26 March 2009 (UTC)
:You disappoint me! I was expecting a comment along the lines of encouraging projects to use the following code:
|note 1 = <nowiki>{{{RUF|}}}</nowiki>
|NOTE_1_TEXT = This article contains a '''[[WP:IINFO|random useful fact]]'''.
|NOTE_1_IMAGE = Ideolengua proyecto.svg
|NOTE_1_SIZE = 25px
|NOTE_1_CAT = Foobar articles with random useful facts
|NOTE_1_FORMAT =
:[[User:Physchim62|Physchim62]] [[User talk:Physchim62|(talk)]] 16:00, 26 March 2009 (UTC)
 
== New page on: "Pages transcluded onto the current version of this page:" ==
 
Just wondering if this is supposed to happen, when adding <nowiki>{{WikiProject United States|class=Category|importance=NA}}
</nowiki> to a few cat talk pages today, a new red-linked page at the bottom of the transclusion list shows up, only if one adds the "importance" parameter, along with the "class" parameter; it doesn't show up with just the "class" parameter. This only displays in the "edit" mode. For an example, see: [http://en.wikipedia.org/w/index.php?title=Category_talk:Former_United_States_Executive_Cabinet_positions&action=edit
Template:WikiProject United States/class] and look at the bottom of the opened "edit" page. Just wondering! --[[User:Funandtrvl|Funandtrvl]] ([[User talk:Funandtrvl|talk]]) 22:42, 26 March 2009 (UTC)
:Hmn, this is interesting. This is a result of my recent change to how the template looks for custom masks (see [[#Please pass parameters FQS and B CHECKLIST on to custom overrides of WPBannerMeta.2Fclass|above]]). I changed from using the <tt><nowiki>{{#ifexist:...}}</nowiki></tt> parser function to using <tt><nowiki>{{PAGESIZE:...}}</nowiki></tt>, which returns zero if the page is either blank ''or'' doesn't exist. Both do a database lookup, and so both add a link to one of the links tables to ensure cache integrity etc. This is why if I put the code <tt><nowiki>{{#ifexist:Foo}}</nowiki></tt> on this page, then this page shows up in [[Special:WhatLinksHere/Foo]]. It seems that the PAGESIZE: function adds tracker links to the ''templatelinks'' table rather than the ''pagelinks'' table (which is used to create WhatLinksHere); presumably this is because when the target page is edited, its size will change, so all pages querying that value will need to be updated, in much the same way as pages transcluding the target need to be updated. Nonetheless, it's a MediaWiki bug that the page is listed as a "template transcluded onto this page" when in fact it is nothing of the sort. I'll file it as a bug, but I suspect it will be a Big Thing To Fix, might even require a schema change, so don't hold your breath. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 22:57, 26 March 2009 (UTC)
:Filed, {{bug|18188}}. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 23:07, 26 March 2009 (UTC)
::Oh-oh, see what you did and look what I started!! :) Thanks --[[User:Funandtrvl|Funandtrvl]] ([[User talk:Funandtrvl|talk]]) 00:32, 27 March 2009 (UTC)
:::Actually, I think I'm the guilty party here ;) [[User:Tothwolf|Tothwolf]] ([[User talk:Tothwolf|talk]]) 00:49, 27 March 2009 (UTC)
::A-ha, so you're the troublemaker!! :) --[[User:Funandtrvl|Funandtrvl]] ([[User talk:Funandtrvl|talk]]) 01:25, 27 March 2009 (UTC)