Template talk:Video
From Wikipedia, the free encyclopedia
Contents |
[edit] CSS version
See Template talk:Listen#CSS version for an alternative HTML and CSS based layout (instead of tables). Please comment. — Omegatron 23:26, 26 February 2006 (UTC)
Proposed CSS version:
- Buzz Aldrin steps onto the Moon (file info)
- Problems viewing the video? See media help.
- Note: this style has been adopted. — Omegatron 23:53, 25 April 2006 (UTC)
[edit] Floating version
I've noticed that usage of this template looks a bit awkward when trying to introduce a video file amidst text, so I've created a floating version, template:video float. ~ Booya Bazooka 06:02, 24 December 2006 (UTC)
[edit] Image
I would like to add an Image parameter to this template. If passed said paramter would replace the movie reel icon with the supplied image. This way preview shots could be shown. -Ravedave 01:43, 11 July 2007 (UTC)
[edit] Help with parametrisation
I've taken parts of the Video template code and used it in Tamil people#Performing arts like below. If people think this layout would be useful, the below code can be parametrised and made into a template. Which parameters would you want? By the way, is there some template already for this purpose? -- Sundar \talk \contribs 02:39, 8 September 2007 (UTC)
[edit] position & format
Does there really need to be a title and a description? Images seem to be fine with only the description. Also do we want to add the ability to place the video in the center or left? -Ravedave 05:17, 16 September 2007 (UTC)
- Yes, there needs to be a title and a description. No, we do not want to add this ability, because it makes it more difficult to assure correct placement inside div-style boxes. Raul654 15:54, 16 September 2007 (UTC)
- Why does there need ot be a title and a description? Look at the usage, they are almost always the exact same thing. What is a div style box, and why don't we have an issue with that when placing images? -Ravedave 22:07, 16 September 2007 (UTC)
- If they are the exact same thing, the description can be left blank. The issue comes in when certain files need a long description. On top of that, since prior to last week's conversion to the mediawiki native player, the title was used to link to the image page (in order to meet the attribution is required by basically all free licenses), and the description could be used to create links to relevant pages. Raul654 00:25, 17 September 2007 (UTC)
- Now that we have the new format the title is useless, if it was useful we'd have it on images as well. What about the positioning? -Ravedave 02:55, 17 September 2007 (UTC)
- If they are the exact same thing, the description can be left blank. The issue comes in when certain files need a long description. On top of that, since prior to last week's conversion to the mediawiki native player, the title was used to link to the image page (in order to meet the attribution is required by basically all free licenses), and the description could be used to create links to relevant pages. Raul654 00:25, 17 September 2007 (UTC)
- Why does there need ot be a title and a description? Look at the usage, they are almost always the exact same thing. What is a div style box, and why don't we have an issue with that when placing images? -Ravedave 22:07, 16 September 2007 (UTC)
[edit] Parameter for reducing size
The default preview on pages is so much larger than thumbnail images and occupies too much screen real-estate. Is there a parameter to set that can make the image smaller ? Shyamal 12:17, 23 September 2007 (UTC)
- I would like to know this too. TJ Spyke 05:24, 2 November 2007 (UTC)
- With the newer mediawiki player, you can simply skip this template and treat videos just like normal images, using the image sizing options. e.g. [[Image:Sprucegoose.ogg|thumb]] --Davepape 15:00, 2 November 2007 (UTC)
[edit] bug in imagemap change
the change to the template to use an imagemap caused a bug to be reported in the template's use at Bruce Perens. the bug report caused the template to take most of the page width which was ugly. see Talk:Bruce Perens#Bug Report with Video. I saw it in a version of Firefox 2.0. Other editors noted the problem as well. Please fix the imagemap code before adding it back. Lentower 00:56, 3 October 2007 (UTC)
[edit] template:click
This template currently uses Template:Click, which is deprecated because it causes the page to break in screen readers for the disabled and some other browsers. (See Wikipedia:WikiProject Usability/Clickable images for more.) If anyone more familiar with this template sees a way to get the same result without click, please make the appropriate changes and improve the accessibility of the website. Thanks, BanyanTree 13:25, 6 October 2007 (UTC)
- Actually, taking a look at some examples, I think that we can do entirely without the click part, since clicking on the video's thumbnail sends you to the image page, and once the video is started, some pretty scripting gives a section with text links. I'll be bold and remove it, pending any worries. Nihiltres(t.l) 14:23, 25 October 2007 (UTC)
[edit] Rewritten video template
(Milo begins 04:26, 6 April 2008 posting here)
Template:Video Revision as of 18:06, 19:54, 30 March 2008 Thumperward (lose the padding override)
{{#if:{{{title|}}}| {{{!}} style="float: {{{float|right}}}; clear: {{{float|right}}};" ! colspan=2 style="text-align: center" {{!}} {{{title|}}} {{!}}- {{!}} colspan=2 {{!}} }}[[image:{{{filename|Image-request.png}}}|{{#if:{{{float|}}}|{{{float}}}{{!}}}}{{#if:{{{thumb|}}}|thumb{{!}}|frame{{!}}<div style="float:right"><imagemap>Image:Pictogram voting question.svg|18x18px|Wikipedia:Media help default [[Wikipedia:Media help]] desc none </imagemap></div>}}{{#if:{{{width|}}}|{{{width}}}{{!}}}}{{{description|This video file requires a descriptive caption.}}}{{#if:{{{format|}}}|<br />Format: {{{format}}}}}{{#if:{{{filesize|}}}|<br /> File size: {{{filesize}}}}}{{#if:{{{duration|}}}| • Duration: {{{duration}}}}}]] {{#if:{{{title|}}}| {{!}}} }}
(Copied from Wikipedia:Templates for deletion/Log/2008 March 21 #Rewritten video template)
...
I've fixed User:Thumperward/video so that the marquee is optional. This should now be a drop-in replacement for the existing template, with all options intact. Chris Cunningham (not at work) - talk 23:22, 25 March 2008 (UTC)
- There are still significant problems. I got "float=left" to work (and "float=center" sort of works), but I can't get the "width= " parameter to do anything, using numbers with or without "px".
- Despite your concerns about complex code at the base user level, you've written template code for the template coders level that is significantly more arcane than what was there previously. For example, previously it was obvious that three tics (''') made the marqee title bold. Now the source of boldface is a mystery.
- There are also new float problems. The marquee title is centered, but the frame under it has shifted to the right, making the title look left-shifted in articles. [...]; the image is not centered in the white background rectangle.
- It's not obvious that the obvious new float problems are worth whatever unobvious improvements you were seeking in the old float characteristics. What exactly did you gain, if anything, in float ability? Milo 06:11, 26 March 2008 (UTC)
-
- "float=center" doesn't work. I'm using CSS floats, which doesn't allow for this. I'll eventually special-case "float=center" to do the right thing. "Width" only works if "thumb" is present, because by default the video displays in a frame (which doesn't accept a width value). The left-shifting is a bug which can be discussed on the template talk. As for the relative complexity of the code, that's worthy of an {{esoteric}} tag, but it's not an argument to revert to an arguably more readable but demonstrably less flexible / functional version.
- The old template simply didn't float properly at all. If stacked with images, it usually ended up breaking out of the column it was floated in and invading the article body. Yes, this could be fixed piecemeal, but far better to have the template behave in a similar way to Wikipedia's other floated templates and have it stack in a predicable manner. Anyway, this is best discussed on the template talk. Chris Cunningham (not at work) - talk 17:05, 27 March 2008 (UTC)
-
-
- You've:
- (1) written new esoteric (i.e., hard-to-read) css Template:video code;
- (2) it faulty right-shifts the frame, making marquee titles look left-shifted;
- (3) you did all this so videos would float-stack with still images, even though videos of feature movies with marquees should not be trivialized by stacking them with still images, or, the occasional stacking problem with trivial videos (like mechanical animations that don't need marquee titles) could have been addressed by using the image tag instead of Template:Video, for which there are instructions at Wikipedia:Creation_and_usage_of_media_files#Video_usage.
- Cunningham/thumperward (17:05): "it's not an argument to revert to an arguably more readable but demonstrably less flexible / functional version."
- Demonstrably less functional? The new code is worse than the old code, both in readability and function. Even if the new code functioned correctly, there are no old problems that could not be solved with the old tools having greater readability (and flexibility with the raw image tag).
- The bottom line here is that like so many well-intended inventions, the new css code was too complex, didn't work well, and wasn't needed anyway. Therefore, to get the articles with video that I regularly edit working again, I'm reverting to the following previous code:
-
Template:Video Revision as of 18:06, 22 March 2008 Jack-A-Roe (add duration parameter)
{| align=right style="width:180px; background:transparent;" | <div style="float:{{{float|right}}};"><center>'''{{{title|Video}}}'''</center><div style="background-color:#f9f9f9; padding:3px; border: 1px solid #cccccc; min-width:180px;"> <center>[[Image:{{{filename|Image-request.png}}}]] </center> {| style="background:transparent;" | valign="top" style="width:100%; line-height: 1em; font-size:85%;"| {{{description|Video file}}} {{ #if: {{{format|}}} | • File format: {{{format}}} | }}{{ #if: {{{filesize|}}} | • File size: {{{filesize}}} | }}{{ #if: {{{duration|}}} | • Duration: {{{duration}}} | }}</span> | style="width:20px;" valign="top"|<imagemap>Image:Pictogram voting question.svg|18x18px|Wikipedia:Media help default [[Wikipedia:Media help]] desc none </imagemap> |}</div> </div> <br clear="left"/>
-
-
- This code needs float parameter work that may have been ok in a previous version (or changed function with the latest Mediawiki), but at least a lot more editors know how to code it for better function.
-
|
-
-
- Milo 04:26, 6 April 2008 (UTC)
-
-
-
-
- Rather than reverting, let's just go through the code and see whether we can fix the new version.
- The code's hardly less readable.
- The left-shifting should now be fixed. It was only marginal anyway.
- If it can stack properly, it should stack properly. End of story. If you don't want videos being "marginalised" by stacking, add a note to the documentation saying that stacking is discouraged. Preventing this by having a buggy template is unacceptable.
- If there are any further problems, let me know. Hoever, the template is seldom-enough used (even prior to the recent TfD) that it isn't difficult to chase up individual cases where it doesn't work and fix them. Chris Cunningham (not at work) - talk 11:25, 7 April 2008 (UTC)
- Rather than reverting, let's just go through the code and see whether we can fix the new version.
-
-
←Don't edit my posts without my permission - every posted item has a purpose. The posted code samples are for fast comparison use by code honchos and other busy editors, whom I will be calling in if you can't deliver and continue to make transparent excuses for defective code.
Cunningham/thumperward (11:25): "The code's hardly less readable"
You've already agreed that it's esoteric. I've already given one example of inability to read the source of boldface in the new code, which was obvious to read in the old code.
Cunningham/thumperward (11:25): "It was only marginal anyway"
On my screen, the white background frame is 11.5cmW and within it, the right-shifted video frame is 10.1cmW, 12+% difference. Over 6+% right-shift (half of 12+%) is not marginal, and quite incorrect when the centered marquee title overhangs the video frame at the left (see sample above). If the title exceeds the video frame width by 12+%, the white background frame expands and the percentage of the right-shift further increases, and looks yet worse.
Cunningham/thumperward (11:25): "..it should stack properly" ... "buggy template"
Since the video should appear by default at full file resolution width – for the increased viewing detail needed compared to a still image – this is not a bug, it's a feature of the video template. Furthermore, you knew there never was an "unstackable" problem in practice, because for trivial videos (like mechanical animations that can be shrunk without significant loss of viewable detail) this stacking layout issue is fixable by bypassing the old video template code and using the image tag directly with a thumb width parameter (which you did do in about 24 articles). I have no objection to adding an optional thumb width parameter to the old code, but if it can't be done, the old code with the documented image tag thumb width alternative is adequate.
Cunningham/thumperward (11:25): "The left-shifting should now be fixed"
The left-shifting of the centered title is an illusion resulting from the new code defect of right-shifting of the image in the white background frame. It's still there in IE6, as one can see from the template use sample above. (That's why I put the sample there.)
I'm tired of looking at the failed rendering of your defective new code in article space, and I'm beginning to suspect that you have bitten off a css development project that is beyond your ability to complete.
I'll give you a week to get your new code working as well as the old code does; if not then this defective code project must leave template/article space, until completion elsewhere, if ever. Milo 20:36, 7 April 2008 (UTC)
- Not that you're in any position to issue ultimatums, Milo (or, indeed, to be assessing other users' technical prowess), but the cost-benefit ratio of continuing to edit a template which I don't believe is necessary in the first place isn't that high to me. I've reverted to the old version. Have as you will. Chris Cunningham (not at work) - talk 20:45, 7 April 2008 (UTC)
-
- Thank you for your cooperation, and I commend you for it.
- Do note that I'm in the position of an experienced Wikipedian. I know the guiderules well, I'm flexible enough to understand when exceptions to them are in Wikipedia's best interest, and I'm skilled at asking for consensus either way. As for technical prowess, I'd say that you know programming that I don't know, and I know programming that you don't know, but we both know programming; hypothetically, I couldn't snow you any more than you could snow me. Milo 22:47, 7 April 2008 (UTC)
[edit] Next
Well, to whomever's next here: IIRC, the old code's left float used to work. Maybe it needs to be reverted back further, but hopefully re-add Jack-A-Roe's duration parameter. As a nicety, the default portrait placeholder image with the question mark should be replaced with a landscape version. Milo 22:47, 7 April 2008 (UTC)