Template talk:Football box

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Football (Rated Template-class)
WikiProject icon This template is within the scope of WikiProject Football, a collaborative effort to improve the coverage of Association football 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.
 Template  This template does not require a rating on the project's quality scale.
 

Microformats[edit]

Wouldn't it be better, instead of forcing everyone to start using {{start date}}, we simply put the date parameter into the {{start-date}} template? That way we could let people keep putting dates in the {{footballbox}} template in plain text, and the microformats would be automatically generated. – PeeJay 23:09, 16 May 2011 (UTC)

Key[edit]

I think the template could do with an option for a key. We football fans may instinctively know that the arrows and numbers mean substitutions and times, but unfamiliar readers may not. The trouble is, with a template that complicated, I have no idea how to add it. Any template experts on hand to help? Oldelpaso (talk) 19:14, 14 December 2011 (UTC)

Who started the shootout[edit]

Anyone think there should be something that indicates who started the shootout? --MicroX (talk) 04:19, 13 February 2012 (UTC)

I second this. This is pretty useful. Perhaps an arrow at either end of "Penalties"? –HTD 19:10, 1 June 2012 (UTC)
Agree too, any progress on this? --Pelotastalk|contribs 10:49, 30 November 2012 (UTC)
I've noticed some sites, UEFA among them IIRC, display the penalty takers on a stagger, i.e. the penalty takers do not all line up, and are instead about half a line out from each other. If we could replicate this somehow, we could easily indicate who took the first kick. – PeeJay 19:26, 22 August 2015 (UTC)

Broken links in the |report= parameter?[edit]

What if the link in the |report= parameter goes bad? Usually, when a link goes bad you add a link to an archive copy, but leave the old link available. But, if you add a {{Cite web}}, {{Wayback}}, or {{WebCite}} template in to the |report= parameter then the {{footballbox}} looks bad.

For example,

9 July 2006 (2006-07-09)
20:00 (CEST)
Final
Italy  1 – 1 (a.e.t.)  France
Materazzi Goal 19' "Report". Archived from the original on 2 Jan 2009. Retrieved 1 Jan 2009.  Zidane Goal 7' (pen.)
  Penalties  
Pirlo Penalty scored
Materazzi Penalty scored
De Rossi Penalty scored
Del Piero Penalty scored
Grosso Penalty scored
5 – 3 Penalty scored Wiltord
Penalty missed Trezeguet
Penalty scored Abidal
Penalty scored Sagnol
Olympiastadion, Berlin
Attendance: 69,000
Referee: Horacio Elizondo (Argentina)
9 July 2006 (2006-07-09)
20:00 (CEST)
Final
Italy  1 – 1 (a.e.t.)  France
Materazzi Goal 19' Report Archived 2 January 2009 at the Wayback Machine. Zidane Goal 7' (pen.)
  Penalties  
Pirlo Penalty scored
Materazzi Penalty scored
De Rossi Penalty scored
Del Piero Penalty scored
Grosso Penalty scored
5 – 3 Penalty scored Wiltord
Penalty missed Trezeguet
Penalty scored Abidal
Penalty scored Sagnol
Olympiastadion, Berlin
Attendance: 69,000
Referee: Horacio Elizondo (Argentina)


What do you recommend? Blevintron (talk) 22:20, 31 March 2012 (UTC)

The above post was made in 2012, but many templates have this same problem. In fact some can't display archive links at all, the embedded template causes havoc on render. Not sure what the solution is. -- GreenC 01:07, 14 November 2016 (UTC)
Why not just wrap the reference in <ref></ref> tags in that case? | report = Report<ref>{{cite web | title=Actual title of the link | url=http://www.example.com/foo | accessdate=1 Jan 2009 | archiveurl=http://www.example.com/archive/foo | archivedate=2 Jan 2009 |deadurl=yes}}</ref> ==> Report[1]Sygmoral (talk) 22:50, 16 November 2016 (UTC)

Extra-time[edit]

What about include the extra-time of the match?--Marceloml (talk) 18:14, 26 July 2012 (UTC)

What do you mean? – PeeJay 19:02, 26 July 2012 (UTC)
I mean to put the minutes gived by the referee in both times of the match. (Sorry for my english)--Marceloml (talk) 19:23, 26 July 2012 (UTC)
Oh, you mean injury time (extra time is something different). It seems a bit pointless to me though. – PeeJay 19:26, 26 July 2012 (UTC)

Penaltiy shootout[edit]

Hey, just a small thing and maybe not needed but what about changing the link to a penalty shootout to Penalty shoot-out (association football), so we avoid a redirect? Kante4 (talk) 22:56, 2 February 2013 (UTC)

Code rewrite[edit]

Requesting the change to this version for better accessibility with the use of <div>. Better accessibility also evident in mobile view (with its current default stylesheet). --SocietyBox (talk) 08:13, 27 July 2013 (UTC)

Done. I also updated the test cases for you. — Mr. Stradivarius ♪ talk ♪ 04:45, 28 July 2013 (UTC)

"v" or "vs"[edit]

The correct abbreviation for "versus" is "vs" not simply "v". Therefore, could someone please change line 11 of this template from:

! style="width:22%; text-align:center" | {{#if:{{{score|}}}|{{{score}}}|v }} {{#if:{{{aet|}}}|([[Overtime (sports)#Association football|a.e.t.]]) }}

to:

! style="width:22%; text-align:center" | {{#if:{{{score|}}}|{{{score}}}|vs}} {{#if:{{{aet|}}}|([[Overtime (sports)#Association football|a.e.t.]]) }}

Thank you. – PeeJay 10:04, 26 May 2014 (UTC)

Red information icon with gradient background.svg Not done: please establish a consensus for this alteration before using the {{edit template-protected}} template. versus agrees with you that vs is a correct abbreviation, but it disagrees that it can't simply be v as well: "Versus, often abbreviated v., v, vs. or vs...". Therefor, you will need to get a consensus to change the cosmetics of this template per your request. — {{U|Technical 13}} (tec) 12:06, 26 May 2014 (UTC)

Template-protected edit request on 19 August 2014 (teams displayed as headers)[edit]

Request to change the following code:
! style="width:39%; text-align:right" class="vcard attendee" | {{{team1}}}
! style="width:22%; text-align:center" | v
! style="width:39%; text-align:left" class="vcard attendee" | {{{team2}}}

to
| style="width:39%; text-align:right" class="vcard attendee" | {{{team1}}}
! style="width:22%; text-align:center" | v
| style="width:39%; text-align:left" class="vcard attendee" | {{{team2}}}

In essence to replace the ! to | so that the team name is not defaulted to bold type Header but is controlled by the user who is using the template.

Refer to Template:footballbox collapsible for the way the teams are outputted since this is supposed to be identical in its behavior except that the output is collapsible.

A discussion with an example has begun at Wikipedia_talk:WikiProject_Football#Template_footballbox_.26_footballbox_collapsible.

Brudder Andrusha (talk) 00:58, 19 August 2014 (UTC)

Red information icon with gradient background.svg Not done for now: This will affect the appearance of all 12,000 transclusions, so there should be a clear consensus to make the change before we enact this request. Let's wait for the outcome of the discussion you linked to - it will need at least two or three days to give all interested parties a chance to take part, I would say. If the discussion results in a consensus to make the change, please reopen this request. Best — Mr. Stradivarius ♪ talk ♪ 01:16, 19 August 2014 (UTC)

Template-protected edit request on 10 December 2014[edit]

The Penalties wikilink should have a hyphen in the word shoot-out so it links directly to Penalty shoot-out (association football) MicroX (talk) 01:16, 10 December 2014 (UTC)

Red information icon with gradient background.svg Not done: Declining per WP:NOTBROKEN. The link Penalty shootout (association football) leads to the article Penalty shoot-out (association football) as much as the link Penalty shoot-out (association football) does; I don't think putting over 10,000 articles in the job queue for such a change is worth it. SiBr4 (talk) 09:36, 10 December 2014 (UTC)
What is a job queue? You'd just be making one simple edit on one template. --MicroX (talk) 06:57, 12 December 2014 (UTC)
See Help:Job queue. A change to a template needs to be reflected on all pages using the template, which does not happen immediately. SiBr4 (talk) 09:36, 12 December 2014 (UTC)

Google using Microformat summary[edit]

Google are now using the Microformats 'summary' attribute when displaying search results. It's not looking right in the Google results at the moment. See http://i.imgur.com/roHvZS6.png as an example.

I've made a few proposals in the template:Football box/sandbox file. I've added team names to a summary attribute and also added a location attribute to the the stadium/venue. I've already made the changes to the template:Football box collapsible template and the output now looks a lot better on Google for wikipedia pages using that template.

TheBigJagielka (talk) 21:50, 26 February 2015 (UTC)

Pictogram voting comment.svg Note: Andy, I know no one who knows microformates better than you. Can you confirm this issue here and that the proposed code in the sandbox will resolve it? Thanks. — {{U|Technical 13}} (etc) 02:09, 14 March 2015 (UTC)
No other comments, so  Done — Martin (MSGJ · talk) 09:41, 20 March 2015 (UTC)
Now the template is broken when attendance is missing. Stadium and referee info are in the same row. Dr. Vicodine (talk) 20:41, 20 March 2015 (UTC)
The changes has been reverted. User:TheBigJagielka, can you thoroughly test your changes and let me know when you are ready to re-deploy? — Martin (MSGJ · talk) 20:17, 21 March 2015 (UTC)
@MSGJ:, I have made the necessary change and the testing can be seen below:
Stadium, Referee and Attendance

13 July 2014
16:00 UTC−3
Germany  1–0 (a.e.t.)  Argentina
Götze Goal 113' Report
Stadium, Referee but no Attendance
Stadium, but no Referee or Attendance
No Stadium, but includes Referee and Attendance

13 July 2014
16:00 UTC−3
Germany  1–0 (a.e.t.)  Argentina
Götze Goal 113' Report

Attendance: 74,738
Referee: Nicola Rizzoli (Italy)
Stadium, Attendance but no Referee

13 July 2014
16:00 UTC−3
Germany  1–0 (a.e.t.)  Argentina
Götze Goal 113' Report

TheBigJagielka (talk) 14:24, 22 March 2015 (UTC)

 Done — Martin (MSGJ · talk) 12:36, 29 March 2015 (UTC)

Easier report parameter[edit]

I just changed the Football box collapsible template to accept plain URLs as 'report' parameter, so that people can just write report=url instead of always having to write report=[url Report]. The template now generates those links automatically, but only if a plain URL is detected, so all other use cases still work. Feel free to copy over that change into this template. Sygmoral (talk) 14:23, 22 August 2015 (UTC)

Great idea. I'd been wondering about this for a while, but I didn't know if it was possible. – PeeJay 19:22, 22 August 2015 (UTC)
Here is the code to parse the report parameter that way, if someone wants to put it into this template.
{{ #if: {{{report|}}} | {{#ifeq:{{str_sub|{{{report}}}|0|4}}|http |[{{{report}}} Report] |{{{report}}}}} | }} Sygmoral (talk) 18:06, 29 August 2015 (UTC)

Template-protected edit request on 2 March 2016[edit]

Quite a while ago already, I edited the {{Football box collapsible}} template to make the report parameter easier to use. I did this because everyone always writes report=[url Report], so I automated that format so you can just write report=url instead. It detects when the report parameter starts with http, and if so, wraps it into such a link.

The following edit is required: {{{report}}} needs to be replaced with {{#ifeq:{{str_sub|{{{report}}}|0|4}}|http |[{{{report}}} Report] |{{{report}}}}}. Thanks! –Sygmoral (talk) 20:05, 2 March 2016 (UTC)

Yes check.svg Done — Martin (MSGJ · talk) 23:19, 2 March 2016 (UTC)

Accessibility update[edit]

I can't say for certain, but MOS:ACCESSIBILITY (see Block elements) would probably suggest that we move away from breaks and toward the use of {{plainlist}} for the goals, cards, etc. in the two goals parameters. Comments? If no one objects, I'll update the documentation. Walter Görlitz (talk) 04:03, 16 May 2016 (UTC)

Good idea, I agree. –Sygmoral (talk) 01:53, 18 May 2016 (UTC)
In fact, with a little work, we could make it so that goal parameters starting with * are automatically converted to use {{plainlist}}. That may be worth doing because it will make adoption easier: it is easier to remember. Could then look like this:
|goals1       = [[Marco Materazzi|Materazzi]] {{goal|19}}
|goals2       = 
* [[Zinedine Zidane|Zidane]] {{goal|7|pen.}}
* [[Someone else]] {{goal|74}}
|other_parameters
versus
|goals1       = [[Marco Materazzi|Materazzi]] {{goal|19}}
|goals2       = {{plainlist|
* [[Zinedine Zidane|Zidane]] {{goal|7|pen.}}
* [[Someone else]] {{goal|74}}
}}
|other_parameters
Shall I put in an edit request for that? –Sygmoral (talk) 02:04, 18 May 2016 (UTC)
That would be a good option. Walter Görlitz (talk) 06:24, 18 May 2016 (UTC)
I have just implemented this for {{Football box collapsible}}! Assuming no one complains, I will soon create an edit request for this template. (I did notice that no spaces must appear before the *, otherwise it doesn't come out right.) –Sygmoral (talk) 03:49, 20 May 2016 (UTC)

Template-protected edit request on 20 May 2016[edit]

See above: this code change allows people to list goals and penalties using normal list syntax (asterisk), which will be rendered in a {{plainlist}}, rather than putting <br> between them (as suggested by Walter Görlitz). The required change is that the parameters goal1, goal2, penalties1 and penalties2 are replaced with constructs like this:

{{#ifeq:{{str_sub|{{{goals1}}}|0|1}}|* |{{plainlist|{{{goals1}}}}} |{{{goals1|}}}}}

This code is already in use on the {{Football box collapsible}} template, as demonstrated by the last few matches on Belgium national football team results – 2010s. Thanks! –Sygmoral (talk) 04:04, 20 May 2016 (UTC)

@Sygmoral: May you implement the change in this template's sandbox and update the testcases so your suggested change is visible? Thanks. — Andy W. (talk ·ctb) 04:22, 20 May 2016 (UTC)
@Andy M. Wang: done! I had to add a new test case (nr 3) because the new functionality can only be tested with new syntax. The other tests do show that it is backwards compatible, however. –Sygmoral (talk) 04:53, 20 May 2016 (UTC)
@Sygmoral: Thanks! The change seems good for MOS:ACCESSIBILITY as you stated, and you have support, so this looks uncontroversial. I'm planning on applying the changes later once I take another look shortly (within 24 hours). Cheers, — Andy W. (talk ·ctb) 05:34, 20 May 2016 (UTC)
Went ahead and synced with Special:Diff/721182966. Tests looked great. Cheers, — Andy W. (talk ·ctb) 06:20, 20 May 2016 (UTC)

Adjustment to ID parameter[edit]

Requesting to add {{#ifeq:{{str_sub|{{{id}}}|0|1}}|" |{{{id|}}}|"{{{id}}}"}} (similar to this edit) to allow the ID's to not need quotations while still supporting instances where the quotation is included (and therefore preventing duplicate quotes). Secret Agent Julio (talk) 17:46, 21 July 2016 (UTC)

Oh my, they require quotes right now? That isn't great design... :/ Is there a way to easily find all usages of this template with this recent new id parameter, so that we can just update them and then always add quotes in this template? –Sygmoral (talk) 17:53, 21 July 2016 (UTC)
Yeah, definitely not the greatest idea. I know Qed237 brought it up here, so it sounds like the quotes were left as it was thought people would still include quotations? Either way, this prevents the duplicate quotes Redrose64 mentioned. I believe this was implemented during some work on Category:Pages using invalid self-closed HTML tags, so after only a week it has already been thoroughly implemented. I could try to see if the quotes could be removed via AWB, but for now this is probably the best solution. — Preceding unsigned comment added by alternate account of Secret Agent Julio (talkcontribs) 18:10, 21 July 2016 (UTC)‎
For now, we can put in something like {{#ifeq:{{str sub|{{{id}}}|0|1}}|"|[[Category:Some category name]]}} (or some other string template if there's a better one than {{str sub old}}). After the instances of |id= with '"' are corrected, the update would then be a simpler {{#if:{{{id|}}}|id="{{{id}}}" }} probably. Read Redrose64's follow up on his talk. If adding quotes is not recommended, the request here is probably okay — Andy W. (talk ·ctb) 18:18, 21 July 2016 (UTC) 18:30, 21 July 2016 (UTC)
User:Redrose64 didn't get the ping from the unsigned comment. Courtesy post — Andy W. (talk ·ctb) 18:23, 21 July 2016 (UTC)
Qed237 didn't get the ping from my unsigned comment. Courtesy post. Secret Agent Julio (talk) 19:05, 21 July 2016 (UTC)
Done GeoffreyT2000 (talk) 13:40, 22 July 2016 (UTC)