Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Numinix MediaWiki Demo
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Help/Templates
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Copying from one wiki to another == <!--T:81--> </translate> <translate><!--T:418--> It is possible, if to transclude templates from other wikis.</translate> <translate><!--T:419--> This configuration setting is disabled on Wikimedia wikis.</translate> <translate><!--T:420--> Otherwise, you need to manually copy the template and its dependencies from the source wiki to the destination wiki to use it.</translate> <translate><!--T:82--> Templates often require [[<tvar name=1>Special:MyLanguage/Manual:Interface/Stylesheets</tvar>|CSS]] or other templates, so users frequently have trouble copying templates from one wiki to another.</translate> <translate><!--T:421--> The steps below should work for most templates.</translate> <translate> === MediaWiki code === <!--T:83--> <!--T:84--> If you have import rights (specifically <tvar name=1><code>importupload</code></tvar>) on the new wiki: </translate> # <translate><!--T:85--> Go to <tvar name=export>[[Special:Export]]</tvar> on the original wiki, and download an <tvar name=1>.xml</tvar> file with the complete history of all necessary templates, as follows:</translate> #* <translate><!--T:86--> Enter the name of the template in the big text box, e.g. "Template:Welcome". Pay special attention to capitalization and special characters β if the template name isn't exactly correct, the export may still occur but the .xml file will not have the expected data.</translate> #* <translate><!--T:87--> Select the box <tvar name=export><code></code></tvar>.</translate> #* <translate><!--T:88--> Select the box <tvar name=export2><code></code></tvar>.</translate> #* <translate><!--T:89--> Click <tvar name=1><code></code></tvar>.</translate> # <translate><!--T:90--> Go to [[Special:Import]] on the new wiki and upload the <tvar name=1>.xml</tvar> file.</translate> <translate> <!--T:91--> If you don't have import rights on the new wiki: </translate> # <translate><!--T:114--> Go to the template you want to copy from the original wiki. Go to the edit page, and copy all the wikitext</translate> # <translate><!--T:258--> On the new wiki, go to the page with the same name as the template you copied. Hit create/edit and paste the wikitext you copied. In the edit summary of each template, link to the original page for attribution.</translate> # <translate><!--T:259--> Back in the original wiki at the edit window, below the edit box, look at the list of <tvar name=1><code></code></tvar>.</translate> <translate><!--T:448--> For each template listed follow these instructions.</translate> <translate><!--T:449--> Also do that for any template used by any of these templates, and so on.</translate> <translate><!--T:115--> This will copy the entire code necessary, and will suffice for some templates.</translate> <translate><!--T:193--> Note that only page elements parsed in rendering the page get exported, consequently documentation subpages are not exported as part of this process.</translate> <translate><!--T:117--> If it doesn't work also check for red links listed under <tvar name=1><code></code></tvar>, below the edit box.</translate> <translate><!--T:450--> If there are any repeat the above steps for these as well and also copy the code in the modules.</translate> <translate> <!--T:118--> After successfully importing the template and all its linked templates from the other wiki, edit it to change customisations to suit your wiki. For example to change a logo, remove redundant categories or red links. === Extensions === <!--T:100--> </translate> <translate><!--T:101--> An extension often used in templates is ParserFunctions.</translate> <translate><!--T:164--> Visit page <tvar name=1></tvar> and check if any of the functions listed there are used in the templates you've copied.</translate> <translate><!--T:165--> If so, you have to install the <tvar name=1></tvar> extension.</translate> <translate><!--T:166--> To install it, you'll need system admin access to the server of your MediaWiki installation.</translate> <translate><!--T:102--> Another dependency that may be used in templates, especially those on Wikipedia, is [[w:Lua (programming language)|Lua]]. Having <tvar name=1><code><nowiki></nowiki></code></tvar> in template code is a good sign for it.</translate> <translate><!--T:167--> In case it's used, you need to install the <tvar name=1></tvar> extension and system admin access is required too.</translate> <translate><!--T:168--> See that page for more instructions about installing and using the extension.</translate> <translate> === CSS and JavaScript code === <!--T:103--> <!--T:104--> Besides MediaWiki code, many templates make use of CSS and some rely on JavaScript to work fully. If the copied templates are not behaving as expected, this may be the cause. To copy the required CSS and JavaScript to your wiki you'll normally need to have admin privileges, because you'll be editing system messages in the "MediaWiki:" namespace. </translate> # <translate><!--T:105--> Look for the use of CSS classes (text like <tvar name=1><code>class="foobar"</code></tvar>) in the template text.</translate> <translate><!--T:444--> If those classes appear in <tvar name=1><code>MediaWiki:Common.css</code></tvar> or <tvar name=2><code>MediaWiki:Vector.css</code></tvar> on the original wiki, copy those classes to <tvar name=1><code>MediaWiki:Common.css</code></tvar> on the new wiki and check if the template is now fine.</translate> # <translate><!--T:106--> If the copied template is still not working as expected, check if there is code in <tvar name=1><code>MediaWiki:Common.js</code></tvar> or <tvar name=2><code>MediaWiki:Vector.js</code></tvar> on the original wiki.</translate> <translate><!--T:445--> If so, you can try copying it to <tvar name=1><code>MediaWiki:Common.js</code></tvar> on the new wiki.</translate> <translate><!--T:446--> Normally, it is a good idea to only copy code from trusted sources, and browse the code to identify and select the relevant parts.</translate> <translate><!--T:447--> You may find comments that can serve as clues to identify the functionality of each part.</translate> <translate>
Summary:
Please note that all contributions to Numinix MediaWiki Demo may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)