Forum:Need help updating a template

Hi there,

I'm coming from the Regnum Online Wiki here to ask if perhaps someone could help me with merging an old template with a new one. The old template is this one and it's the one we are currently using in our tables, and the new one is here.

The latter has more options and although we are still going to go through the information for every quest again, it would save a lot of time and effort if we could update the first template to look like the second, even though there are some new parameters there. I've tried to play around with it a bit myself, but in design they are two different types of templates and I can't seem to find a solution that wouldn't require me having to rewrite every single quest box.

Any help would be greatly appreciated. - Edge 09:32, May 18, 2011 (UTC)

Additional Info:
 * Example of the first template
 * Example of the second template
 * An example of a table based off of data from the first template, that should still be functioning if/when the template is updated
 * Your example does not use the template you want to replace.
 * What you can do is replace on the old template page its code with a call of your other template, and then, where appropiate, give as parameters the old parameter definitions, ie .--AB 10:17, May 18, 2011 (UTC)


 * edit conflict


 * Wow, tough one, considering that the summary tables are deriving data AND formatting from both the templates AND particular pages. I couldn't find an easy way to do it, since there are just too many dependencies among templates/tables/articles. The only way to do what you want is the long and hard way, from what I've been able to tell looking at the structure - the upside is that it would make future maintenance way easier.


 * The first template is using 'tasks' 'items' 'givenby' 'story' and 'notes' parameters, which are not supported by the second template. So the first step, if I were you, would be to add support for these parameters to the new template and then copy-paste the code and replace the first one. Then just run through some articles that use the template and see if bugs show up and fix them.


 * Afterwards, I would ensure consistency among articles that use the template and generate DPL summary tables (the dpl extension is installed on your wiki), replacing the current tables that transclude every page on the list (such solution will eventually lead to really long loading times).


 * I know you're not looking for an overhaul for the wiki, but with the structure you're currently using, it's going to be hard for you to implement the change. — Sovq 10:41, May 18, 2011 (UTC)


 * Actually this is part of a small overhaul, the Wiki was abandoned and left without an admin for quite some time, and over the course of my time there I've been trying my best to clean it up and make it more accessible. This is exactly why I decided to update the template in the first place. It's going to be rough though because there are nearly 700 pages (quests) using the template. What's more is that the quest tables are one of our Wiki's main features, without a doubt the most visited pages.


 * Also, when I add the parameters for Story, Tasks, and Notes, I run into a problem with the resulting product. If you try to edit the sections for Story, Tasks, or Notes it takes you to editing page for the template itself.  Edge 11:09, May 18, 2011 (UTC)