banner



How To Add Infobox Template Wiki

This tutorial outlines steps to import infoboxes used by English language Wikipedia.

Prerequisites [edit]

Before using this tutorial, you should familiarize yourself with the MediaWiki features it will be utilizing:

  • one thousand:Help:Export
  • m:Help:Import
  • Assist:Editing pages
  • Help:Templates
  • Manual:Using content from Wikipedia
  • Wikipedia infoboxes
  • Designing infoboxes

You must also have these extensions installed, set and working:

  • Extension:ParserFunctions
  • Extension:Scribunto
  • Extension:Wikibase
  • Extension:TemplateStyles

Training [edit]

CSS [edit]

Either manually create or Consign/Import the CSS from the source wiki; e.g., https://en.wikipedia.org/wiki/MediaWiki:Mutual.css.
(this is optional; importing may be necessary to properly display some templates).

Note: This is required for virtually infobox templates, including the base infobox template itself. Use Ctrl+F to help you search.

JS [edit]

Either manually create or Export/Import the JS from the source wiki; e.one thousand., https://en.wikipedia.org/wiki/MediaWiki:Common.js.
(this is optional; importing may be necessary for some template functionality).

Extensions [edit]

required

  • Extension:ParserFunctions
  • Extension:Scribunto
  • Extension:Wikibase since ver. 1.31 (otherwise the error occurs: Lua fault in Module:WikidataIB at line 719: endeavor to alphabetize field 'wikibase' (a cipher value))
  • Extension:TemplateStyles

recommended

  • Extension:InputBox
  • Extension:TemplateData
  • Extension:JsonConfig#Supporting_Wikimedia_templates - Some templates need this.

Commons Templates [edit]

if copying templates from commons, either Special:Consign/Special:Import these pages or create them manually in your local wiki:

  • https://commons.wikimedia.org/wiki/MediaWiki:Lang
  • https://eatables.wikimedia.org/wiki/MediaWiki:Editsection-brackets

Steps [edit]

Step 1: Determine info boxes needed [edit]

Edit this page example.png
  • Find all infoboxes used on English Wikipedia at w:Category:Infobox templates
  • If there's an info box being used in an article you lot'd like to import:
    • Visit the page'southward edit screen
    • Scroll to the bottom and find the appropriate page proper name for the infobox template you'd similar to import
MW-editpage-templates-summary.png

Step ii: Consign Wikipedia templates [edit]

WPen-export-templates-selected.png
  • Go to English Wikipedia's Special:Export page and enter the total page names of the infobox templates from step 1.
  • For your get-go infobox to piece of work, you'll also need to include the master infobox template, Template:Infobox
  • Exist sure to check the Include templates checkbox to include other necessary templates
  • Note that required templates may likewise include Scribunto modules in the module namespace
  • Most templates put their documentation in a subpage, so you may desire to include /medico subpage for each template you're importing
    • Example: for Template:Infobox you should also download Template:Infobox/doc

Step 3: Export Wikipedia Modules [edit]

Many of templates used in Wikipedia, peculiarly the collapsible navigation templates, utilize Scribunto. Without these modules installed, the templates will produce lua error messages. Please expand the listing beneath of modules required for inboxes that are needed.

The following is a listing of at to the lowest degree some modules that yous should export from English Wikipedia to an XML file. Just cut and paste this listing into the list of files to be exported:

  • w:Module:Citation
  • w:Module:Hatnote
  • w:Module:Unsubst
  • w:Module:Sidebar
  • due west:Module:Message_box
  • w:Module:Navbox
  • west:Module:Arguments
  • w:Module:Yesno
  • westward:Module:Authority_control
  • westward:Module:Infobox
  • w:Module:Navbar
  • w:Module:InfoboxImage
  • westward:Module:Check_for_unknown_parameters
  • w:Module:If_empty

Step 4: Import infobox templates and Modules [edit]

MediaWiki page importing from XML.png
  • Get to your wiki'south Special:Import page and select the file y'all created from the export in pace 2.
  • The modules you lot exported in step iii volition Not import correctly unless yous first have successfully installed Scribunto, which will create the namespace for "modules." Later Scribunto is installed, the modules should import properly. Afterward, if yous see templates that give a lua fault bulletin, try to identify the missing module that must exist imported.
  • Since many templates incorporate images, it is helpful to change LocalSettings.php to permit instant commons import of images:
                                    $wgUseInstantCommons                =                true                ;              

Footstep 5: De-Wikipediaify [edit]

  • You may desire to review all of the files that y'all just imported for references to Wikipedia pages.
  • You can certainly leave them in place - and are encouraged to update them as links to the appropriate Wikipedia article (possibly using interwiki links)
  • Pay special attention to categories, which may exist buried in the template's lawmaking, and may include reference to Wikipedia
    • Again, you can get out them, but you may wish to update them to your wiki's proper name or categorization policy

Step 6: Additional templates needed [edit]

MW-editpage-templates-summary-redlinks.png
  • Once your import is complete, yous should check the template on your wiki to encounter if it functions correctly
  • A helpful step is to once more refer to the edit folio's templates list
    • If in that location are redlinks, go back to step ii and repeat this process to import the missing templates

Pace vii: Savor success [edit]

That's information technology! Savor your infoboxes!

See also [edit]

  • Manual:Importing XML dumps
  • Setting upward Infobox templates in MediaWiki

How To Add Infobox Template Wiki,

Source: https://www.mediawiki.org/wiki/Manual:Importing_Wikipedia_infoboxes_tutorial

Posted by: cruzsqualoodding1939.blogspot.com

0 Response to "How To Add Infobox Template Wiki"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel