Template talk:External media

Tracking category for unknown parameters added
I have added a tracking category for unknown parameters, linked from the documentation. It appears that most of the errors stem from the erroneous presence of align in the documentation for some time. It should generally be replaced with float where it is found. – Jonesey95 (talk) 15:10, 4 October 2023 (UTC)

External media
Can the external video title be changed to external videos to reflect the inclusion of multiple videos. Thanks. Wingwatchers (talk) 23:01, 3 November 2023 (UTC)
 * ✅. – Jonesey95 (talk) 23:53, 3 November 2023 (UTC)

Use in tables
Hi, is there a way to center the template inside the cell of the table? It messes up the width of the columns and also is ugly. So far i've unsuccesfully tried adjusting the float parameter, using style="text-align: center; and many other things... Thanks in advance.


 * I experimented in the sandbox and was unsuccessful. The documentation appears to be incorrect: there is no such option in CSS as "float:center". The template creates a table with class=infobox, which fights hard against center alignment. Someone else may have an idea. – Jonesey95 (talk) 02:12, 24 December 2023 (UTC)


 * "center" is not a valid property value for either  or , and I have removed that bit from the documentation. In CSS, centering elements that is not text is done by setting the  . If you really want to do what you're trying to do without altering the source code of External media, then you should hack into   with a CSS injection (emphasis added):




 * Like so:


 * But... why would you even want to do this? Why not just use a standard external link within the table? Cheers, Manifestation (talk) 13:04, 24 December 2023 (UTC)
 * Thank you so much!!
 * I just started editing a few months ago and have little experience, specially in formatting stuff.
 * After experimenting a bit I think I prefer the template above the standard external link, see examples below: Gor1995 &#119070; 14:35, 24 December 2023 (UTC)


 * Option 1, standard link: column width gets bigger and also normal external link is a little ugly.


 * Option 2, template: The width is nicely adjusted and the template is more aesthetically pleasing, in my opinion.

Hmm... ok. I've made two edits to List of burial places of classical musicians: Solution 1, Solution 2. Solution 1 uses External media. Solution 2 uses standard external links. Note that, in Solution 1, I changed the width of the pictures from 100px to 120px. The "External image" header is 106px long. By widening the pictures, the "External image" text is not broken in half, with the word "External" on one line and the word "image" on the other.

It's your page, Gor1995, so I leave it to you. 😉 It's your call. Cheers, Manifestation (talk) 16:04, 24 December 2023 (UTC)


 * Thank you so much, you've been very helpful! Gor1995 &#119070; 18:51, 24 December 2023 (UTC)
 * No problem! It still feels a bit weird though, a table inside a table. I don't mind, but it's possible that other Wikipedians will be against them and want them gone. I've seen Wikipedians bicker over the tiniest things, really.
 * Anyway, I think it would be a good idea to add a  parameter to External media. That way, we don't have to hack into it when it's used inside a table.
 * I can't edit the template, because I'm not an administrator or template editor. But you can submit an edit request by going to View source and hitting the button that says "Submit an edit request". Cheers, Manifestation (talk) 19:33, 24 December 2023 (UTC)
 * center is working now. It's not great programming practice, since float=center is not a real option, but I have worked around it using the hints above. – Jonesey95 (talk) 23:32, 24 December 2023 (UTC)
 * Ok thanks. It *is* odd though. Maybe we should change  back into  ? And turn   into an alias? - Manifestation (talk) 08:22, 25 December 2023 (UTC)
 * I would be fine with that. The discussions in the archives of this talk page seem mostly to be confused about align versus float. align seems to make more sense from a syntax perspective. Feel free to adjust the sandbox code. – Jonesey95 (talk) 14:00, 25 December 2023 (UTC)
 * How about this?
 * and  do the same thing, except for  . It would be nonsensical to have a , because it's impossible for an element not to be aligned.
 * This took me two attempts, because I initially used . I looked up the MediaWiki documentation at mw:Help:Extension:ParserFunctions. But as it turns out, these functions are not enabled on Wikipedia, something which the documentation unhelpfully does not point out.
 * Anyway, do you think this will work? Manifestation (talk) 11:07, 26 December 2023 (UTC)

Proposal
Template:External media/sandbox

Template:External media/testcases

What do you think?

I do believe it's better to have an  parameter instead of , because for the casual Wikipedian who knows nothing about HTML, the word "align" sounds more logical and familiar than the word "float".

I think we have two options here. 1) Alter all transclusions of External media that have, and change that to  ; 2) Turn   and   into aliases, except for  , because it's impossible for something not to be aligned. In /sandbox, I've done the latter. Cheers, Manifestation (talk) 19:13, 5 January 2024 (UTC)