Template talk:Infobox3cols
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||
|
![]() | Template:Infobox3cols is permanently protected from editing because it is a heavily used or highly visible template. 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 template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
Protected edit request on 1 March 2014: Include parameters for embedding
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
The Infobox3cols template is used in templates such as Template:Infobox football biography, which can be embedded into other templates. However when embedded in other templates the border and cellspacing is still present. Please update the template to enable embedding. Davykamanzi → talk · contribs 16:28, 1 March 2014 (UTC)
- Not done: it's not clear what changes you want made. Please mention the specific changes in a "change X to Y" format. Also, some TESTCASES would be helpful showing exactly what the issue is. Thanks. As a side note, I'm requesting the protection level on this template lowered to Template editor so that I can process this request for you with that additional information. — {{U|Technical 13}} (t • e • c) 16:59, 1 March 2014 (UTC)
- For the record, Davykamanzi, lowering of the protection level has been declined until you have clarified your request. I will post a talkback on your talk page in case you have notifications disabled. — {{U|Technical 13}} (t • e • c) 05:25, 3 March 2014 (UTC)
- Sorry for not being clear enough. I wanted the infobox to be able to be embedded into other infoboxes without the border no longer being present, which is what happens when it is embedded into another template. For example, when you embed {{Infobox musical artist}} into {{Infobox person}} as a module, it becomes part of the {{Infobox person}} template and just creates a section called "Music career" (like with Justin Timberlake's article). If this becomes possible it would be convenient to put it to use in Pelé's article for example, because after finishing his football career he went on to be an actor and a philanthropist, so {{Infobox person}} with {{Infobox football biography}} embedded into it would be better than having {{Infobox football biography}} by itself. Davykamanzi → talk · contribs 09:49, 3 March 2014 (UTC)
- This will not be easy. As you note,
{{infobox3cols}}
is the framework for{{infobox football biography}}
; and{{infobox}}
is the framework for{{infobox musical artist}}
and{{infobox person}}
. The{{infobox}}
template has a|child=
parameter which permits embedding of one infobox inside another, and it is this which I am certain that you wish to be provided in{{infobox3cols}}
as well. In the old days, I could have opened up both, and copied code from one to the other in order to provide the missing functionality. But whilst{{infobox3cols}}
is still built from regular Wiki markup and HTML (which in the normal course of things would make an amendment relatively simple),{{infobox}}
has unfortunately been converted to Lua, which makes working out how it does anything an absolute nightmare - and even if I could, it would not be possible to copy the code at all, because the syntax is completely different. --Redrose64 (talk) 13:16, 3 March 2014 (UTC)- As Redrose64 notes, Lua can be much more difficult to track the flow of a script than wikitext/template syntax is. I also could likely not add this functionality into {{Infobox3cols}} as it would like require an entire re-write, which leaves me wondering, what is preventing {{Infobox football biography}} from being built on the {{Infobox}} framework instead? — {{U|Technical 13}} (t • e • c) 19:02, 3 March 2014 (UTC)
- See e.g. Teddy Sheringham. The variant infobox is to enable four columns instead of two under the "Senior career" and "National team" headers. --Redrose64 (talk) 20:15, 3 March 2014 (UTC)
- As Redrose64 notes, Lua can be much more difficult to track the flow of a script than wikitext/template syntax is. I also could likely not add this functionality into {{Infobox3cols}} as it would like require an entire re-write, which leaves me wondering, what is preventing {{Infobox football biography}} from being built on the {{Infobox}} framework instead? — {{U|Technical 13}} (t • e • c) 19:02, 3 March 2014 (UTC)
- This will not be easy. As you note,
- Let me play with the sandbox... I have a few ideas to allow this with {{Infobox}} and kill this 3cols version. — {{U|Technical 13}} (t • e • c) 03:54, 4 March 2014 (UTC)
- Not done: We need some actual code before this request can be fulfilled. This is an edit request, not a feature request, and patrolling editors will not usually do your coding for you, especially if it is a complex job. Feel free to reopen this once there is some working code in Template:Infobox3cols/sandbox. — Mr. Stradivarius ♪ talk ♪ 03:47, 19 March 2014 (UTC)
- (Also, Redrose64, the next time I find you saying how difficult Lua is, I may jump on a plane to the UK and teach you how to program in it myself. :P) — Mr. Stradivarius ♪ talk ♪ 04:47, 19 March 2014 (UTC)
- Try
{{Infobox3cols/sandbox}}
with|child=yes
--Redrose64 (talk) 13:22, 19 March 2014 (UTC)- Are there some testcases? I think the biggest problem is going to be if someone tries to mix embedding of
{{Infobox3cols}}
with{{Infobox}}
. The question is can, for example, {{Infobox football biography}}} be embeded in {{Infobox person}} or the other way around? You may have to wedge it in as a separate table. Thanks! Plastikspork ―Œ(talk) 20:14, 19 March 2014 (UTC)
- Are there some testcases? I think the biggest problem is going to be if someone tries to mix embedding of
- Try
Hi again, lads. I copied the codes of {{Infobox football biography}}
and {{Infobox3cols}}
to separate pages in my userspace; I've been playing around with the template and I think I'm on to something (see the result here) but I'm having a problem with the width and the alignment of the football biography infobox when embedded. Maybe you guys can check it out and tweak it, maybe see if you can come up with something. Davykamanzi → talk • contribs • alter ego 19:47, 14 May 2014 (UTC)
Protected edit request on 2 June 2014: Include parameters for embedding
editThis edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
I'm basically making the same request again, but this time I've found a way of embedding Infobox3cols and {{Infobox football biography}} to {{Infobox person}}. See my testcase here. Davykamanzi → talk • contribs • alter ego 08:44, 2 June 2014 (UTC)
- See also Template talk:Infobox football biography#Embedding to .7B.7BInfobox person.7D.7D. --Redrose64 (talk) 12:04, 2 June 2014 (UTC)
- Seems like we are overthinking it. I think it would be better to use have the child option simply remove the border, rather than trying to line up the labels. For example, what happens when you use
|subbox=yes
with {{Infobox}}. That option was added to allow mixing of sidebars and infoboxes, which is a similar situation, since sidebars have one column and infoboxes have two. Thanks! Plastikspork ―Œ(talk) 04:29, 3 June 2014 (UTC)- The child option doesn't work on its own. All it does is enable the template to be put into another one without actually embedding itself into it so it looks smaller; and removing the border won't have any effect except, well, no border. The subbox option wouldn't work because {{Infobox}} and {{Infobox3cols}} are essentially the same template, except Infobox uses one column while Infobox3cols uses 3 columns. Using the subbox option would either excessively widen the Infobox template or turn it into one column of the three in Infobox3cols. Apparently the solution I've come up with seems to be the only one available. Davykamanzi → talk • contribs • alter ego 18:55, 3 June 2014 (UTC)
- I agree that subbox is the way to go. not sure why you don't think it would work. Frietjes (talk) 19:16, 3 June 2014 (UTC)
- for example, this version seems to work. Frietjes (talk) 19:39, 3 June 2014 (UTC)
- Yeah it does work. Must've gotten it wrong the last time. I tweaked it a bit though cause the bg colours of the headers were clashing with the person template. Davykamanzi → talk • contribs • alter ego 16:50, 4 June 2014 (UTC)
- I think the sandbox version of {{Infobox football biography}} is the way to go now. Davykamanzi → talk • contribs • alter ego 17:01, 4 June 2014 (UTC)
- The child option doesn't work on its own. All it does is enable the template to be put into another one without actually embedding itself into it so it looks smaller; and removing the border won't have any effect except, well, no border. The subbox option wouldn't work because {{Infobox}} and {{Infobox3cols}} are essentially the same template, except Infobox uses one column while Infobox3cols uses 3 columns. Using the subbox option would either excessively widen the Infobox template or turn it into one column of the three in Infobox3cols. Apparently the solution I've come up with seems to be the only one available. Davykamanzi → talk • contribs • alter ego 18:55, 3 June 2014 (UTC)
Big problem
editI am here to oppose these changes to {{Infobox football biography}} purely on the basis that WT:FOOTBALL was not notified about the discussion and we have not been informed about how the changes will impact on our articles. Please explain what change you are making and why. GiantSnowman 18:40, 18 June 2014 (UTC)
- @GiantSnowman: The changes to {{Infobox football biography}} are supposed to allow the template to be embedded to {{Infobox person}}, for the sake of players such as Pelé and Michel Platini, who've gone on to lead prominent careers in other areas other than football. For example, Platini is the current president of UEFA, and I think that should be shown in the infobox as well because that's a prominent post he has in the organisation. I think the changes should stand until a decision is taken on whether or not they should stay. Davykamanzi → talk • contribs • alter ego 18:48, 18 June 2014 (UTC)
- No, that's not how consensus works on Wikipedia - the status quo (i.e. the template as it previously was) remains until there is consensus to change it. Again, please summarise the changes for us. GiantSnowman 18:54, 18 June 2014 (UTC)
- @GiantSnowman: As you wish, but I think I've explained the changes quite clearly already. Davykamanzi → talk • contribs • alter ego 18:58, 18 June 2014 (UTC)
- No, you haven't. Basically you want to imbed one infobox into another...why? Platini's clear main claim to fame is as a footballer, what extra information about his UEFA presidency is required in an infobox? I would say none. GiantSnowman 19:06, 18 June 2014 (UTC)
- @GiantSnowman: Being President of UEFA is a position of prominence in the football community. The extra info in the infobox would be his term, his predecessor (and successor once his term expires) and the fact that he's the 6th President of UEFA. How will the changes impact the articles you ask? Hardly! {{Infobox person}} isn't affected at all since embedding uses the module parameter, and all that happens to {{Infobox football biography}} is that the header colours change to match Infobox person when embedded. Nothing else. Davykamanzi → talk • contribs • alter ego 12:51, 19 June 2014 (UTC)
- FYI your pings aren't working for some reason, and there's no need to bother anyway. Fair enough, let's see if anyone from WT:FOOTBALL has anything to say, if not feel free to add back the changes in, say, a week? GiantSnowman 12:56, 19 June 2014 (UTC)
- @GiantSnowman: Agreed. Davykamanzi → talk • contribs • alter ego 00:14, 21 June 2014 (UTC)
- FYI your pings aren't working for some reason, and there's no need to bother anyway. Fair enough, let's see if anyone from WT:FOOTBALL has anything to say, if not feel free to add back the changes in, say, a week? GiantSnowman 12:56, 19 June 2014 (UTC)
- @GiantSnowman: Being President of UEFA is a position of prominence in the football community. The extra info in the infobox would be his term, his predecessor (and successor once his term expires) and the fact that he's the 6th President of UEFA. How will the changes impact the articles you ask? Hardly! {{Infobox person}} isn't affected at all since embedding uses the module parameter, and all that happens to {{Infobox football biography}} is that the header colours change to match Infobox person when embedded. Nothing else. Davykamanzi → talk • contribs • alter ego 12:51, 19 June 2014 (UTC)
- No, you haven't. Basically you want to imbed one infobox into another...why? Platini's clear main claim to fame is as a footballer, what extra information about his UEFA presidency is required in an infobox? I would say none. GiantSnowman 19:06, 18 June 2014 (UTC)
- @GiantSnowman: As you wish, but I think I've explained the changes quite clearly already. Davykamanzi → talk • contribs • alter ego 18:58, 18 June 2014 (UTC)
- No, that's not how consensus works on Wikipedia - the status quo (i.e. the template as it previously was) remains until there is consensus to change it. Again, please summarise the changes for us. GiantSnowman 18:54, 18 June 2014 (UTC)
Lua version
editI created a lua version, starting from module:infobox to create module:infobox3cols. I have performed some preliminary tests on the testcases page, and have tested converting {{infobox football biography}}. so far everything seems to be working. one of the more odd undocumented features is the 'hookX' parameters. I added some tracking to see if these are in use anywhere. the other odd feature is that this template starts the label/data numbering at 0 rather than 1. feel free to add other test to the testcase page if you think of something important that's not being tested. thank you. Frietjes (talk) 18:07, 24 June 2015 (UTC)
- I removed the hook parameter and added tracking for the label0, data0, ... Frietjes (talk) 14:51, 25 June 2015 (UTC)
Template-protected edit request on 16 July 2022
editThis edit request to Module:Infobox3cols has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
On line 90, please change the h
to l
in [rowArgs.num .. 'h']
. This is because 'h' is meant to designate a header row, not a label. On line 52 the header is signified with an 'h', and on line 65 the label style is signified with an 'l'. Currently, setting a specific label requires writing |headerstyles = 1h=...;
(it should be 1l
). SWinxy (talk) 19:55, 16 July 2022 (UTC)
- : how would this affect present usages, such as the one you mention,
|headerstyles = 1h=...;
? Perhaps editor Frietjes can help. P.I. Ellsworth , ed. put'r there 19:28, 17 July 2022 (UTC)- Correction: the module's parameter for other templates to set styles isn't
|headerstyles =
, but actually|extracellstyles =
. I did aninsource
search, and found that only {{Infobox football biography}} uses this parameter, and even that doesn't use theh
orl
suffixes. afaict, zero templates will be affected by this change. SWinxy (talk) 23:27, 17 July 2022 (UTC)- SWinxy, please make the changes to Module:Infobox3cols/sandbox and we can copy from there. Frietjes (talk) 14:50, 18 July 2022 (UTC)
- Made the change, and you can see the difference in the testcases. SWinxy (talk) 19:38, 18 July 2022 (UTC)
- Excellent, and done. P.I. Ellsworth , ed. put'r there 16:05, 19 July 2022 (UTC)
- Awesome! Thanks. I had checked the testcases on my phone probably minutes after you changed the module, without realizing it had been changed. I began to panic thinking that the issue wasn't present on mobile. But no! It was merely fixed! SWinxy (talk) 16:32, 19 July 2022 (UTC)
- my pleasure! Paine 20:12, 19 July 2022 (UTC)
- Awesome! Thanks. I had checked the testcases on my phone probably minutes after you changed the module, without realizing it had been changed. I began to panic thinking that the issue wasn't present on mobile. But no! It was merely fixed! SWinxy (talk) 16:32, 19 July 2022 (UTC)
- Excellent, and done. P.I. Ellsworth , ed. put'r there 16:05, 19 July 2022 (UTC)
- Made the change, and you can see the difference in the testcases. SWinxy (talk) 19:38, 18 July 2022 (UTC)
- SWinxy, please make the changes to Module:Infobox3cols/sandbox and we can copy from there. Frietjes (talk) 14:50, 18 July 2022 (UTC)
- Correction: the module's parameter for other templates to set styles isn't
No output
editIn the examples on the documentation page, is it intentional that example 6 has no output? — Martin (MSGJ · talk) 14:35, 18 October 2022 (UTC)
- Specifically I'm wondering if line 80 of the code should read
elseif rowArgs.dataa or rowArgs.datab or rowArgs.datac then
— Martin (MSGJ · talk) 14:44, 18 October 2022 (UTC)- @Frietjes: would you comment please? — Martin (MSGJ · talk) 10:01, 19 October 2022 (UTC)
- MSGJ, the examples on the doc page were created when I was converting the non-LUA version of the template to the new LUA version. I noticed that logic was in the old version, and ported it over to the new template. we can change the logic, but we probably want to check to make sure there won't be any surprises. Frietjes (talk) 15:25, 19 October 2022 (UTC)
- Yep, that was why I was posting here. The current behaviour is not very intuitive, and was causing issues at Template:Infobox football biography — Martin (MSGJ · talk) 15:29, 19 October 2022 (UTC)
- MSGJ, if I recall, the total_caps and total_goals parameters are a more recent addition to Template:Infobox football biography, and the reason for the logic was to prevent caps/goals from showing without a team for the other rows. Frietjes (talk) 16:07, 19 October 2022 (UTC)
- Yep, that was why I was posting here. The current behaviour is not very intuitive, and was causing issues at Template:Infobox football biography — Martin (MSGJ · talk) 15:29, 19 October 2022 (UTC)
- MSGJ, the examples on the doc page were created when I was converting the non-LUA version of the template to the new LUA version. I noticed that logic was in the old version, and ported it over to the new template. we can change the logic, but we probably want to check to make sure there won't be any surprises. Frietjes (talk) 15:25, 19 October 2022 (UTC)
I've put code on Module:Infobox3cols/sandbox to fix this issue, which would be better than using hacks in other templates. Would you mind checking it? — Martin (MSGJ · talk) 14:14, 20 October 2022 (UTC)
- MSGJ, looks good to me, so now implemented. from my testing, it looks like {{infobox football biography}} is using a different mechanism to make sure that there are no caps or goals without a team, so that template shouldn't be impacted. I have also added some temporary tracking to find any pages which may have output changes so we can address those if there is a problem. of course, if anything goes horribly wrong, someone should just revert these changes so we can find/fix major problems. thank you for fixing this. Frietjes (talk) 16:21, 20 October 2022 (UTC)