Template talk:Football squad player

Add postion Field Player (FP)
Hey! Can the position FP be added to the template, as I was using this template for a futsal squad and players other than goalkeepers are usually referred as field players in futsal.--Anbans 585 (talk) 17:16, 30 July 2018 (UTC)
 * , from looking at Futsal positions it seems like field player isn't listed there. Is there an article that I could link to describing the position of field player, as there is for the four positions currently in the template? It would look slightly weird if the link to Field player were a redirect.
 * Actually, since the template would link to the football definition of goalkeeper, do you think it might also be advisable to create a separate Futsal squad player? Enterprisey (talk!) 04:35, 4 September 2018 (UTC)


 * , no I don't think we require to create a separate template for it. Actually the template nat fs start no caps contains a parameter 'Field Player' which now redirects to Futsal positions. Though you are right that futsal has outfield positions like defender, forward etc, but in futsal terms they are usually known as ala, pivot, etc. Though when any futsal squad is announced for a competition, if the position of the player is unknown (the player is not a goalkeeper) then he is usually referred as a 'Field Player', that is why I wanted that if possible a 'FP' parameter can also be added to this template, as this template is usually used for displaying a club squad.--Anbans 585 (talk) 10:49, 4 September 2018 (UTC)

Can the above request be completed?--Anbans 585 (talk) 14:18, 5 August 2019 (UTC)
 * See Association football positions. Is the correct term outfield player? By this terminology, even the GK is a "field player", i.e. football player. Unless futsal uses different terminology than football. – wbm1058 (talk) 18:11, 7 March 2021 (UTC)
 * Yep, in futsal it's common to use GK and FP. This match report sees two teams using different positions: Japan uses GK and FP, Lebanon uses GK, DF, MF, FW. Nehme1499 19:24, 7 March 2021 (UTC)

Multiple issues
Why have we truncated the template? Also, I don't like the deviation on the background colour from plain page to a different background, having issues with that. Also, the alternative code is gone for the flag icons and that needs to be reinstated. Govvy (talk) 12:45, 17 August 2020 (UTC)
 * Do you mean the alternative text? It is already present for the flag icons. S.A. Julio (talk) 14:22, 17 August 2020 (UTC)
 * I can't see any alt text when I hover over the flags (e.g. here). I'm not sure what Govvy means by 'truncated' though? If anything the new version is slightly larger as it now includes the trigrammes. Number   5  7  14:29, 17 August 2020 (UTC)
 * I think the nationality isn't being read out because the idea is that it's not the nationality being displayed, rather the nation's football federation. Nehme1499 (talk) 14:45, 17 August 2020 (UTC)
 * The alt attribute is present for the flag icons (you can view this in the source code). However, the flag icons themselves are not linked (the accompanying FIFA trigramme instead is). Normally you see the text "England" when hovering over 🏴󠁧󠁢󠁥󠁮󠁧󠁿 because it links to England (done by the software), while no mouseover text displays over the flag icons for 🏴󠁧󠁢󠁥󠁮󠁧󠁿 ENG or 🏴󠁧󠁢󠁥󠁮󠁧󠁿 england. However, if desired I can add mouseover text using the title attribute (though I have not usually noticed this used in flag templates). S.A. Julio (talk) 15:15, 17 August 2020 (UTC)
 * On my 15" screen it looks, I don't know, truncated to me, I find the hover over text really very helpful, especially when I am not sure of the flag colours, and the three letter's afterwards, I am not really sure about that, it should be a whole name or not at all in my opinion, the three letters might be confusing to certain readers. Govvy (talk) 16:01, 17 August 2020 (UTC)
 * I am in agreement with that, the three letters doesn't tell you which country the player comes from does it? REDMAN 2019  ( talk ) 16:56, 17 August 2020 (UTC)
 * If it's the full name, the template will be a mess when you have players from countries with long names. The idea behind using the trigrammes was that they are consistently three letters. Number   5  7  17:29, 17 August 2020 (UTC)
 * I don't know about other people, but I am not a fan of the three letters, nor the over-linked squad positions. Govvy (talk) 18:13, 17 August 2020 (UTC)
 * I don't think it's possible to automatically de-link multiple instances of positions. As for the trigram, it's the only aesthetically pleasing solution because, as N57 pointed out, some countries (such as Trinidad and Tobago) would mess up the table width. Nehme1499 (talk) 19:26, 17 August 2020 (UTC)
 * I didn't think there was anything wrong before the changes. I would say if it ain't broke don't fix it!! :/ Govvy (talk) 19:43, 17 August 2020 (UTC)
 * I would also prefer for there to only be a flag, without text. However, it apparently violates MOS:ACCESS, so we needed to add some text. As for the positions, I don't think it's different than before? <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> (<b style="font-size:80%;color:#a9a9a9">talk</b>) 19:50, 17 August 2020 (UTC)
 * Yes, the positions were linked on every line in the previous version. Number   5  7  20:36, 17 August 2020 (UTC)
 * The flags and the country codes seems like massive overkill and just makes the template look crowded and clunky. Do we really need country codes? NouveauSarfas (Talk page) 00:33, 18 August 2020 (UTC)
 * Per the RfC above, we can't put only the flag without the country's name (or code) next to it, per MOS:ACCESS. <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> (<b style="font-size:80%;color:#a9a9a9">talk</b>) 00:38, 18 August 2020 (UTC)

Oh, bugger is all I can say. Can we at least change the background back to normal? Govvy (talk) 21:04, 17 August 2020 (UTC)
 * I wouldn't necessarily have a problem with this, but the outcome of the section RfC on this was to use MediaWiki default (albeit not with a terrible amount of consensus). I'm also not sure how to change this. It looks like the code is looking at something that defines "wikitable football-squad", but I have no idea where this is. I assume Tholme knows where it is? Number   5  7  21:25, 17 August 2020 (UTC)
 * The real problem is that this template is not suited for this to start with. The cramped layout when accessibility was correctly considered was a primary motivator when Fs player2 sort was created 12 years ago. It is wider and longer, but does not look cramped, and you get the full nation name not a TLA. While the other template still needs to be fixed so it links to the association, not nation, it's a better fit for accessibility. I'll also remind readers here that the trigram with a tool tip is still a minor issue as tablets cannot hover easily to get the tool tip.
 * I suppose, you could make each side of this template a wider to avoid this cramping. Walter Görlitz (talk) 02:19, 18 August 2020 (UTC)
 * What I don't understand is, why was Fs player2 sort created 12 years ago? Why weren't changes made directly to Football squad player? I'm not saying one is better than the other, but I really don't see why we now have Saudi, American, and a handful of other countries only using Fs player2, while 99% of other leagues use Fs player. <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> (<b style="font-size:80%;color:#a9a9a9">talk</b>) 12:11, 18 August 2020 (UTC)
 * From memory, fs start/player/end2 was initially created as a form of a sandbox version to showcase a potential change, but there was insufficient support to change the main template to that format. However, rather than it being left as a dead end, some editors began using v2 instead. It's a mess that should never have been allowed to happen, but there is a bit of a history of North American editors doing things their own way (I recall at least one threat to start a breakaway WikiProject after a dispute over wording in Infobox football club), and lower profile leagues are often prone to a single editor implementing changes across a wide number of articles without discussion (I guess this may have happened with the Saudi ones). Number   5  7  14:03, 18 August 2020 (UTC)
 * Maybe it should just be one table like the fs player2 sort, and in one column. I think being able to sort the table is very useful. There will then also be space to use the full name for nations. The background is set in Commons.css for wikitable, but it is possible to overwrite with css styling on the individual rows. I belive the best would to use a more normal wikitable with standard grid lines and backgrounds. Tholme (talk) 16:49, 18 August 2020 (UTC)
 * Yes, the second template was made in an effort to address accessibility. The consensus us one large table is not preferred by most, and ideally a responsive table should be used if possible so that mobile viewers can see it better. I can't recall what the effect of having the "two column" view is on screen readers—the tool that those who have difficulty seeing text use to read the page to them—but if I recall, they read across the table, not down numerically. This is avoided with a single-column table. Walter Görlitz (talk) 20:25, 18 August 2020 (UTC)


 * Note. Fs player2 sort transcludes Football squad player2 – wbm1058 (talk) 17:56, 24 February 2021 (UTC)

Merge with Football squad player2
So, what is missing to merge the two? <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> (<b style="font-size:80%;color:#a9a9a9">talk</b>) 21:27, 22 September 2020 (UTC)
 * MOS:ACCESS had to be met and ideally, WP:OVERLINK. Walter Görlitz (talk) 04:53, 23 September 2020 (UTC)
 * Didn't we already meed ACCESS? And OVERLINK doesn't apply to tables. <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> (<b style="font-size:80%;color:#a9a9a9">talk</b>) 14:15, 23 September 2020 (UTC)
 * You're confusing may be linked in tables with must be linked. If a reader of the roster would be helped by the link is the question. If we had used full names rather than the three-letter acronyms, is there any benefit to the links here Arsenal F.C.? Gabon is the only uncommon nation in the list. I can see millions of readers thinking, "I wonder if there's a Wikipedia article about the football association in Germany? Oh I know how to find it: Arsenal's keeper is German, I'll click through to the roster to get to it." Granted, the better squad listing also links it so it's not any better, but easier to solve. Walter Görlitz (talk) 16:26, 23 September 2020 (UTC)
 * The positions and countries are linked for every player both versions of the squad template, so this is not an issue that is preventing a merger of the two.
 * A constructive answer is that there are two options to resolve this:
 * Manually change every article using fs player2 to the main template
 * Make fs squad player backwards compatible with fs player2 and Fs player2 sort (e.g. enable fs player to process with firstname/lastname input) and deal with any article that is using a non-standard heading for the squad (you may be able to create a list of every article that uses. Once that's resolved, the template can simply be redirected.
 * Number  5  7  17:32, 23 September 2020 (UTC)
 * That won't work since it uses a single column and is preferable. Use the better template and ditch this one. It's really a lot easier, especially when you can just ignore the mid. Walter Görlitz (talk) 06:04, 24 September 2020 (UTC)


 * The replacement should be doable quite quickly semi automatically. 600 pages isn't that much and I or some other WP:TFDH regular should be able to do it without too much bother. --Trialpears (talk) 17:43, 23 September 2020 (UTC)
 * As the modified fs player template meets all the criteria agreed in the RfC (country name next to flag, two columns (as a responsive table has not been possible to develop), abbreviations used for the position, and no gridlines), I suggest this starts. Doing it semi-automatically will also allow fixing the non-standard table headers. Number   5  7  17:49, 23 September 2020 (UTC)
 * I'll take a look. Haven't really been following this closely and am quite busy currently so I won't promise it to be quick. — Preceding unsigned comment added by Trialpears (talk • contribs) 17:53, 23 September 2020 (UTC)
 * After taking another look I think the best course of action would be performing the merger even though further tweaking may be desirable. This template is now significantly more in line with the consensus reached in the RfC tha the other version. I would be comfortable starting replacements this weekend if I have time and no one complains here. --Trialpears (talk) 22:33, 14 October 2020 (UTC)
 * Still not ideal though. Walter Görlitz (talk) 16:35, 16 October 2020 (UTC)
 * I'm ok with the merger. <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> (<b style="font-size:80%;color:#a9a9a9">talk</b>) 18:44, 16 October 2020 (UTC)
 * Yes, it would be good to make a start. Cheers, Number   5  7  19:18, 16 October 2020 (UTC)
 * Any update? <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> (<b style="font-size:80%;color:#a9a9a9">talk</b>) 02:34, 18 December 2020 (UTC)
 * No, because of the problems that remain. Walter Görlitz (talk) 04:39, 18 December 2020 (UTC)

After seeing that several "football transfers" articles had landed in Category:Pages where node count is exceeded using many football squad player tables, I somehow fell into this rabbit hole, where I've been for the past two days. I've just noticed that Template:Football team 1 redirects to Template:Football squad start and Template:Football team 2 redirects to Template:Football squad mid and these templates are used in articles such as FA Youth Cup Finals of the 2000s, where each column in a 2-column table is for a different team. This throws a little monkey wrench at the idea that tables could be auto-split into two columns at the midway point on screens large enough to support two columns. – wbm1058 (talk) 23:41, 14 February 2021 (UTC)
 * This template shouldn't be used in that page. It should be formatted as such, using tables for the players. <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> (<b style="font-size:80%;color:#a9a9a9">talk</b>) 23:59, 14 February 2021 (UTC)
 * It shouldn't be too much work to change the usage of those. Just 18 16 pages use Football team 1 16 pages use Football team 2. – wbm1058 (talk) 00:16, 15 February 2021 (UTC)
 * Yep, agreed. Regarding the merge of Fs player and Fs player2, do you think it's going to be complicated? Are there other things that have to be taken care of before they can be merged? <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> (<b style="font-size:80%;color:#a9a9a9">talk</b>) 00:26, 15 February 2021 (UTC)
 * I've made several edits which bring the two into closer alignment, and so far nobody has reverted me or objected to any of my edits. See the next subsection. wbm1058 (talk) 04:37, 15 February 2021 (UTC)
 * It was bound to happen. One of my edits to Template:Football squad start was reverted, so I have made a corresponding edit to Template:Football squad start2. See WT:FOOTBALL#Fs start - template update question. – wbm1058 (talk) 15:06, 15 February 2021 (UTC)
 * was added on 25 August 2012 to allow for some merging Template:Football team 1 & Template:Football team 2 (they had actually been merged on 7 June 2012‎ but support for the parameter had been neglected). The February monthly TemplateData usage report shows  only used on 15 pages, which seem to be the same pages that use Template:Football team 1 & Template:Football team 2. So if we substitute those templates on these pages I think we'll just have the wikitable source code on those pages without the tables being generated by templates, and we can drop support for  as an unused parameter rather than merge that parameter into Template:Football squad start2. – wbm1058 (talk) 20:09, 15 February 2021 (UTC)
 * I haven't seen any discussions about the matter, but I suppose the reason for using templates to build a squad's roster is that membership is under constant flux, and it's easier for editors unfamiliar with wikitable syntax to add or remove team members when the implementation uses templates. But for matches the opposing squads for the match are what they were, and will never change, so it's better to just use wikitables as these will never need to be edited except to correct any errors. – wbm1058 (talk) 20:50, 15 February 2021 (UTC)
 * Hmm, Template:Football line-up. – wbm1058 (talk) 04:28, 26 February 2021 (UTC)

Responsive template
The consensus was to make the table responsive to window width (if possible) or two-column (if not), but I can see from the discussion above that making it responsive is important to Walter Görlitz, so we should try again for that. I see that earlier attempts didn't find an acceptable solution. Below are transcluded discussions relevant to that from talk. – wbm1058 (talk) 04:37, 15 February 2021 (UTC)

Country name
With regards to the recent change (which I reverted), I don't believe the discussion above is definitive on requiring the full country name (the closer refers to MOS:Icons, which gives (which produces 🇯🇵 JPN) as an example of appropriate use). Using the full names makes the template look a mess – compare the two options here. Having the trigramme means the country name is a reasonably consistent width all the way through the table. When you start using full names, it starts looking quite disjointed. The full name works better on fs player 2 because the country is in the final column rather than in the middle, and also because that template has gridlines, making it easier to follow the row. As this version has no gridlines (confirmed in the RfC above), placing the full country name in the middle of the columns makes it noticeably harder to follow IMO. Cheers, Number   5  7  22:17, 24 February 2021 (UTC)
 * While MOS:FLAG does advocate for the use of the full name "adjacent to the first use of the flag", the "Accompany flags with country names" section also states "However, some editors feel that some tables such as those containing sports statistics (example) are easier to read if flag is used throughout". <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> 22:26, 24 February 2021 (UTC)

There was an earlier, decade-old TL;DR discussion on this:

I found this discussion when researching the history of the parameter. was briefly added, but quickly reverted from Football squad player in July 2010, but this parameter has been part of Football squad player2 since its creation. I don't know whether or how much this parameter is used in that template. name and are two of the template differences remaining to be resolved. – wbm1058 (talk) 23:13, 24 February 2021 (UTC)
 * Finding that is apparently unused, I've removed it. – wbm1058 (talk) 15:43, 25 February 2021 (UTC)

Birthdates?
In working the invalid parameters list I've seen many cases of editors adding an unnamed parameter with a date which I assume is the player's date of birth. For example, see ESAE FC. Any idea why this is happening, and any better option for fixing this other than simply removing the date from the template? wbm1058 (talk) 03:25, 27 February 2021 (UTC)
 * Such a parameter exists for national team squadlists (e.g.) so maybe they are confused by that. I can't really see any solution other than removing it where it exists for club squadlists. Number   5  7  15:50, 27 February 2021 (UTC)
 * Done. I'm trying to get these cleaned up before the March report is generated. – wbm1058 (talk) 17:19, 27 February 2021 (UTC)

nonat
The little-used parameter was added to Football squad start2 in August 2012 as a way to remove the Nation column and was first used on Ayr United F.C.. However the current version of Ayr United F.C. does show the nation. Indeed the March TemplateData report found that this parameter wasn't being used anywhere. However I found that Southampton Women's F.C. wasn't specifying the nation in its table so I added yes there. If we continue supporting this parameter, it needs to be merged/added to Football squad start. I can do that. wbm1058 (talk) 22:11, 7 March 2021 (UTC)
 * I'm having second thoughts on supporting the option to remove the nation column. While it works fine on Southampton Women's F.C. where none of the players have their nation specified, it's more problematic on articles like Haringey Borough F.C. where just a couple players have their nation specified or Kansas City Comets (1979–91) where all but one have their nation specified. The implementation should be more robust to handle these better. I'm thinking of just removing support for this parameter rather than going to more effort to make it work better. – wbm1058 (talk) 02:04, 19 March 2021 (UTC)
 * I think the best route to go down would be to follow the nonumber option – i.e. the nationality column is included unless turned off via a nonat parameter. I don't recall the mess that is the Haringey Borough squad being possible previously – is it a recent change that has caused this? Number   5  7  09:11, 19 March 2021 (UTC)
 * Yes, a recent change I made, now reverted, caused that. I've reached a sort of impasse. The increased template complexity required to support these new options is causing some pages that have a lot of football squad tables to exceed template-include byte limits. So I'm stuck in my efforts to merge Football squad player and Football squad player2. I think this can be solved by coding the decision logic in a Lua module, but I'm still not particularly proficient in Lua. Perhaps this project is the push I've needed to take a crash course in Lua coding, so I can finish what I've started. – wbm1058 (talk) 14:50, 21 March 2021 (UTC)

natlast
And there was no consensus on so I suppose the solution is to implement a new optional parameter to move the nation to the last row column. Football squad player2 could simply be a shell that transcludes Football squad player which specifies this new parameter yes. – wbm1058 (talk) 17:13, 10 March 2021 (UTC)
 * Keep in mind that if we were to move it to the last row, it would create a huge white space in this case: say one player has "on loan from team" as the "other=" parameter. This means that, in order for the nations to be all aligned, the players that don't have an other parameter would have a lot of space between the player's name and their nationality. <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> 17:33, 10 March 2021 (UTC)
 * Agree with Nehme on this – as it looks like we're sticking with trigrammes, I don't see any benefits to moving the nationality to the last column, only problems. Number   5  7  17:59, 10 March 2021 (UTC)
 * For the record, rows are horizontal and columns are vertical, so the request is for nationality to be placed in the column on the right. The real problem is that you all want two columns of complete player data for the roster.
 * Compare New York Red Bulls and RB Leipzig. In the first, the last column lines up quite nicely and meets both MOS:ACCESS and the nation is clear, with the nation being out of the way of the actual useful information about the player: name, position and number. To see what it would look like with players on loan, look at the players out on loan sections. Reducing either to a small monitor, and everything wraps and you end up with a horrible mess with the double-wide. Either drop the nation (which is a source for edit wars on occasion) or put it on the right where it belongs. Walter Görlitz (talk) 01:45, 11 March 2021 (UTC)

ref location
Can we shift the ref field to go after the |other= field, as we use that field for loans information also, is seems smarter to have the ref run after that maybe? At the end of the string line. I've used the feature on Tottenham Hotspur F.C. for Out on loan players. Thought it would help, thoughts? Govvy (talk) 12:39, 2 February 2021 (UTC)
 * Just put the ref outside the template at the end of the line as at Manchester United F.C. No need to put it in its own parameter of the template. – PeeJay 16:46, 2 February 2021 (UTC)

Positions
Association football positions describes more specialized positions. See for a less-specialized position. From the archives:

Multiple positions
Should any other valid positions be added to the template? I've run across several malformed attempts to add a second position. For example, see this diff.

Is THIS an acceptable way to show players who play two positions? wbm1058 (talk) 20:00, 7 March 2021 (UTC)
 * No, we should stick to one position between GK, DF, MF, FW. <b style="font-family:Verdana;font-size:80%;color:#000080">Nehme</b><b style="font-family:Verdana;color:#27B382">1499</b> 20:03, 7 March 2021 (UTC)

High node counts coming from this template
After seeing that several "football transfers" articles had landed in Category:Pages where node count is exceeded using many football squad player tables, I somehow fell into this rabbit hole, where I've been for the past two days... – wbm1058 (talk) 23:41, 14 February 2021 (UTC) (higher up on this page)

And now I've been here on and off for over a month, I'm just now looking deeper into this. Each Football squad player transclusion uses roughly 1,000 nodes. I ran a test on one example use and found that without nat the node count was just 146, but with nat the node count was 1158, thus nat uses (1158-146)=1012 nodes! So that's where to look to make efficiency improvements.

List of Iranian football transfers summer 2013 has 1,172 Football squad player transclusions and that put its node count at 1,008,338 which is > 1,000,000.

I saw that this 20 August 2020 edit by attempted to solve the issue. I don't have any experience with working on other instances of this rarely-occurring problem, but will take a stab at further investigation to figure it out. I'd like to fix this before completing the merge with Football squad player2 so as not to risk making this problem worse. – wbm1058 (talk) 17:09, 14 March 2021 (UTC)

I've traced it down to: That still has a preprocessor visited node count = 1,028 but removing code cuts it down to 630 as it saves a table lookup. In other words is too inefficient to do on a mass scale and I believe changing that to  will get the Category:Pages where node count is exceeded pages inside the limit. I can make that happen by creating a new parameter that lets the user override the code default on selected pages. Note that my recent edit to do this for everyone was reverted. – wbm1058 (talk) 18:30, 14 March 2021 (UTC)
 * The primary issue here is that those articles shouldn't be using this template, as it's not what it is designed for. They should look like List of English football transfers summer 2020. Number   5  7  19:25, 14 March 2021 (UTC)
 * It's not always easy to get all editors on the same page, and have Iranian and Serbian and Romanian and Japanese editors to all follow standards established by British editors. In the meantime, I've implemented the easier patch, and cleared Category:Pages where node count is exceeded, but for four user pages. wbm1058 (talk) 02:36, 15 March 2021 (UTC)
 * Related discussion and analysis at Talk:List of Serbian football transfers summer 2018. – wbm1058 (talk) 16:14, 6 April 2021 (UTC)