Author Topic: Guide: Contributing to the Wiki  (Read 1804 times)

Offline Mattamue

  • NPC
  • **
  • Posts: 107
    • View Profile
Guide: Contributing to the Wiki
« on: March 07, 2016, 05:05:10 AM »
Contributing to the Wiki can seem overwhelming, but it is easy once you understand some Wiki basics. One of the first things more complicated things you will encounter on the Wiki is the infobox. See the Nail gun page as an example.

This  / turns into this:


With the use of an infobox template.

Infoboxes allow regular presentation of the information and makes changes to the template easy across many pages. Here, changing the title from "As a Firearm" to "Firearm" is completed just on the template page and those changes are shown on every page that uses that infobox template. The information is still manually entered onto the actual page in this format so the magic needs some work behind it.

The template that is used in this case is the Firearm template.

Here you can see how the details that are laid out in the list on the page are translated into the data that shows up on the infobox. The first variable of header1=General is the first thing to show up under the name and symbol of the item. This shows how information in the template is made on this one template page, but shows up across all the pages that use it. In this case this "General" label isn't passed anywhere in the information you type into the page, but is only set on the template and shows up on the individual pages.

The next item to review is the simplest version of using a variable on the item's page and passing it into the infobox.


Here you see that the 3rd label, which the infobox is smart enough to lay out as the 3rd thing in its list of labels and data, is labeled as [[Volume]]. Things that have [[]] around them tell the Wiki to make that a URL link to a page with that name. This makes the Volume label in the infobox clickable to take the player to a page that talks more about volume. Next the |data3={{{volume|0}}} is what takes the information from the page and loads it into the infobox. The 0 in this case is the default value. On the Nail gun page this was set as |volume=4 in the page to load the 4 into the infobox. This is how variables that are set onto the page are captured and loaded into the infobox.

The other data variables are a little more complicated. The |id= variable uses the if function to determine if there is anything in that data. If there is not it doesn't pass anything and so it does not create a blank label in the infobox, but otherwise it creates a link to the item browser. The data2 data is passed through 2 variables, here |mat1= and |mat2= use "lc" to make them lowercase and if there is a 2nd material then the more expanded 2-material list of data is used rather than just 1 with the "#switch" in the data.

These may be a little overwhelming at first, but understanding and using these templates will be the easiest hurdle to overcome and be able to confidently contribute, not only to the Wiki, but to contribute to creating high quality pages as well. For your reference this is a list of the current template types and "blank" versions you can paste into a page for a new item of that type and fill it in accordingly.

You can use these as a pastebin to simply copy and past these blank templates into the Wiki page to get started. These include a few categories and navboxes as well. Your mileage will vary on the categories, but at least they'll be a reminder even if they are not exact.

Like some of the Wiki these templates are not always up to speed with experimental. Firearm is a good example of a complete template that could use an update for the aim changes, but is otherwise very good at creating an interesting and complete page for an item.

(click to show/hide)
(click to show/hide)
(click to show/hide)
(click to show/hide)
(click to show/hide)
(click to show/hide)
(click to show/hide)
(click to show/hide)
(click to show/hide)
Melee weapon
(click to show/hide)
(click to show/hide)
Vehicle part
(click to show/hide)
« Last Edit: March 08, 2016, 01:01:19 AM by Mattamue »
i'm not drunk enough to tell you the truth

Offline Litppunk

  • Survivor
  • ***
  • Posts: 4358
  • Laughing at death: the answer to impossible
    • View Profile
Re: Contributing to the Wiki
« Reply #1 on: March 07, 2016, 05:43:41 AM »
Wow. Thats a big help thanks. Can this get pinned please? This is great reference material. I don't even bother to look at the wiki any more.... but if I do, and I see somethign that needs work, or just feel something should be added, I'll give it a spin. Thanks mattamue.
Feeds both of grandpas wolves, and but doesn't let them fight; Then saves the car full of cash sells it and starts an orphanage, anti-railroad-tying shenanigans-organization and invests.

Offline rremyroy

  • NPC
  • **
  • Posts: 140
    • View Profile
Re: Guide: Contributing to the Wiki
« Reply #2 on: March 16, 2016, 07:52:54 PM »
Great job on the recent changes! You are one of the most active people on the Wiki and we need more people like you!