Content deleted Content added
MiszaBot II (talk | contribs) m Archiving 4 thread(s) from Template talk:WPBannerMeta. |
MiszaBot II (talk | contribs) m Archiving 2 thread(s) from Template talk:WPBannerMeta. |
||
Line 514:
:There isn't really much that goes on on this page that ''aren't'' bug reports <tt>:D</tt> We have bug reports, feature suggestions, and "how do I do X" threads, that's about it. I don't think it's got too out of hand, although perhaps we should bump up the autoarchiving... <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 20:14, 18 January 2009 (UTC)
::I'd be more in favour of slowing the bot down actually! There is a discussion near the top of the page which hasn't reached a conclusion yet (I added an edit the other day to stop it being archived). There are some little things I find (e.g. small non-urgent errors) which don't need the attention of this page. But let's leave for now then. [[User talk:Msgj|Martin]] 21:54, 18 January 2009 (UTC)
== More on priority vs importance and hooks ==
While the [[Template:WPBannerMeta/hooks/priorityscale|hooks/priorityscale]] now works better, it's still not that simple to use and also end up in needing to duplicate parameters in the banner code.
I know it's been mentioned before, but it would be really nice if there were options for a priority scale in the main banner as it would be easier to use (especially for anyone who hasn't used WPBannerMeta much).
<pre>
|PRIORITY_SCALE =
|priority={{{priority|}}}
</pre>
and then in /core the code could be placed between IMPORTANCE_SCALE & HOOK_IMPORTANCE.
<pre>
{{#if:{{{PRIORITY_SCALE|}}}|
{{WPBannerMeta/importancescale|IMPN=priority|importance={{WPBannerMeta/importance|{{{priority|}}}|{{{class|}}} }}|SHOW=yes|BANNER_NAME={{{BANNER_NAME}}}|ASSESSMENT_CAT={{{ASSESSMENT_CAT|}}}|ASSESSMENT_LINK={{{ASSESSMENT_LINK|}}}|PROJECT_LINK={{{PROJECT_LINK|}}}|category={{{category|¬}}} }}
}}
</pre>
The HOOK_IMPORTANCE option would still stay as it could still be useful sometimes, but there wouldn't be as much need to use it most of the time.
Thoughts? - [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 09:33, 13 January 2009 (UTC)
:Or, since everything else is the same, the presence of those two parameters just prompts a 'swap' in what's passed to the first /importancescale. I can see that working. Please tell me no one uses a scale ''other'' than "importance" or "priority"?? <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 10:43, 13 January 2009 (UTC)
::I've seen a few <small>(only a about 3 or 4)</small> templates with a {{para|type}} parameter which is to be set as Template, Category, Portal, Image, etc. when the banner was used on a non-article talk page, but I don't think that's worth supporting as they should really be using the FQS instead. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 11:00, 13 January 2009 (UTC)
===It doesn't seem to need much doing to support priority:===
In [[Template:WPBannerMeta/core|WPBannerMeta/core]], could
<pre>
{{WPBannerMeta/importancescale|
</pre>
be changed to
<pre>
{{WPBannerMeta/importancescale|IMPN={{{IMPN|}}}|
</pre>
and in [[Template:WPBannerMeta|WPBannerMeta]], could
<pre>
|IMPORTANCE_SCALE = {{{IMPORTANCE_SCALE|}}}
|importance={{{importance|}}}
</pre>
be changed to
<pre>
|IMPORTANCE_SCALE = {{{IMPORTANCE_SCALE|}}}
|importance={{{importance|{{{priority|}}}}}}
|IMPN = {{#ifeq:{{lc:{{{IMPORTANCE_SCALE|}}}}}|priority|priority}}
</pre>
then, to use it, all that would be required is <tt><nowiki>|IMPORTANCE_SCALE = priority</nowiki></tt> instead of <tt><nowiki>|IMPORTANCE_SCALE = yes</nowiki></tt>
-- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 20:15, 20 January 2009 (UTC)
:Looks good. Would be good to support Priority with a capital P because I've come across that before. [[User talk:Msgj|Martin]] 21:11, 20 January 2009 (UTC)
::Priority with a capital P can be supported in the Project Banner with <tt><nowiki>|priority = {{{priority|{{{Priority|}}}}}}</nowiki></tt> -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 21:51, 20 January 2009 (UTC)
:::You misunderstand. I saw a project (can't remember which now) which used, e.g. Low-Priority xxx articles, rather than Low-priority xxx articles. [[User talk:Msgj|Martin]] 22:16, 20 January 2009 (UTC)
::::I saw one project something similar for [[:Category:Evanescence articles by importance|Importance]] recently, so I've just put in a request for a [[Wikipedia:Categories for discussion/Speedy|speedy rename]] after I'd converted the banner. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 22:37, 20 January 2009 (UTC)
:::::The only project that uses "Priority" is WikiProject Mathematics. We're not adding something for one project out of 1,400. There are 26 projects by my count that use "priority". You have an interesting idea here, WOSlinker. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 22:39, 20 January 2009 (UTC)
== Hooks and class masks ==
Question: should the class parameter be sent to hooks premasked, or should the hook pass it through the mask? It seems to me that the former is less user-friendly but is more efficient and also allows for custom masks to be used. [[User talk:Msgj|Martin]] 21:56, 18 January 2009 (UTC)
:Hooks should be responsible for ensuring that all parameters are handled as they would be in the template itself. So hooks should assume that all parameters are being sent in un-normalised, in shorthand notation, and using inverted camelcase <tt>:D</tt>. Efficiency is secondary to user-friendliness here. Note also that calling {{tlx|WPBannerMeta/class}} from a hook actually ''facilitates'' using custom masks in the approved manner. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 23:04, 18 January 2009 (UTC)
::Hmmm, if you look at my [[Template:WPBannerMeta/hooks/qualimpintersect|category intersection]] hook, it would be necessary to call that mask three times! That's terrible efficiency ... [[User talk:Msgj|Martin]] 23:46, 18 January 2009 (UTC)
:::You might have to do qualimpintersect & qualimpintersect/core if you want to process it only once. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 00:04, 19 January 2009 (UTC)
::::That's certainly one solution; it's worked for the main banner <tt>:D</tt>. I might do that for /hooks/taskforces. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 00:05, 19 January 2009 (UTC)
:::::You could also get them to show on the template page as well then which would be good. - [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 07:42, 19 January 2009 (UTC)
Oh, you two are good. Why didn't I think of that? I'll put my hook into a core straightaway. WOS, is there a way to do the templatepage stuff without affecting performance? I worry about having all the extra code on the hook. [[User talk:Msgj|Martin]] 13:52, 19 January 2009 (UTC)
:[[WP:PERFORMANCE|Don't panic]] <tt>:D</tt>. As long as the code isn't actually being ''parsed'' (and unfollowed parserfunction branches are discarded and not evaluated) you're only adding a few hundred bytes of dead code. The performance impact is minimal. It's only when you're A) adding those dead bytes innumerable times, or B) adding code that is parsed and ''then'' discarded, that you need to worry. It's a point that we all forget at various times. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 14:23, 19 January 2009 (UTC)
::Ah, Happy-melon's favourite essay :P [[User talk:Msgj|Martin]] 14:40, 19 January 2009 (UTC)
:::Actually my favourite essay is [[WP:SENSE]], although it doesn't actually say what most people think it does. I actually care more about performance than [[WP:PERFORMANCE]] really condones. <font color="forestgreen">[[User:Happy-melon|'''Happy''']]</font>‑<font color="darkorange">[[User talk:Happy-melon|'''melon''']]</font> 14:49, 19 January 2009 (UTC)
Right I am now sick of [[Template:D&D]]. I lost count of how many times I had to use the custom class and importance masks so I did something which is probably a Bad Idea: put the whole thing into a core. <s>It seems to be working except that the core doesn't think it's the templatepage and I can't work out why not.</s> Any help to make this code more efficient is definitely welcome! [[User talk:Msgj|Martin]] 14:53, 19 January 2009 (UTC)
:And another thing which is completely annoying me. Sometimes it accepts D&D, other times you have to type D&D and there doesn't seem to be any logic to it. [[User talk:Msgj|Martin]] 14:55, 19 January 2009 (UTC)
|