I have noticed that a lot of mediawiki-based websites use such templates as Robelbox, Ambox etc. Where can I get them and how should they be installed?
相关问题
- Google Test - generate values for template class i
- Template Specialization for Private Types
- zero length variadic expansion of ill-formed call
- Move product meta to the description tab in WooCom
- Implicit type conversion in c++ template
相关文章
- C++ Template specialization to provide extra membe
- C++: How to use unnamed template parameters in cla
- Templates, Function Pointers and C++0x
- Detect if C++ lambda can be converted to function
- Why is using base class definitions in non-deduced
- Applying multiple tuples to the same function (i.e
- play2 framework my template is not seen. : package
- C++ template function for derived class with std::
It's a PITA and unfortunately (unlike extensions or media files) there is no repository of canned templates. Templates load other templates which load others in turn, etc.
Go to Wikipedia and copy the name of the template you're after, go to Special:Export and paste the name of the template in the big text box, e.g. Template:Infobox. Check "Include templates" and check "Include only the current revision, not the full history", (or the file will be too big). Click Export to dump a .xml file of the template. Then import this into the destination wiki.
After it has been imported open the template for editing, check the list below the edit box "Pages transcluded onto the current version of this page:". If there are any red links repeat the above steps for these templates as well. You might also need to copy styles in MediaWiki:Common.css page and Javascript in MediaWiki:Common.js before everything works. Finally edit the templates to customize for your wiki.
If it still doesn't work and you have messy pages of braces and if statements, then you need to install the ParserFunctions extension. If there is
{{#invoke: }}
in template code you'll also need to install the Scribunto extension.MediaWiki Help:Templates explains the process in more detail.
This task is a bit more involved than just exporting and importing.
A "simple" overview can be found here -> How to add Wikipedia templates to your own Mediawiki
You can directly copy templates from Wikipedia. A nice example is the Keypress template.