Template talk:VideoGallery

Random Videos
Issues remain with this template only generating random videos per page edit, rather than per page load, seemingly related to caching. We may want to look into what sorts of cache-control may be possible. Otherwise this likely requires implementing some alternate script based handling for the video selection / rotation. Kolano (talk) 03:37, 27 September 2017 (CEST)


 * I understand page caching a lot better now than I did. MediaWiki has really good documentation about everything, it turns out, it just might be a bit buried where it's at. Pages are processed in a job queue wherein any pages using templates/images/etc that were edited, or any categories that need to be updated, are added to a big stack and processed one at a time. The default setting is per 1 page load from a visitor to the site, 1 task on the top of the job queue is processed, but this can be changed in server configuration. Pages are given an automatic "expiry" time when they're cached, so a page that's not edited and has no templates for example should still be added to the job queue occasionally, just on a more periodic basis. You can see this refresh date and a lot of other miscellaneous cache info like performance statistics by viewing the page source for different wiki pages in your browser. Basically as I see it, all game pages are already being added to the job queue at least once a day and reprocessed because of CurrentGitRevision. Even making all the site's templates faster/slower doesn't affect the job queue because the tasks are processed depending on page loads and don't actually continuously run in the background unless explicitly told to do so. Short of rewriting the template completely to not have random elements, there's nothing that can be done to fix this from the user side. That's why I held off on touching this at all. - Xerxes (talk) 10:33, 27 September 2017 (CEST)


 * Thanks for the further explanation around caching. And yeah, I'm not clear there is a lot we can do in the pure wiki. Admins can revise the site JavaScript and had thought some script running on a list of links could likely resolve this more cleanly. Though I think I'd forgotten about an aspect you brought up, in that the regular version updates force page refreshes. I wasn't clear that those sorts of refreshes updated the video order, if they do this is less of a concern; though preventing the user edit's trying to game the system (even if their "fixes" reset the next revision) would probably be for the best. Kolano (talk) 12:40, 27 September 2017 (CEST)


 * Some script could enable some other niceties, like rotating through all available videos over time, or querying video sources via search. Kolano (talk) 12:57, 27 September 2017 (CEST)

I don't know about the automatic rotation. If someone's interested by a thumbnail and goes to click, it shouldn't be able to change mid mouse movement, or if it does there should be a way to go back to the last set of thumbnails. Maybe it can use one of those systems that a lot of installers/websites use now where there's a simple automatic cycle through sets of 2 or 3 videos on a loop, with little bubbles on the bottom that you can mouse over to switch it between sets? If you don't know what I'm talking about, this site uses a really basic example on top of the home page. I think that look is common enough to people that it should be easy to understand how it works, it keeps them cycling so there's no "top" video, and it preserves the video order as it is on page edit. - Xerxes (talk) 10:40, 29 September 2017 (CEST)

Dropping a reminder here that some sort of wiki randomization will remain necessary even with a JavaScript randomizer. Without such video order will still matter to search engines, which we should try to avoid. Kolano (talk) 05:50, 23 February 2018 (CET)


 * Wouldn't that be a little overdoing? What kind of search engine are you referring to? Lucario (talk) 01:07, 7 February 2022 (CET)
 * If you haven't noticed already, the list hasn't been shuffled, only the featured videos for embedding are randomly selected from the list and then the remainders are in normal order. I tried to make the list shuffled but it's getting complicated and my effort went nowhere currently... Lucario (talk) 06:19, 8 February 2022 (CET)