Module talk:WikiProject banner
Add topic| Module:WikiProject banner is indefinitely protected from editing as it is a heavily used or highly visible module. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit protected}} to notify an administrator to make the requested edit.
|
| If you wish to discuss the behaviour of the project banner inside the banner shell, then you may wish to post at Template talk:WikiProject banner shell instead. |
| This module does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
| ||||||||
|
|
IMAGE_LEFT_CLASS may be needed
[edit]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Please see this edit, which hacked in a class for the IMAGE_LEFT image so that the image would show correctly in dark mode (white on black instead of the previous black on black). It points out the potential need for IMAGE_LEFT_CLASS, and maybe some other image CLASS parameters, in this module/template. – Jonesey95 (talk) 19:38, 25 May 2026 (UTC)
- @Jonesey95:
Implemented in the sandbox as |IMAGE_LEFT_CLASS=,|IMAGE_RIGHT_CLASS=, and|IMAGE_CLASS=. The first two override the third (which applies to both RIGHT and LEFT). Tested at Module talk:WikiProject banner/testcases#Image class. - To the closing admin --- please copy the sandbox to main, being careful to comment out the sandbox at line 3.
- — hike395 (talk) 18:49, 27 May 2026 (UTC)
DOC=auto parameter syntax highlighting
[edit]I created {{para2}} to apply <syntaxhighlight lang="wikitext">-style highlighting to standalone parameters. It's a very simplified version of {{para}} without all the bells & whistles. Its uses are {{para2|foo}} and {{para2|foo|bar}} only, which create |foo= and |foo=bar, respectively, which cover 98%[citation needed] of all use cases. Assuming {{para2}} covers all cases used by Module:WikiProject banner, the only line that needs to be changed appears to be line #13, from this:
return frame:expandTemplate{title='para', args={parameter, value or ''}}
to this:
return frame:expandTemplate{title='para2', args={parameter, value or ''}}
~ Tom.Reding (talk ⋅dgaf) 11:09, 8 June 2026 (UTC)
- What is the benefit? — Martin (MSGJ · talk) 12:28, 8 June 2026 (UTC)
- For formatting consistency with sections using
<syntaxhighlight lang="wikitext">: {{para|foo|bar}}displays as|foo=bar(current){{para2|foo|bar}}displays as|foo=bar(proposed). ~ Tom.Reding (talk ⋅dgaf) 13:02, 8 June 2026 (UTC)- Got it. Why not add that feature to {{para}}? — Martin (MSGJ · talk) 13:04, 8 June 2026 (UTC)
- That was proposed 2 years ago @ Template talk:Parameter#How to syntaxhighlight a standalone parameter?, but rejected due to dark mode incompatibilities, presumably on non-doc pages due to the absence of a non-white background on non-doc pages. See that discussion for more detail and a more accurate interpretation. One of the 2 associated phab tickets is still open. ~ Tom.Reding (talk ⋅dgaf) 13:13, 8 June 2026 (UTC)
- Why would para2 not suffer the same problems in dark mode? And have you seen the comment from FaviFake on that page? — Martin (MSGJ · talk) 07:43, 9 June 2026 (UTC)
- Re: dark mode: because para2 would only be used where it isn't a problem, i.e. on documentation pages, and I don't see syntaxhighlight disappearing.
- Re: FaviFake: I've responded @ Template talk:Parameter#para2. ~ Tom.Reding (talk ⋅dgaf) 10:56, 9 June 2026 (UTC)
- I've added it to the sandbox, but not totally convinced this is beneificial. I think for a block of code the coloring is helpful, but for a single parameter it seems unnecessary. Compare examples below — Martin (MSGJ · talk) 10:07, 12 June 2026 (UTC)
- Why would para2 not suffer the same problems in dark mode? And have you seen the comment from FaviFake on that page? — Martin (MSGJ · talk) 07:43, 9 June 2026 (UTC)
- That was proposed 2 years ago @ Template talk:Parameter#How to syntaxhighlight a standalone parameter?, but rejected due to dark mode incompatibilities, presumably on non-doc pages due to the absence of a non-white background on non-doc pages. See that discussion for more detail and a more accurate interpretation. One of the 2 associated phab tickets is still open. ~ Tom.Reding (talk ⋅dgaf) 13:13, 8 June 2026 (UTC)
- Got it. Why not add that feature to {{para}}? — Martin (MSGJ · talk) 13:04, 8 June 2026 (UTC)
- For formatting consistency with sections using
Current
[edit]The WikiProject banner below should be moved to this article's talk page. If this is a demonstration of the template, please set the parameter |category=no to prevent this page being miscategorised. |
Proposed
[edit]The WikiProject banner below should be moved to this article's talk page. If this is a demonstration of the template, please set the parameter |category=no to prevent this page being miscategorised. |
This request is to modify the |DOC=auto portion only. I was not aware of any |para= usages outside of the documentation, so if isolating /doc usage only is difficult, then it might not be worth it.
Documentation is improved by |para2= usage in my option, for example in Module:WikiProject banner#Custom masks. ~ Tom.Reding (talk ⋅dgaf) 10:55, 12 June 2026 (UTC)
- Okay so you probably want to edit Module:WikiProject banner/templatepage#L-288 instead — Martin (MSGJ · talk) 11:50, 12 June 2026 (UTC)
- Thanks for the pointer, but I don't know how to do that there. ~ Tom.Reding (talk ⋅dgaf) 22:16, 12 June 2026 (UTC)
- Please check Template:WikiProject Christianity/sandbox#Parameters and see if it looks good? — Martin (MSGJ · talk) 12:29, 17 June 2026 (UTC)
- That looks nice. It still looks like all instances of "based on the
|class=parameter" need to converted to "based on the|class=parameter". - FYI there is a merger discussion for {{Parameter2}} into {{Parameter}} happening here. That happened much more quickly than I was expecting. ~ Tom.Reding (talk ⋅dgaf) 13:26, 17 June 2026 (UTC)
- How's that looking now? — Martin (MSGJ · talk) 14:01, 17 June 2026 (UTC)
- Great! ~ Tom.Reding (talk ⋅dgaf) 14:04, 17 June 2026 (UTC)
Done. Will likely need updating once the merge has completed — Martin (MSGJ · talk) 14:16, 17 June 2026 (UTC)
- Great! ~ Tom.Reding (talk ⋅dgaf) 14:04, 17 June 2026 (UTC)
- How's that looking now? — Martin (MSGJ · talk) 14:01, 17 June 2026 (UTC)
- That looks nice. It still looks like all instances of "based on the
- Please check Template:WikiProject Christianity/sandbox#Parameters and see if it looks good? — Martin (MSGJ · talk) 12:29, 17 June 2026 (UTC)
- Thanks for the pointer, but I don't know how to do that there. ~ Tom.Reding (talk ⋅dgaf) 22:16, 12 June 2026 (UTC)
"MAIN_CAT" and config "category" apparent discrepancy
[edit]The documentation says that MAIN_CAT applies the category to "all pages displaying the template", and also says that category on a config page applies to "all articles" (implying article space only, but MAIN_CAT applies to all pages, and this template is placed on talk pages and does not categorize article pages). Is this an error in the documentation? I ask because of this request to apply Category:WikiProject Ice Hockey articles to {{WikiProject Ice Hockey}}. Is there a way to limit categorization to just article talk pages? – Jonesey95 (talk) 18:35, 20 June 2026 (UTC)
- The main cat should be for every single page that is tagged by the banner. That shouldn't change. The sub-categories at Category:Ice Hockey articles by quality (the ones with the actual rating) are the ones that limit to only article pages. What should perhaps change wiki-wide (but will be a pain) is the naming convention we use for the meta-categories that hold both articles and non-articles. Gonnym (talk) 03:41, 21 June 2026 (UTC)
- OK, I have adjusted the documentation accordingly. The category name is still inaccurate, but it seems to match the other subcategories of Category:Articles by WikiProject. Fixing the names of all of those categories looks like a fun project for someone who is not me. – Jonesey95 (talk) 06:36, 21 June 2026 (UTC)
Protected edit request on 15 July 2026
[edit]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
As a follow-up to recent changes related to image CSS classes, please apply Special:Diff/1356645927/1364186968 Special:Diff/1356645927/1364427602 (new, better diff —andrybak (talk) 13:08, 16 July 2026 (UTC)) to:
- Remove unused function
display_error. Last usage of it was removed in Special:Diff/1317754418. - Remove unused local variable
template_outside_shell. It has been unused since its introduction in Special:Diff/1247210025. - Pass
args.IMAGE_LEFT_CLASS or args.IMAGE_CLASSas fifth parameter (class) into theimagefunction for the nested banner case. This fixes images of collapsed nested WikiProject banners, which pass|IMAGE_LEFT_CLASS=skin-invertto the module.- Example: Template:WikiProject Christianity:
- Sandbox diff: Special:Diff/1356641126/1364184227
- Test case demonstrating the fix: "Template:WikiProject Christianity/testcases#Collapsed" with Vector 2022 dark mode
- Example: Template:WikiProject Christianity:
Thanks. —andrybak (talk) 01:34, 15 July 2026 (UTC)
- All changes look good to me. Thanks for your attention — Martin (MSGJ · talk) 07:35, 15 July 2026 (UTC)
- In the meantime, I stumbled upon another affected template – {{WikiProject Infoboxes}}. Icon for uncollapsed mode is inverted, but nested/collapsed on the talk page is not inverted. —andrybak (talk) 03:21, 16 July 2026 (UTC)
- Found another place in the module, where an image class isn't applied – "note images" that are gathered into
nested_ratings.- Isolated diff for the new fix: Special:Diff/1364391952/1364427602. I used
noviewersimilarly to functionimagenear the top of the module. - Example affected template – {{WikiProject Portals}}, which has
|NOTE_1_IMAGE=Codex icon info.svgand|NOTE_1_IMAGE_CLASS=skin-invert- Affected template's sandbox diff: Special:Diff/1364397936/1364426619
- Demonstration of the fix in "Template:WikiProject Portals/testcases".
- Off-topic:
|NOTE_1_TEXT=See also: [[Portal:Contents/Portals|List of Portals]]ends up as pretty useless title text for the image insidenested_ratings, but that's a separate issue.
- Isolated diff for the new fix: Special:Diff/1364391952/1364427602. I used
- I changed the diff link above to the new diff with the fix and with formatting changes by MSGJ. —andrybak (talk) 13:08, 16 July 2026 (UTC)
- Found another place in the module, where an image class isn't applied – "note images" that are gathered into
- In the meantime, I stumbled upon another affected template – {{WikiProject Infoboxes}}. Icon for uncollapsed mode is inverted, but nested/collapsed on the talk page is not inverted. —andrybak (talk) 03:21, 16 July 2026 (UTC)
Done — Martin (MSGJ · talk) 14:21, 17 July 2026 (UTC)