Jump to content

Template talk:Infobox3cols

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Protected edit request on 1 March 2014: Include parameters for embedding

[edit]

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. Davykamanzitalk · contribs 16:28, 1 March 2014 (UTC)[reply]

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}} (tec) 16:59, 1 March 2014 (UTC)[reply]
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)[reply]
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}} (tec) 19:02, 3 March 2014 (UTC)[reply]
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)[reply]
Let me play with the sandbox... I have a few ideas to allow this with {{Infobox}} and kill this 3cols version. — {{U|Technical 13}} (tec) 03:54, 4 March 2014 (UTC)[reply]
Try {{Infobox3cols/sandbox}} with |child=yes --Redrose64 (talk) 13:22, 19 March 2014 (UTC)[reply]
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)[reply]

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. Davykamanzitalkcontribsalter ego 19:47, 14 May 2014 (UTC)[reply]

Protected edit request on 2 June 2014: Include parameters for embedding

[edit]

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. Davykamanzitalkcontribsalter ego 08:44, 2 June 2014 (UTC)[reply]

See also Template talk:Infobox football biography#Embedding to .7B.7BInfobox person.7D.7D. --Redrose64 (talk) 12:04, 2 June 2014 (UTC)[reply]
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)[reply]
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. Davykamanzitalkcontribsalter ego 18:55, 3 June 2014 (UTC)[reply]
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)[reply]
for example, this version seems to work. Frietjes (talk) 19:39, 3 June 2014 (UTC)[reply]
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. Davykamanzitalkcontribsalter ego 16:50, 4 June 2014 (UTC)[reply]
I think the sandbox version of {{Infobox football biography}} is the way to go now. Davykamanzitalkcontribsalter ego 17:01, 4 June 2014 (UTC)[reply]

Big problem

[edit]

I 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)[reply]

@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. Davykamanzitalkcontribsalter ego 18:48, 18 June 2014 (UTC)[reply]
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)[reply]
@GiantSnowman: As you wish, but I think I've explained the changes quite clearly already. Davykamanzitalkcontribsalter ego 18:58, 18 June 2014 (UTC)[reply]
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)[reply]
@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. Davykamanzitalkcontribsalter ego 12:51, 19 June 2014 (UTC)[reply]
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)[reply]
@GiantSnowman: Agreed. Davykamanzitalkcontribsalter ego 00:14, 21 June 2014 (UTC)[reply]

Lua version

[edit]

I 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)[reply]

I removed the hook parameter and added tracking for the label0, data0, ... Frietjes (talk) 14:51, 25 June 2015 (UTC)[reply]

Template-protected edit request on 16 July 2022

[edit]

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)[reply]

Question?: 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)[reply]
Correction: the module's parameter for other templates to set styles isn't |headerstyles =, but actually |extracellstyles = . I did an insource search, and found that only {{Infobox football biography}} uses this parameter, and even that doesn't use the h or l suffixes. afaict, zero templates will be affected by this change. SWinxy (talk) 23:27, 17 July 2022 (UTC)[reply]
SWinxy, please make the changes to Module:Infobox3cols/sandbox and we can copy from there. Frietjes (talk) 14:50, 18 July 2022 (UTC)[reply]
Made the change, and you can see the difference in the testcases. SWinxy (talk) 19:38, 18 July 2022 (UTC)[reply]
Excellent, and  done. P.I. Ellsworth , ed. put'r there 16:05, 19 July 2022 (UTC)[reply]
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)[reply]
my pleasure! Paine  20:12, 19 July 2022 (UTC)[reply]

No output

[edit]

In the examples on the documentation page, is it intentional that example 6 has no output? — Martin (MSGJ · talk) 14:35, 18 October 2022 (UTC)[reply]

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)[reply]
@Frietjes: would you comment please? — Martin (MSGJ · talk) 10:01, 19 October 2022 (UTC)[reply]
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)[reply]
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)[reply]
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)[reply]

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)[reply]

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)[reply]