Template talk:NZ parlbox

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
WikiProject iconNew Zealand: Politics Template‑class
WikiProject iconThis template is within the scope of WikiProject New Zealand, a collaborative effort to improve the coverage of New Zealand and New Zealand-related topics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.
Taskforce icon
This template is supported by the New Zealand politics task force (assessed as Top-importance).

Term?[edit]

The column 'Term' can be misleading: it could be taken as the term the MP has served, rather than the term of Parliament. Why not revert to the 'Parl.' header?
Adabow (talk) 03:13, 25 July 2009 (UTC)[reply]

One of the complaints about the old format was the use of abbreviations. Personally I am quite happy to use "Parl." or anything else anyone can think of. Perhaps first run it by the original discussion however. Mattlore (talk) 23:43, 25 July 2009 (UTC)[reply]

Year[edit]

Can we add a parameter that can be used if the MP is only sitting in one year? in {{Infobox Officeholder}} "term" can be used instead of "term_start" and "term_end"; can we create something similar here? I would do it, but even after looking at the {{Infobox Officeholder}}, I can't figure it out....

See Rod Donald and Louisa Wall for examples of where this could be useful.

Adabow (talk) 08:39, 3 October 2009 (UTC)[reply]

Just saw your comment the other day; it works that way now but it wont automatically put "present" in if left blank. Mattlore (talk) 07:28, 1 February 2010 (UTC)[reply]

Change of party[edit]

What is the convention of use of this template when an MP changes parties (eg see Tariana Turia)? It looks quite odd doubling most fields up; is there a way to merge the two rows? Adabow (talk) 12:07, 9 April 2010 (UTC)[reply]

So far they I've just doubled them up. It does look pretty messy at times (especially for 1993-1999 MPs who changed parties) but I have yet to find a solution. Mattlore (talk) 23:46, 18 April 2010 (UTC)[reply]

Alignment[edit]

Can we have an optional {{{align}}} parameter (with right as default), so that if it is more suitable to have the table aligned to the left, it can be done? Adabow (talk) 23:20, 18 April 2010 (UTC)[reply]

Hey, I'll try and have a play with it sometime this week to see if I can add that feature (or someone else can). Its never come up before as all the old "parlbox's" were always right aligned. Its a good idea though, would work a lot better for the Ministers with the right aligned infobox. Mattlore (talk) 23:37, 18 April 2010 (UTC)[reply]
Cheers Adabow (talk) 23:42, 18 April 2010 (UTC)[reply]
adding "align=left" into the parlbox header should now work :) Mattlore (talk) 00:45, 1 May 2010 (UTC)[reply]

Year range[edit]

The template produces a year range. Two things should be done differently in my opinion:

  1. It should use endashes – the template would need amending for that.
  2. Where the year range doesn't go across a century, the closing years should be in YY format, rather than YYYY. The documentation would need updating. I'm happy to copy the relevant bits from WP:YEAR across, or refer to it.

Thanks. Schwede66 09:16, 21 July 2010 (UTC)[reply]

It does use en dashes at the moment, so that's fine. I prefer the YYYY format twice, but as the MoS says to use YY then I'm not objecting to something being added to the documentation. Adabow (talk) 09:31, 21 July 2010 (UTC)[reply]
Are you sure about the endashes? Schwede66 10:34, 21 July 2010 (UTC)[reply]
Yep, I just copied-and-pasted an endash and clicked 'show changes', and there was no difference. Adabow (talk) 06:43, 22 July 2010 (UTC)[reply]
We can't be talking about the same thing, Adabow. In James FitzGerald's parlbox, I've just copied the dash between 1853 and 1855, pasted it somewhere else, and it was a simple dash and not an endash. Schwede66 04:39, 23 July 2010 (UTC)[reply]
I was talking about the template's code. I'll try changing it to the html syntax for and en dash, and see if that makes a difference. Adabow (talk · contribs) 04:42, 23 July 2010 (UTC)[reply]

Silly me - I didn't see that I can edit the template code myself. This works - thanks. Schwede66 04:54, 23 July 2010 (UTC)[reply]

List MPs[edit]

New Zealand Parliament
Years Term Electorate List Party
2005–2008 48th List 27 National
2008–2011 49th List 14 National
2011–present 50th List 9 National
(example, with electorate)
2005–2008 48th List (Mana) 27 National
2008–2011 49th List (Rongotai) 14 National
2011–present 50th List (Rongotai) 9 National

As I've been reformatting the List MPs sections of electorates I've run into a problem inherent in these parlbox templates. Unless there is a comprehensive History of a List MP's terms it is often unclear where (or if) they stood as candidates. From reading Chris Finlayson's parlbox you get no clue that he stood in Mana, Rongotai & Rongotai in 2005, 2008 & 2011 respectively. Would the second example be a good way of expressing this, or is it not clear enough? FanRed XN | talk 10:02, 21 December 2011 (UTC)[reply]

I think this is a problem best addressed in the prose rather than in the parlbox. Where a candidate stood in the election is related to that election whereas the parlbox deals with who they represent in parliament. Some MPs do base themselves in the electorate they stood in at the election while others change completely. Twyford for example, stood in North Shore in 08 but his office was in Auckland Central until he moved to Te Atatu. The parlbox should only indicate how and when they were elected. Mattlore (talk) 19:13, 21 December 2011 (UTC)[reply]
As the parlbox shows parliament terms, and list status and position (alongside electorates represented, if applicable) it is not solely concerned with the "how and when they were elected" - if an MP is elected to an electorate their list position is irrelevant and by your reasoning is "best addressed in the prose". The parlbox otherwise records both an MP's electoral and parliamentary histories, regardless of the intentions when it was designed and to consign one significant piece of data to a highly variable prose section seems to be counter-intuitive. To discover where a list MP stood in the 1996 election (where this is not in the prose already) an editor needs to search through electorate articles Albany to Te Tai Tonga to find the information, and if it doesn't exist there through omission or because the MP in question was a list-only candidate, then repeat the search at electionresults 1996. In summary, my question was how can we include this data and not what reasons do we have for not including this data ... because I don't feel there is a case for excluding the data, other than the template wasn't designed for that - and surely that's the issue we should be addressing. Finally, Phil Twyford's status as a candidate in North Shore is relevant, as is his status as a list MP - whether his office was in Central Auckland or Invercargill or Waikikamukau is not relevant.FanRed XN | talk 03:13, 22 December 2011 (UTC)[reply]
Years Term Electorate won
(or contested)
Party
2011–present 50th List (Rongotai) 9 National
I agree that the information should be included in the article. I just don't think it belongs in the parlbox, I believe it belongs in the prose of the article itself. The parlbox records the persons elected history, not their candidate history. They are elected as a List MP, that is relevant. That they placed third in Coromandel is not. The information you are suggesting on adding is similar to the fact that Barry Brill ran in the 2011 election and was not elected. It is notable and worthy of inclusion in the article but it does not belong in the parlbox. I answered your question initially; I believe it is best included in the text of the article. Mattlore (talk) 03:44, 22 December 2011 (UTC)[reply]
The way I understand what Fanx is suggesting is to record in addition to what we already do is to show the electorate contested (if applicable) if somebody made it into Parliament via the list. That seems a useful piece of information to include. In parallel, we should also have 'Party lists by election year articles', but that's another issue. Back to the parlbox, I wouldn't like to see the heading break over two lines. Maybe we could generate a footer (when needed) that explains the situation of the electorate in brackets given after 'List'. Schwede66 04:12, 22 December 2011 (UTC)[reply]
And on that aside Schwede. Mattlore (talk) 04:22, 22 December 2011 (UTC)[reply]

Parlbox[edit]

Copied from Schwede's talk page

Happy New Years Schwede. I noticed that you prefer the look generated by  -  in the parlboxs - should we add that to the code rather than to each box individually or is something that you only prefer to add some of the time? Mattlore (talk) 20:23, 3 January 2012 (UTC)[reply]

HNY to you, too. I usually take my guidance from MOS, but WP:YEAR is one of the areas that is poorly documented. For example, it expresses a preference for year ranges to be shown like (1881–86), but I've had a lengthy discussion with somebody who looks after British politics articles that it has always been four digit years for the closing years, and in fact the change to MOS was made without discussion. Ah well, so I've adopted the four digit closing year as per longstanding British practice. The other issue is that when words are part of the range, then the endash has spaces on either side, which is why I've been converting parlboxes 'on sight'. But again, this is not documented at all in MOS.
If that could be incorporated into the code, that would be fantastic! Schwede66 22:18, 3 January 2012 (UTC)[reply]
Ah, I see. I didn't fully understand the MOS requirements. That might have to go in the too hard basket for now unfortunately as I'm not sure about getting the box to recognise text instead of numbers. As an aside, I have always preferred the four digit style over the two. I thought the MOS stated both were acceptable, but obviously it now has a preference. Mattlore (talk) 22:30, 3 January 2012 (UTC)[reply]
I suppose we can set our own rules for how a parlbox is laid out. I'll shift this discussion to the parlbox talk page sometime later; that's probably where it should be. Schwede66 00:05, 4 January 2012 (UTC)[reply]

Accessibility problems[edit]

New Zealand Parliament
Years Term Electorate Party
1996–99 45th Auckland Independent
1999–2002 46th Auckland 55 NZ First
2008 49th Auckland 55 National

The colour-contrast ratio between pink background and blue and especially red links in this template on Ethel McMillan do not meet WCAG standards for accessibility (see MOS:COLOUR for more info). What's the best way to remedy this? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 22:56, 9 September 2012 (UTC)[reply]

Hmmm, the most obvious solution is to turn the red and blue links into Black Text but that'd require a rewrite of the code and apply to all articles. It would also make the links impossible to distinguish. Any other suggestions? Mattlore (talk) 23:29, 9 September 2012 (UTC)[reply]
one possibility would be to use border coloring either on the Party cell, or the entire row. or, we could use a background color on the actual party text. Frietjes (talk) 15:59, 10 September 2012 (UTC)[reply]
New Zealand Parliament
Years Term Electorate Party
1996–99 45th Auckland Independent
1999–2002 46th Auckland 55 NZ First
2008 49th Auckland 55 National


Both those samples would work for me. Schwede66 18:56, 10 September 2012 (UTC)[reply]
I moved the background colour to the party cell as a first step, but we probably should do more (e.g., one of the options show here, or something similar). Frietjes (talk) 19:49, 10 September 2012 (UTC)[reply]
The former looks good to me. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 20:23, 10 September 2012 (UTC)[reply]

Subsequent occurences should not be wikilinked[edit]

This template should be adjusted such that only the first occurence of a term is wikilinked. Currently, if two National terms are listed, both occurences of "National" are wikilinked. — Hugh (talk) 23:44, 25 April 2018 (UTC)[reply]

I concur. I don’t have the skills to implement that and would appreciate changes from an editor who knows how to go about this. Schwede66 16:42, 26 April 2018 (UTC)[reply]

Changing from text on color (shading) to two cell style[edit]

Continuing from the above #Accessibility problems, the election tables on en.wiki tend to have moved to a two cell style - one for the color and one for the name. This way the color used does not have any possible accessibility issues as there is nothing rendered above it. This also makes the party color usage consistent - a user viewing a table like that used at New Zealand Labour Party#Leadership, which uses a red color for the party, currently would be confused by the pink color used by this template. This change makes it consistent as it uses the same values.

New Zealand Parliament
Years Term Electorate List Party
1972–1975 37th Eden Labour
New Zealand Parliament
Years Term Electorate List Party
1972–1975 37th Eden Labour

The table on the left is the current version and the table on the right is the /sandbox one. Gonnym (talk) 10:47, 30 December 2021 (UTC)[reply]

Gonnym, that’s nice and clean. I like it. Schwede66 15:31, 30 December 2021 (UTC)[reply]
Gonnym, you were the last who edited the template. There are two issues. The minor issue is that some of the columns should now be made wider to accommodate the larger font ("Years" and "Electorate"). The bigger issue is that in the last line of a table, something creates a line break after the entry for "Party"; it can be seen in the two tables under "Accessibility problems" above. Could you please have a look what causes this? Much appreciated. And a happy new year! Schwede66 03:16, 2 January 2022 (UTC)[reply]
Regarding the size, since "wider" is subjective, you could either let me know what size exactly you want and I'll do it or just edit it as I'm sure you'll know better how you think it should be. Regarding the line break, I'm not seeing the issue so can you point me to where exactly you see the line break? If you mean the empty column cell to the right of the "Party" cell in the top example, notice that the template there isn't using the /sandbox version. If it isn't that, then point me to where the issue is please so I can fix it. Gonnym (talk) 08:32, 2 January 2022 (UTC)[reply]
Gonnym, see, for example, the parlbox at John Karslake Karslake. There's obviously a line break after "Independent", creating a cell with two rows. Schwede66 03:45, 4 January 2022 (UTC)[reply]
Ok, I see this now. However, this was present with earlier versions. Pick an earlier revision and preview John Karslake Karslake with it. I'll see if I can find the issue. Gonnym (talk) 09:23, 4 January 2022 (UTC)[reply]
Fixed. Gonnym (talk) 09:27, 4 January 2022 (UTC)[reply]
Gonnym, excellent – thanks heaps. Schwede66 16:58, 4 January 2022 (UTC)[reply]
If there won't be any comments to this in the next day or so I'll sync with the live version. Gonnym (talk) 18:25, 4 January 2022 (UTC)[reply]

The problem I see with the Template:Party color cell is that it also takes over the table format into itself.

{| class="wikitable"
! Header cell 1
! Header cell 2
|-
| {{party color cell|New Zealand Labour Party}}
| Content cell
|}

instead of

{| class="wikitable"
! Header cell 1
! Header cell 2
|-
| | {{party color cell|New Zealand Labour Party}}
| Content cell
|}

This forces the editor to remove the table formatting | , which IMHO, shouldn't. Is there any other alternative to this? How about Template:Party cell? (Sure, any editor using the {{NZ parlbox}} will not have any knowledge of this, but still in the long run, I think the template shouldn't.) — DaxServer (talk) 15:50, 5 January 2022 (UTC)[reply]

Could you explain what issue it causes by doing so? Gonnym (talk) 15:53, 5 January 2022 (UTC)[reply]
To clarify, there's no issue with the NZ parlbox. I probably should have posted by concern on the Party color cell talk page, and not here. Sorry!!
To add what I meant, one should use the template as | {{party color cell|party name}} without the pipe | at the start of the table cell (required for table formatting) as the template substitutes it; instead of | | {{party color cell|party name}}DaxServer (talk) 16:05, 5 January 2022 (UTC)[reply]
Ah ok. Well to be honest, I think I lean more with your opinion on this matter. It just seems "off" to me (though I didn't create it so no idea what was the rational behind that design choise). Anyways, bring it up on that page, I'll support and if there won't be any editors against that change, we can ask a friendly bot operator to help convert any usages. Gonnym (talk) 16:10, 5 January 2022 (UTC)[reply]
Thanks done Template talk:Party color cell § Propose to drop pipe (|) at the beginning — DaxServer (talk) 16:31, 5 January 2022 (UTC)[reply]
I've updated the live code with the sandbox changes as it has been a week with no additional comments. Regarding the pipe, when that discussion ends, we can update the template with the additional pipe without any issue. Gonnym (talk) 10:06, 6 January 2022 (UTC)[reply]


formatting help please[edit]

Grateful if someone can help with the ParlBox on William Crowther (New Zealand politician). It should be three lines, but displays as a rather garbled 2 ... the syntax looks ok and i'm reluctant to change it in case I make it worse. Many thanks! Somej (talk) 10:21, 8 October 2022 (UTC)[reply]

 Fixed it for you. It can be a bit buggy. Schwede66 10:25, 8 October 2022 (UTC)[reply]
wow that was fast! Many thanks. Somej (talk) 10:26, 8 October 2022 (UTC)[reply]