How Do I Add Templates To MediaWiki?
August 11th 2009
So my friend has started up a MediaWiki (installed it, etc.), and made me an Administrator on the site. One of the problems I’ve had is that there are some templates off other Wikis (i.e. Wikipedia) that I’d like to add for our site, but whenever I copy the code over, it doesn’t work. Is there a way to be able to do this and, if so, how?







August 13th, 2009 at 6:03 am
Perhaps, you need more patience when copying them over wikis.
I’ve tried importing a template from several language-editions of Wikipedia. I usually copy the source code and notice red links. Those red links tells you what templates are still missing and those templates tends to depend on other templates.
Let’s say, if you see Template:Example as a red link at your wiki, please copy the source code of Template:Example from where you got it. If you copied the source code of Template:Example to your wiki and see a broken link to Template:Example2, Template:Example3 and others, go copy them also.
Only after copying the last independent template (which may contain server variables that I assume to be enabled at your wiki, marked by three opening and closing braces surrounding the variable name, e. g. {{{CURRENTYEAR}}}) you will succeed in copying the template you need.
It may be tiresome for the first time, but after you understand it, you can build your own templates.
And don’t forget crediting Wikipedia’s contributors for the work on the templates!
August 14th, 2009 at 4:41 pm
You need to install certain extensions to make Wikipedia templates work, particularly Extension:ParserFunctions. Take a look at Special:Version on Wikipedia for a complete list of the installed extensions. It may also help to bring the MediaWiki:Monobook.css and MediaWiki:Common.css up to date or at least the same as the Wikipedia versions.