FANDOM


Do you want to make fancy, complicated edits on the Lord of the Rings Mod wiki? Perhaps you want to simply make your signature look that much cooler. Or maybe your goal is to make a brand new template. On this page, you'll learn everything you'll need to do those things, and much more.

Before undertaking any of this, it's required to switch your editing mode from Visual Mode into Source Mode.

If you find the amount of content on this page overwhelming, try learning this page section by section. Learn the first few types of coding first, practice using them a bit, and then more on to more complex code. A great place to practice wiki coding is your user page.

For all special formatting, please follow this advice: Use it sparingly! Normally the wiki "knows", how to format things. That way, all pages look quite uniform, which is good for quick orientation of the reader. Using a lot of special formatting mostly makes pages ugly and illegible.

Basic CodingEdit

Bold, Italics, and UnderlineEdit

The most basic thing you can do with wiki code is to make your text bold, show it in italics, or underline it.

Bold TextEdit

Type your text in three apostrophes to make it bold.

'''Bold Text'''

produces Bold Text.

Italic TextEdit

Type your text in two apostrophes, and it'll be in italics.

''Italic Text''

produces Italic Text.

UnderlineEdit

Use the <u> and </u> tags to underline your text.

<u>Underlined Text</u>

produces Underlined Text.

LinksEdit

Internal linksEdit

To make a basic internal link, type the text you want to link in two [[square brackets]]. If the name of the article you want to link to is different from the text you've written, separate them using a vertical | line. The actual page name goes in front, the text you want displayed goes next.

[[Rohan|The Kingdom of Rohan]]

produces The Kingdom of Rohan.

If you want to link to a Category page, you can do it in a similar fashion, but in this case, you'll need to add a colon (:) before the "category" prefix.

[[:Category:Gondor|The Gondor Faction]]

produces The Gondor Faction.

The same holds for links to images (instead of showing the image itself):

[[:File:Edhelmir Ore.gif|No image shown here.]]

produces No image shown here.


To add articles to a category, you can type the following at the bottom of a page:

[[Category:Mordor]]

adds the page to the Mordor category.

External linksEdit

For external links, you use only one set of square brackets, instead of two, and the text displayed is seperated from the URL by a space instead of a vertical line. Including "http://" is crucial for the external link to work.

[http://lotrproject.com/map/#zoom=3&lat=-1315.5&lon=1500&layers=BTTTTT Middle-Earth Interactive Map]

produces Middle-Earth Interactive Map

If you want to link to another wikia wiki or Wikipedia, you can use a simpler approach. To link to Wikipedia, add wikipedia: in front of the article you want to link to.

[[wikipedia:Lord of the Rings|Lord of the Rings]]

produces Lord of the Rings.

To link to another wiki, use the w:c:URL: prefix, followed by the common URL of the wiki you want to link to (in the case of this wiki, it's "lotrminecraftmod").

[[w:c:lotr:Elves|Elves]]

produces Elves.

PicturesEdit

To add pictures, the same basic syntax is used as for internal links, but there are some major differences:

  • The prefix is File:
  • There are many more tags.
  • The picture can be made to link to another page, or to its own information page
  • Keywords are more important.

To simply add a picture to a page without any size changes, do the following:

[[File:GondorianBow.png]]

produces GondorianBow.

However, the result of this operation is often unsatisfactory; the picture may be too large, too small, or in the wrong place. To make your picture look better, add some tags after the suffix. Commonly used tags include:

  • thumb -- allows you to add a caption below the picture
  • right/center/left -- puts the picture in one of these three positions
  • none -- aligns the picture the same way as the paragraph (normally left) and prevents if from floating
  • Random Text -- adds a caption below the picture, if it's a thumbnail
  • 50px -- changes the size of the picture, to, in this case, 50px. Changing the number will make the picture a different size.
  • link=Article|Text -- allows you to link the picture to another article when somebody clicks on the picture (except for the small "i"-button in the lower right corner, which shows the info page of the picture).

To summarize all this, here's an example:

[[File:Rohirrim New.png|thumb|center|150px|link=Rohirrim|A non-mounted [[Rohirrim]]]]
produces
Rohirrim New

A non-mounted Rohirrim

When you are fed up with wikia messing up your picture position, you can use the <br> tag or use the none tag (see above).

HeadingsEdit

There are several kinds of headings that are standard on this wiki. Put text in two or more equals signs to make it into heading text. Note that the more equal signs you put around your text, the smaller it'll become. You can also bold or italicize smaller headings to make them more pronounced. For example, the code that defines the "Basic Coding" heading at the top of this page is:

==Basic Coding==

and the code that defines the "Headings" heading (the one just above this section) is:

===Headings===

TemplatesEdit

For information on how to make templates see here.

On this wiki, most templates fall into one of two categories; infobox template, or navbox template.

Adding NavboxesEdit

Adding a navbox is usually as simply as putting two curly backets around the name of the template, as in

{{Template Name}}. 

For example:

{{Help}}
produces

Navboxes are useful for finding pages that are connected in some way without having to find them all individually.

Adding InfoboxesEdit

Adding infoboxes can be slightly more complicated than adding navboxes, mainly because there are many parameters that can be changed. For example, the "Infobox NPC" template (as seen in the top right corner of the Rohirrim Warrior article) looks as follows when it's added to the page in source mode:

{{Infobox NPC
  |Image = RohirrimSoldier.png
  |imagecaption = A non-mounted Rohirrim Warrior
  |health = 20
  |armour = [[Rohirric Armour|Rohirric armour]]
  |attack strength = Depends on held weapon
  |alignment = ROHAN
  |spawn = [[Rohan]], on grass blocks, any light level
  |drops = Bone (0-1) Rohirric armour and weapons
  |alignment needed = +150 with Rohan
  |cost = 30 [[Silver Coin|silver coins]], 50 (mounted)
  |NPC = [[Rohirrim Marshal]]
  |added in = 8
  |armour points = 13}}
  

To modify the parameters of any of the lines in the infobox, type the text you want to display behind the equal sign, i.e. |spawn = [[Rohan]] displays as "Rohan" in the finished product. You'll find all usable infoboxes here.

TablesEdit

To create a basic table, use the following code:

  {| class="wikitable" border="1" style="text-align:center"
  ! Column 1
  ! Column 2
  ! Column 3
  |-
  |Cell 1
  |Cell 2
  |Cell 3
  |-
  |Cell 4
  |Cell 5
  |Cell 6
  |}
  

The above code results in this:

Column 1 Column 2 Column 3
Cell 1 Cell 2 Cell 3
Cell 4 Cell 5 Cell 6

Bullets and numbersEdit

If you want to make a bulleted list, put an asterix (*) in front of each item. For example,

*Firstly... 
*Secondly... 
*Thirdly...  

would give:

  • Firstly...
  • Secondly...
  • Thirdly...

If you want to make a numbered list, put a hash (#) in front of each item. For example,

#Firstly... 
#Secondly... 
#Thirdly...  

would give:

  1. Firstly...
  2. Secondly...
  3. Thirdly...

Inserting a signatureEdit

To insert a signature, use ~~~ . This will insert your own signature like this:

GandalfStaffWhiteGandalf the Turquoise, Lord of the Stiffbeards (Give me a tinkle)

if you want help on making your own signature see here.


To insert a signature with a date stamp, use ~~~~ to give this:

GandalfStaffWhiteGandalf the Turquoise, Lord of the Stiffbeards (Give me a tinkle) 13:20, May 28, 2015 (UTC)

To insert a datestamp only, use ~~~~~ to give this:

13:20, May 28, 2015 (UTC)

Subscripts and superscriptsEdit

The <sub> and </sub>, and the <sup> and </sup> tags make subscripts and superscripts, respectively:

Normal Text, <sub>subscript</sub> and <sup>superscript</sup>

produces Normal Text, subscript and superscript.

OtherEdit

StrikethroughEdit

Use the <s> and </s> to put a strikethrough through text.

<s>Strikethrough</s>

makes Strikethrough.

Horizontal linesEdit

---- gives a horizontal line like this:


IndentsEdit

Colons (:) at the start of a line create an indent, the more colons used, the larger the indent. For example, this:

 : Example indent
::: Third level example indent

would give this:

Example indent
Third level example indent

Preformatted textEdit

Use a space at the start of the line to leave the text in a pre-formatted form., meaning that it is left to look like it does in the Source Editor.

For example, this:

Example text

would give this:

Example text

The <nowiki> and <code> TagsEdit

If you want to display wiki coding as text, ignoring any wikicode there may be, use the <nowiki> and the </nowiki> tags as such:

<nowiki>''This is not italic text''</nowiki>

would give:

''This is not italic text''

If you want to display text in a coded view, use the <code> and </code> tags.

The <br> tagEdit

The <br> tag is a basic tag that's commonly used in templates. It normally just produces a linebreak, as follows:

This page describes<br>all about wiki coding.

produces: This page describes
all about wiki coding.

The more important purpose of it, is preventing images from "floating". The following code:

{| class="wikitable" border="1"
|[[File:GondorianBow.png]]
Normally, the text flows around an image, like this. 
Sometimes this leads to undesired effects, 
such as pictures obstructing info boxes or partly hiding some text.
|[[File:GondorianBow.png]]<br clear=all>
When you don't want it use <nowiki><br clear=all></nowiki> 
to force the text below the image.
|}

produces

GondorianBowNormally, the text flows around an image, like this. Sometimes this leads to undesired effects, such as pictures obstructing info boxes or partly hiding some text. GondorianBow
When you don't want it use <br clear=all> to force the text below the image.

There are also the

<br clear=right> and <br clear=left>

commands. These clear the right or left column of the page. You can use <br clear=left>, for example, if you have a infobox on the right (like most wiki pages do) and you want to place the text on the left below the picture, but besides the infobox (if there's enough space). If you use <br clear=all> it would place the text also below the (probably quite large) infobox, wasting a lot of space.

Advanced CodingEdit

This section assumes that you have basic knowledge of the above skills.

The <span> tagEdit

If you wish to change the colour of font, or many of its other attributes, use the <span> and </span> tags. By default, these tags do nothing, but when combined with some other arguments, they can do some interesting things. For example, typing

<span style="color:blue">blue text</span>

results in blue text.

In addition to the basic colours defined by words, you can use hexadecimal colour codes to change the colour of text. You can find all kinds of colours here: HTML Colour Codes.

But there's more to the span tag than just changing the colour of text. With this tag, you can change the font face, the size of text, and what happens when you click on it. For example:

<span style="color:#387C44; font-family:fantasy; font-size:17pt">This is some fancy text</span>

produces This is some fancy text.

The span tag can also be used to change the colour of the background behind text, and to put a border around text:

<span style="background-color:gold; border:2px ridge black">Bordered text on a golden background</span>

produces Bordered text on a golden background

There are also several other things that the span tag can do; read more about it on htmlgoodies.com.

Span tag attributesEdit

  • background-color: changes the colour of the background behind the text.
  • border: adds a coloured border around the text. The dimensions are given in pixels, and the colour is in hexadecimal triplets or names.
  • color: changes the colour of font using hexadecimal colour codes, or colour names.
  • font-family: changes the font face. Whether or not the chosen font will work on a given computer depends on whether or not the computer has this font loaded. If the font specified can't be rendered on a computer, it will be displayed in Times New Roman instead.
  • font-size: changes the size of the font.
  • font-weight: changes the weight of font from either normal, to bold, to a value between 0 and 1000.
  • margin-[left, right, top, bottom]: changes the size of the margins around the text, in pixels.
  • text-align: [left, center, right]; aligns the text with the chosen margin of the page.

The <span class> tagEdit

The <span class> tag a variant of the normal <span> tag. Currently, the only known use of this tag on the wiki is the following:

  • span class="insertusername">XXXX</span>: Replaces the text between the tags (in this case, XXXX) with the viewer's username. This tag is frequently used on profile pages, although it can be seen on the main page.

Therefore, typing this:

<span class="insertusername">Person</span> is reading this page

produces Person is reading this page.

NOTE: This tag will only work on browsers with JavaScript enabled.

The <div> tagEdit

This tag is used to add a fancy divider to pages, and is most often used when making templates. It's similar to the <span> tag in that it doesn't do anything unless you add more attributes to it. For example:

<div style="width:100%; background:gold; border:2px ridge black; text-align:center; font-family:papyrus">A fancy divider</div>

results in

A fancy divider

Most of the attributes that work with the <span> tag will work with the <div> tag, with the exception of the following new attribute:

  • width:[percentage] changes the width of the divider to the chosen percentage of the page width.

If you know CSS coding, you will be able to use most of those attributes with both the <span> and <div> tags.

The <script> tagEdit

This tag is used when adding JavaScript to pages. It doesn't do anything by itself, unless you put JavaScript elements between the two tags. This wiki doesn't use much JavaScript, however, and knowing it is by no means essential. However, if you do want to learn a bit of JavaScript, whether it's just for fun or because you want an interesting profile page, scroll down for more information.

Redundant CodeEdit

This code will work on the wiki, but it's been rendered obsolete by new code. It's still worthwhile knowing about it, because some pages may use it.

Bold, ItalicsEdit

In the old days, the <b>, <i> and <u> tags were used to make font bold, italic or underlined, respectively. They are more useful for making multiple lines bold, italic, etc., rather than having to do each line individually.

Font attributesEdit

Despite the <span> tag rendering these obsolete, they're still used sometimes when changing only one attribute of text. Note that these don't change the text inside links; you must use the <span> tag for that.

SizeEdit

Size is changed using the <font size> tag, as follows.

<font size="5">Large font</font>

produces Large font.

Font faceEdit

Use the <font face> tag to change the font face.

<font face="times">Times New Roman font</font>

results in Times New Roman font.

Font colourEdit

Similarly, font colour is changed using the <font color> tag, and hexadecimal codes.

<font color="#0000FF">Blue text</font>

produces Blue text.

Be careful when nesting these font tags, otherwise the result may not work properly. For example, the passage below:
Some of the text here is blue and some is not
requires the following code:

<font face="times">Some of the text here is <font color="#0000FF">blue</font> and some is not</font>

If you cannot find the code you need on this page, look at a page similar to the one you want to create, or ask on the Forums.

CSS codingEdit

This wiki uses CSS coding to define the appearance of various things, namely the colour of staff comments and forum posts, and the colour of staff usernames in the "Recent Changes" section of the wiki. The CSS of this wiki is defined here. Because CSS is only used in this one section of the wiki, we won't go into it much here.

JavaScriptEdit

Occasionally, there may an place on this wiki where JavaScript is useful. To insert it into a webpage, use the <script> tag (see above).

Why use JavaScript?Edit

While HTML and CSS are generally adequate for creating a static webpage, they are not interactive. As such, it means that the only way visitors can interact with the webpage is through the use of forms. Once they've submitted the form, they need to wait for it to upload and then download again. In short, JavaScript adds real-time behavior to a webpage. It can be used to add animations or even to load new scripts, images, etc. into the webpage without having to reload the page.

ConsiderationsEdit

While most computers will have JavaScript installed, some do not, while others may have it disabled, so don't design an article such that it requires JavaScript in order to be legible. Also, loading lots of scripts can cause a page to load very slowly, so don't overload it with too much JavaScript.

A full description of JavaScript is beyond the scope of this page, but if you wish to integrate it into a an article, consider asking Sinthoniel.

Chat CodeEdit

While in the Wiki Chat, you can actually use code. To do this, put one of the tags below in front of the text you want to change.

Here is a list of the tags that can be used:

  • [b] will make the text bold
  • [i] will make the text italic
  • [big] will make the text bigger
  • [small] will make it smaller
  • [sup] will make the text superscript
  • [sub] will make the text subscript
  • [u] will underline the text
  • [s] will strike through the text
  • [c (colour)] will colour the text, using either hex values or colour names
  • [bg (colour)] will colour the text's background
  • [font (font name)] will change the text's font
  • [img (image link, minus the http:// off)] inserts an image
  • [yt (video id)] inserts a YouTube video
    • Note: The video id is the part of the web address after the equals sign (=). For example, in the web address below, the video id is cmammYdKJpY

https://www.youtube.com/watch?v=cmammYdKJpY


As with the other code, use a slash (/) in the second tag to end each pair.

ExamplesEdit

[c red]This text will be red.[/c] -> This text will be red.

[c #FF0000]This text will also be red.[/c] -> This text will also be red.

[bg red]This text will have a red background.[/bg] -> This text will have a red background.

[b]This text will be bold.[/b] -> This text will be bold.

[c red][b]This text will be red and bold.[/b][/c] -> This text will be red and bold.

/meEdit

You can also type '/me' followed by some text to give an action of the user in the third-person, for example:

/me is a Wiki user.

would appear as:

* (username) is a Wiki user.

EmoticonsEdit

Also, some strings of text, when used in the chat, will produce a picture (similar to the Emoji system).

For a full list of the 'emoticons' in use on this Wiki, see MediaWiki:Emoticons.

If you want to have an emoticon added to this Wiki's library, ask an admin, and don't forget to tell them what codeword needs to be typed in the chat for it to appear.


Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.