User blog:JoshuaJSlone/YearNav

Warning: This is one of my technical tangents rather than something dealing much with H!P.

Earlier this year I made Template:YearCategoryNav, with the purpose of being put on category pages beginning with years for linking to similar category pages for other years on either side. It did its job pretty well, but if you look at the code it's a pretty ugly thing. It was also limited in that it only worked for category pages, only if the year was at the beginning of the category name, and only for category names up to a certain word limit. I later made a modified version for Japanese H!P Wiki.

Since Lua became available as a new option for coding things in Wikia I'd considered making a newer and better version, but hadn't yet bothered. I then read that following months of successful testing Lua is available on all Wikia wikis, not just those where an admin requests it. This meant it would be pretty easy to add to other wikis, even ones without much activity or leadership--like some of the H!P Wikis of other languages. So I finally got around to making the new version. Now just called Template:YearNav, since it doesn't just work on category pages anymore. The year doesn't have to be at the beginning of the page--it just needs to find a 4 digit number somewhere. It's also easier to modify to give it a different visual look or change which years are linked to. I wrote some more about it at Wikia Developers Wikia.

I've since added it to the other H!P Wikis, except for the Spanish one which currently doesn't have any year-based categories. Being a very generic sort of thing, though, I'm sure this could come in handy on plenty of completely unrelated wikis, as long as they've got a lot of pages or categories about years that could use some interconnection.