How to install template infobox in mediawiki

From ETCwiki
Revision as of 02:49, 14 July 2015 by Ddxfish (talk | contribs)
Jump to navigationJump to search


THIS GUIDE IS TOTALLY NON FUNCTIONAL FOR NEW MEDIAWIKI VERSIONS! JUST DONT USE IT!

THIS GUIDE IS TOTALLY NON FUNCTIONAL FOR NEW MEDIAWIKI VERSIONS! JUST DONT USE IT!

This is a guide intended for the beginner user of Mediawiki to enable the use of templates on your site without having to 'transclude' it from wikipedia. This guide walks you through the installation of the Infobox template seen on many wikipedia pages, as well as the front page of Etcwiki. The links are to Wikipedia and ETCwiki for the source of the templates needed to be copied. The guide is meant to be simple (as simple as this can be), so keep it that way for user friendliness please.

Note: All of this tested on Mediawiki 1.14 at etcwiki.org

Requirements

Parser Functions

Extension: Parser Functions download page

Extension: Parser Functions Help

You must have this extension installed in order to use the templates in this guide. Get the SVN snapshot if possible. To install it, just uncompress and copy the files into your /extensions/ directory in your wiki, and edit Localsettings.php to include the following line:

require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );

Make sure the location you are linking to actually has the file, properly named, or your site will not load


Common.css

Mediawiki:Common.css - view source

You need to create a new page in your wiki with the code from Common.css in it (linked above). To make the new page, search for Mediawiki:Common.css then create the page, and paste the code from the link above into it.

This CSS code allows for proper formatting of Infobox borders, text, etc. Templates will function without this, it is mostly cosmetic changes, but etcwiki strongly recommends.





Install Template:Infobox

Creating Templates on your site In order to install/add a Mediawiki template on your site, search for the template and create a new page from there. Search your wiki for:

   Template:Infobox 
or Template:Intricate template

When the search results show up, select 'create this page' option and enter the code/text for your template (found below in the view source links for each template). Most templates do NOT_use_under_scores


Infobox Required Templates

Create a template page for EACH of the links below. The name of each template is on the left hand side, and the code for the template is linked to by the 'view source' link. Make sure you get all of the templates, or else Template:Infobox will not work. After you create a template, re-edit it and below the code, each of the required templates (dependencies) will be listed.

These are the first level of templates you need for Template:Infobox

   * Template:! view source
   * Template:Clear view source
   * Template:Documentation view source
   * Template:Documentation subpage view source
   * Template:Documentation/docname view source
   * Template:Infobox view source (you may already have this)
   * Template:Infobox/doc (edit)
   * Template:Intricate template view source - Really Important*
   * Template:Navbar view source
   * Template:Nowrap view source
   * Template:Ombox view source
   * Template:Ombox/core view source
   * Template:Pp-meta view source
   * Template:Pp-template view source
   * Template:Purge view source
   * Template:Tl view source (this is TL, I had trouble telling the L in lowercase)
   * Template:Tnavbar view source
   * Template:Transclude view source

You will also need to copy these templates to make the ones above work

   * Template:Infobox/row view source
   * Template:Tiw view source
   * Template:Tlf view source
   * Template:Tls view source
   * Template:Tlsp view source
   * Template:Tlp view source
   * Template:Tn view source
   * Template:Tlx view source
   * Template:Mbox Templates view source
   * Template:Mbox templates/doc view source
   * Template:Navbox view source
   * Template:- view source
   * Template:· view source
   * Template:Tnull view source
   * Template:Shortcut view source
   * Template:High-risk view source
   * Template:Main view source
   * Template:Namespace detect view source
   * Template:Clr view source


Extra templates that may help if you have problems

   * Template:Cleanup view source
   * Template:Ambox view source
   * Template:Ambox/core view source

Test Your Infobox

Make a new page, and name it infoboxtest and post the following code into it:

{{Infobox
|title        = ETCwiki.org Infobox
|image        = [[Image:example.png|200px]]
|header1 = Main Heading
|header2 = First set of data
|label2  = Label
|data2   = Data
|header3 = Remove this line (optional)
|label3  = More Label
|data3   = More data
}}

Save this code and test on a regular page, there are many more options found here:


Extra help

External Resources



{{#ifeq:|yes

|

{{#ifeq:{{#if:| {{{smallimage}}} | Category: Mediawiki
Mediawiki Homepage
}}|none | | }}

{{#if:{{#if: | {{{smallimageright}}} | }} | {{#ifeq:{{#if: | {{{smallimageright}}} | }}|none

 | 
|
 }}

}}

{{#switch:

| | speedy | delete | content | style | move | protection | notice =

| #default =

This message box is using an invalid "type=" parameter and needs fixing.

}}

|

{{#ifeq:Category: Mediawiki
Mediawiki Homepage
|none | | }}

{{#if: | {{#ifeq:|none

 | 
|
 }}

}}

{{#switch:

| | speedy | delete | content | style | move | protection | notice =

| #default =

This message box is using an invalid "type=" parameter and needs fixing.

}} }}