Thread:XD1/@comment-961279-20160716025035

I have done some work in the past year or two with templates and switches to determine what links should be displayed on a page. I was thinking that it might be possible to do something like that for the front page of this wiki.

Basically, we'd have a template that contains the following:
 * premiere date for the movie
 * possibly the date the movie concluded its run in theaters
 * Name of the movie
 * file name of the video for its trailer

All of these fields would be separated by a special character such as ¶ that's not likely to be used in a movie name or page name. We'd read in the line for the movie, extract the date and do a comparison to the current date. Then it should be possible to figure out if it's close enough to be a "coming soon" movie or if it's in the theaters and display it in the right section. Have it cycle through each line until we get 12 or so spaces filed in each section. That way, we'd only have to update one template whenever the marquees at the theaters changes.

I know that there are extensions for MediaWiki that can add functions like FOR/NEXT loops and string manipulation, but I don't know if arrays are supported and that's the only way I can think of right now to build the correct number of entries. There has to be something a bit more dynamic than just resorting to using twelve hard-coded variables.

Have you done any work with MW extensions that might help with the kind of automation I'm thinking of? 