Template talk:VideoGallery

Lift Thumbnail Limit
Back when we're implementing this template, we decided to limit the number of thumbnails to 3 because of the crappy Flash plugin that caused slowdowns in pages with various videos (like Xenoblade Chronicles). From a quick look, a huge part of our wiki have video links hosted on YouTube and currently it uses an HTML5 player by default in major browsers (Chrome, Safari, Firefox, the new Microsoft Edge). Said that, I think we should remove the thumbnail limit (especially now that it's becoming common random users reordering the list of videos when adding new content). Thoughts? Jhonn (talk)

I'm OK with lifting it or minimally increasing the limit. We should test out some of the more densely populated pages first. Super Smash Bros. Brawl has 12 separate videos and I'd want to be sure there doesn't need to be some limit still. Kolano (talk) 07:02, 12 September 2015 (CEST)


 * I'll try to find a way to measure the impact this change could take then report back. Do we have more dense pages? Right now I remember only of Xenoblade Chronicles and now that you mentioned, Super Smash Bros. Brawl - Jhonn (talk)

I would like to keep the limit, honestly. There's more than just the limit at stake, but also page composition. Endless rows of videos is just tacky! If the limit should be changed, it should just be increased to 6. - MaJoR (talk) 11:14, 13 September 2015 (CEST)

I think the other goal here was to prevent edits from folks who think the order of videos makes a difference regarding which are displayed. If we maintain the limit, we should probably add a comment along with the template that more clearly explains videos are chosen at random and order does not matter. We probably should also universally add the empty template across pages, so the mechanism for adding videos is more clear (i.e. currently the template only appears where there are videos populated). Kolano (talk) 19:43, 13 September 2015 (CEST)

Square Bracket Handling
YouTube videos seem to be prone to use square brackets in their titles. These seem to cause breakages when used in the captions here. We either need to account for that internally, or document how to escape them. Pipes similarly need a documented escape. Kolano (talk) 20:15, 22 January 2016 (CET)
 * Sounds critical, could you share an example? I would like to apply at least a "band-aid" here until I can finish the RFC of the video templates... - Jhonn (talk) 02:33, 23 January 2016 (CET)


 * There's something weird going on with in the middle of a link. The YouTube template does some funky stuff and calls a mouseover template from within a [ ] link, and that template sets a span title. If the span title contains a closing bracket ] then it freaks out and actually parses the bracket into html for some reason as an , then the weird glitchy links happen after that. I have it working and fully functional in the sandbox, the only problem is that the tiny blue link square in the bottom right of the YouTube embed is either missing or cut off. I was mostly shuffling things around so it must do with ordering (which caused the problem to begin with). You could probably also do this fix by using Template:Hover over the whole link, but I don't think that would be any better honestly. - Xerxes (talk) 16:46, 15 July 2017 (CEST)


 * Thanks for taking a stab at this. Something is still off with the parsing even in your revised template. The final square bracket seems to end up outside of the link...

 Xenoblade JP HD Gameplay 1A (Dolphin Emulator @ 720p ]


 * User:Lucario's nowiki tagging on live fixes that behavior. I only needed to port over the Template:YouTube tag though, the change to Template:VideoGallery is giving the same page source output as without it. I tried going crazy and throwing a million brackets at the sandbox and live versions, and it seems that in both, double open brackets Xerxes (talk) 01:52, 16 July 2017 (CEST)


 * To be honest, I would just remove the random thumbnail selection code since it's broken for ages and just do a loop calling the respective subtemplates to embed every video from the arguments, that would make the code cleaner and probably fix those strange issues. I hope I'm able to finish Video someday, but until that I think this will suffice... - Jhonn (talk) 20:16, 16 July 2017 (CEST)

Weird Links
Seem to continue to following sections. Seems the link tag is never closed.