Difference between revisions of "How to install template infobox in mediawiki"

From ETCwiki
Jump to navigationJump to search
m (Changed protection level for "How to install template infobox in mediawiki" ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite) [read=autoconfirmed] (indefinite) [raw=autoconfirmed] (indefinite) [viewsource=autoconfirmed] (indefinite))
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:MediaWiki Simple Guides]]
+
[[Category:Mediawiki]]
{{Infobox
+
 
|name        = Infobox Template
+
'''THIS GUIDE IS TOTALLY NON FUNCTIONAL FOR NEW MEDIAWIKI VERSIONS! JUST DONT USE IT!'''
|bodystyle    = float:right; valign:top;
+
 
|title        = Installing Template:Infobox
+
'''THIS GUIDE IS TOTALLY NON FUNCTIONAL FOR NEW MEDIAWIKI VERSIONS! JUST DONT USE IT!'''
|titlestyle  =
+
 
|image        = [[File:Installing-infobox-wiki-help.png]]
+
'''THIS GUIDE IS TOTALLY NON FUNCTIONAL FOR NEW MEDIAWIKI VERSIONS! JUST DONT USE IT!'''
|imagestyle  =
+
 
|caption      = Infobox Template Install Guide
+
'''THIS GUIDE IS TOTALLY NON FUNCTIONAL FOR NEW MEDIAWIKI VERSIONS! JUST DONT USE IT!'''
|captionstyle =
+
 
|headerstyle  = background:#ccf;
+
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.<br>
|labelstyle  = background:#ddf;
 
|datastyle    = text-align:right;
 
|header1 = Template Install Info
 
|label1  =
 
|data1  =
 
|header2 =
 
|label2  = creator:
 
|data2  = etcwiki.org
 
|header3 =
 
|label3  = What is this?:
 
|data3  = infobox template installation guide
 
|header4 =
 
|label4  = How difficult is this?
 
|data4  = moderate
 
|label5  = How long does this take?
 
|data5  = 60-90 minutes
 
}}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.<br>
 
  
 
Note: All of this tested on Mediawiki 1.14 at etcwiki.org
 
Note: All of this tested on Mediawiki 1.14 at etcwiki.org
Line 117: Line 100:
 
===Test Your Infobox===
 
===Test Your Infobox===
 
Make a new page, and name it infoboxtest and post the following code into it:
 
Make a new page, and name it infoboxtest and post the following code into it:
<pre>{{Infobox
+
<pre>
|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
 
}}
 
 
</pre>
 
</pre>
 
''Save this code and test on a regular page, there are many more options found here:''
 
''Save this code and test on a regular page, there are many more options found here:''
Line 140: Line 113:
 
*Mediawiki Template:Infobox - [http://en.wikipedia.org/wiki/Template:Infobox Template:Infobox Official]
 
*Mediawiki Template:Infobox - [http://en.wikipedia.org/wiki/Template:Infobox Template:Infobox Official]
 
*Etcwiki Infobox Frontpage - [http://www.etcwiki.org/ Infobox Example]
 
*Etcwiki Infobox Frontpage - [http://www.etcwiki.org/ Infobox Example]
 
{{mwbox}}
 

Latest revision as of 16:24, 25 July 2015


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 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:


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


Extra help

External Resources