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

Content deleted Content added
m Archiving 1 discussion(s) from Template talk:WPBannerMeta) (bot
m Archiving 1 discussion(s) from Template talk:WPBannerMeta) (bot
Line 785:
{{Archive bottom}}
{{ping|Praemonitus}} if you use a custom importance mask, your project can manage its importance ratings however they wish. Let me know if you need help setting this up. Or if you think this is something every project should have, then do continue to discuss here. [[Template:Class mask]] has a |forceNA setting - we could look at adding such a thing to [[Template:Importance mask]] also &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 20:46, 28 March 2023 (UTC)
 
== Simplifying this template ==
 
So because quality assessment will move to the banner shell there will need to be a bot run editing basically all pages with this template. Is there anything else we would like to change here that could benefit from being changed in that huge bot run. I'm not at all familiar with the inner workings of WikiProject banners, but this seems to me like a potentially great opportunity. --[[User:Trialpears|Trialpears]] ([[User talk:Trialpears|talk]]) 05:54, 13 February 2023 (UTC)
 
:Changed? Yes, convert this into Lua so trying to change something in this series of templates doesn't require checking dozens of templates and getting lost in the process. My personal issue with the current code is that if I need to add a new task force and still want the template to be sorted alphabetically, I need to manually edit dozens of lines. That is a horrible design. [[User:Gonnym|Gonnym]] ([[User talk:Gonnym|talk]]) 13:23, 13 February 2023 (UTC)
::As I have pointed out before, I cannot understand Lua. Therefore, I will no longer be able to:
::* maintain the template suite
::* trace code through to find out why something doesn't happen as expected
::* explain to others why their usage isn't working as expected
::* create and add documentation
::The number of Lua coders is far fewer than the number of people familiar with Wikimarkup, therefore, anybody converting a template to Lua must be willing to take on all of the tasks that I have listed above. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] &#x1f339; ([[User talk:Redrose64|talk]]) 11:29, 14 February 2023 (UTC)
::I've been looking at {{tq|if I need to add a new task force and still want the template to be sorted alphabetically, I need to manually edit dozens of lines}}. The present setup already allows additional task forces to ba added without any renumbering being necessary. Consider [[Template:WikiProject Biography]]: the present template (omitting two uses of {{tlx|WPBannerMeta/hooks/cats}}) has <syntaxhighlight lang=moin line> |tf 2={{{filmbio-work-group|}}}
|TF_2_LINK = Wikipedia:WikiProject Actors and Filmmakers
|TF_2_NAME = WikiProject Actors and Filmmakers
|TF_2_IMAGE = Lumierebros.jpg
|TF_2_QUALITY = yes
|tf 2 importance={{{filmbio-priority|{{{priority|{{{importance|}}}}}}}}}
|TF_2_ASSESSMENT_CAT = biography (actors and filmmakers) articles
|TF_2_MAIN_CAT = Actors and filmmakers work group articles
|tf 3={{{musician-work-group|}}}
|TF_3_LINK = Wikipedia:WikiProject Musicians
|TF_3_NAME = WikiProject Musicians
|TF_3_IMAGE = Exquisite-microphone.png
|TF_3_QUALITY = yes
|tf 3 importance={{{musician-priority|{{{priority|{{{importance|}}}}}}}}}
|TF_3_ASSESSMENT_CAT = biography (musicians) articles
|TF_3_MAIN_CAT = Musicians work group articles</syntaxhighlight> Now assume that I want to insert a new task force between these, it might be called Foo work group. I can leave the existing code as it is and insert extra lines as follows: <syntaxhighlight lang=moin line highlight=9-23> |tf 2={{{filmbio-work-group|}}}
|TF_2_LINK = Wikipedia:WikiProject Actors and Filmmakers
|TF_2_NAME = WikiProject Actors and Filmmakers
|TF_2_IMAGE = Lumierebros.jpg
|TF_2_QUALITY = yes
|tf 2 importance={{{filmbio-priority|{{{priority|{{{importance|}}}}}}}}}
|TF_2_ASSESSMENT_CAT = biography (actors and filmmakers) articles
|TF_2_MAIN_CAT = Actors and filmmakers work group articles
|tf 7={{{foo-work-group|}}}
|TF_7_LINK = Wikipedia:WikiProject Foo
|TF_7_NAME = WikiProject Foo
|TF_7_IMAGE = Example.png
|TF_7_QUALITY = yes
|tf 7 importance={{{foo-priority|{{{priority|{{{importance|}}}}}}}}}
|TF_7_ASSESSMENT_CAT = foo articles
|TF_7_MAIN_CAT = Foo work group articles
}}{{WPBannerMeta/hooks/taskforces
|category={{{category|¬}}}
|PROJECT = Biography
|QUALITY_SCALE = subpage
|IMPORTANCE_SCALE_NAME = importance
|TF_SIZE = x25px
|class={{{class|}}}
|tf 3={{{musician-work-group|}}}
|TF_3_LINK = Wikipedia:WikiProject Musicians
|TF_3_NAME = WikiProject Musicians
|TF_3_IMAGE = Exquisite-microphone.png
|TF_3_QUALITY = yes
|tf 3 importance={{{musician-priority|{{{priority|{{{importance|}}}}}}}}}
|TF_3_ASSESSMENT_CAT = biography (musicians) articles
|TF_3_MAIN_CAT = Musicians work group articles</syntaxhighlight> The numbers for {{para|TF ''n''}} etc. need not be consecutive, they just need to be in the range 1-10, so you may leave gaps in the sequence in case of future eventualities. The same goes for the "nested" code later on. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] &#x1f339; ([[User talk:Redrose64|talk]]) 23:32, 14 February 2023 (UTC)
:::How can you understand template syntax? You weren't born with the knowledge. I bet when you first saw a template in wikicode it was quite imtimidating. Well, the same might be true of Lua. I am far from an expert, but I have come a long way in the past year. (Probably [[Module:Is instance]] I am most proud of.) It's a steep learning curve, but I can promise that you'll wonder how we ever managed with wikicode and the arcane setup we are using here &mdash;&nbsp;Martin <small>([[User:MSGJ|MSGJ]]&nbsp;·&nbsp;[[User talk:MSGJ|talk]])</small> 21:14, 28 March 2023 (UTC)