Help:Editing: Difference between revisions
m (→Links: fixed table width) |
m (→Tables: added mediawiki link for css) |
||
Line 250: | Line 250: | ||
<nowiki>|}</nowiki> | <nowiki>|}</nowiki> | ||
</div> | </div> | ||
The most common modifiers are [ | The most common modifiers are [https://m.mediawiki.org/wiki/Manual:CSS Cascading Style Sheet (CSS)] classes (<code>class="''class names''"</code>) or style definitions (<code>style="''definition''"</code>), which change the appearance of the table. Some classes can set up special behavior on the table, such as <code>sortable</code>, which allows you to sort the table by columns, or <code>collapsible</code> and <code>expandable</code>, which makes the table hidable or hidden by default. Individual cells can also be merged together horizontally with <code>colspan="''number of columns to merge''"</code> or vertically with <code>rowspan="''number of rows to merge''"</code>. | ||
=== Images === | === Images === |
Revision as of 08:09, 17 June 2024
Editing articles on the wiki might seem like a daunting task at first, from basic formatting of the contents to automatic lookup and inclusion of information from other articles. Nevertheless, one of the basic principles of this website is that all of its content is made by the community for the community, and everyone is encouraged to help with the huge task of keeping it up to date.
If you want to contribute to the wiki but you have no idea where to start, this page is for you. It will walk you through the absolute basics of making a change to pages, and then it will explain various concepts in use so that you have a general understanding of the way many pages work and aren't feeling intimidated by making changes to them.
Approaching the wiki
In order to contribute you don't even necessarily have to learn anything about the way content is structured and formatted in its code. All contributions matter; from small typo fixes to complex guides, no contribution is meaningless! Even if you simply decide to write all information in plain text, someone else may come later and format it differently, but what's important is that you add the information here in the first place.
Any wiki is by definition a collaborative project. Pages change over time. With this in mind, don't be discouraged in case another user reverts or otherwise changes some of your contributions. Sometimes the information had simply been moved or reformatted elsewhere, sometimes it may be due to a consensus from an earlier discussion (which is not set in stone and could still change), and sometimes the revert could have been completely unwarranted. In any case, unless you're in fact actively trying to vandalize the website, your edits always help and make the wiki a better place.
Leaving feedback
If for any reason you don't want to edit the pages directly (for instance when you don't understand what the code is doing and have no idea how to change something), but you would like to add some information or point out a mistake, you're still encouraged to contribute by using the discussion link at the very top of the page. You can post your message in the text box on that page and save it, and another user might come later to react accordingly.
Accounts
You must have a wiki account with writer permissions to create and edit articles. This adds a level of security to our wiki site, preventing random users from vandalizing or otherwise maliciously editing our content. Plus, all your contributions will be kept in one place.
Basics of editing
Your first edit
Let's say that you spotted a typo or a mistake in a paragraph of text somewhere you decide to fix, or you want to add a sentence somewhere.
First, you will need to enter the editing mode. At the top of almost every page, above the main title, you'll notice several links; the one that says edit will allow you to edit the entire page's contents. Alternatively, each section title has an [edit] link at the right side of the page, which will limit your edits to that section and its subsections only. The edit link specifically opens the visual editor view, and edit source opens the wikitext editor.
Visual editor allows you to make changes to a page and see what the end result looks like in real-time. The rest of this guide will focus more on the source code method of editing, but see Visual Editor for more information. After you click on edit source, you'll be shown an edit box with the page's or section's source code. The code might include various characters responsible for the text's formatting, but you should still be able to find the place you were looking for and correct it or add to it.
After you make your changes, click on the Show preview button. This will load the section the way it would look with these changes. It is always a good idea to preview your changes before fully committing them to confirm everything looks as it should. When you're satisfied with the changes you've made, you can optionally fill in the Summary below the editing area to explain what the edit was about (such as "added acquisition methods"), and then click on the Save page button.
If no one else edited the same section as you did in the meantime, the edit will be saved. If you were unlucky enough that more people tried to change the same section at once, you'll be shown an Edit conflict with the source of the page as it appears now. At that point you can go back in your browser's history to get your version back, copy your changes, and if your edit still makes sense, you can try to repeat the process.
Creating new pages
The easiest way to create an entirely new article is to find a link that leads to it, which will show up in red color, such as Help:Example, and click on it. A familiar editing window will appear, and when you save your changes, the new page will be created.
As an alternative, you can search for the exact name you want the page to have in the Search box in the top bar, and click on the red link that appears at the top of the search results.
Text formatting
- More details: Help:Formatting on MediaWiki
If the wiki was comprised of plain text data only, editing it would be really simple… except that no one would actually use it. Usually, when you edit a page, you'll encounter a wide variety of formatting techniques, from bold text to sophisticated table designs. This formatting is realized by adding specific characters around the text, which the wiki then displays in a certain way.
The following table lists the most widely used text formatting options:
Input code | Result |
---|---|
''Italic text''
|
Italic text |
'''Bold text'''
|
Bold text |
* First * Second ** Indented * Third |
|
# First # Second ## Indented # Third |
|
== Level 2 title == === Level 3 title === ==== Level 4 title ==== |
Level 2 title
Level 3 title
Level 4 title
|
This is a paragraph. Paragraphs are separated by an empty line.<br> New lines can be forced with the HTML break tag. |
This is a paragraph.
Paragraphs are separated by an empty line. |
; Term : Definition |
|
Paragraph : Indented paragraph :: Double-indented paragraph ::: The indentation levels can continue indefinitely |
Paragraph
|
Links
- More details: Help:Links on MediaWiki
The wiki's code includes a very short and easy method for creating links to other pages, with various ways to alter the displayed link text.
Input code | Result | Notes |
---|---|---|
[[Race]]
|
Race | |
[[Qwerty]]
|
Qwerty | Links to non-existent pages are displayed in red color and allow quick page creation. |
[[Race]]s
|
Races | Characters immediately following the ending brackets but before a space are automatically appended to the displayed text. |
[[barbarian]]
|
barbarian | The first character of the page the link leads to is automatically converted to upper case. |
[[Race|Different text]]
|
Different text | If the | character is present inside the brackets, the text following it is displayed instead.
|
[https://fhxrestoration.com/ Official site]
|
Official site | If only single square brackets are used, a link which can lead outside the wiki is created. Note that unlike in the previous example, no | character is used.
|
[https://discord.com/channels/450862112298762240/518548538330710037 FHX [Discord]]
|
FHX [Discord] | If you need to show [] characters inside link text, use [ = [ or ] = ]
|
Introduction to other features
Templates
- More details: Help:Templates, Help:Templates on MediaWiki
From time to time you might come across something like this:
{{race nav}}
The double curly brackets indicate a use of a template.
A template is a separate page whose entire or partial content is being inserted ("transcluded") at the point of this syntax ("template call"); in the previous example Template:Race nav. This allows pages to share content or at least a general structure for formatting, and by editing the template itself you can make changes across all the pages that use it at once. After showing the preview when editing, all templates used in the current section are listed under Templates used in this preview below the edit box and its controls.
The most basic way to use templates is to simply write their name in the double curly brackets. These templates are used for simple repetition of commonly used features throughout various pages, such as profession, race, crafting or effect icons, or navigation tables often used at the bottom of pages linked with a common theme:
Input code | Template page | Result |
---|---|---|
{{archer}}
|
Template:Archer | |
{{barbarian}}
|
Template:Barbarian | |
{{Race nav}}
|
Template:Race nav | (See the template.) |
Templates can also include multiple parameters in a given order, separated by |
in the template call. These parameters can influence anything the template does or displays, such as any text, appearance or even categories. Descriptions, order and default values of all available parameters of the given template should always be listed on the template's page itself.
Input code | Template page | Result |
---|---|---|
{{High-Elf|small}}
|
Template:High-Elf | |
{{skill icon|Magic Defense}}
|
Template:Skill icon | Magic Defense |
Bigger templates often have some or all of their parameters named, in which case their order no longer matters; the unnamed parameters are still ordered among themselves. In the template call the names of these parameters are written first, followed by =
and their value:
Input code | Template page | Result | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{money|value=12345|showsum=1}}
|
Template:Money | 1 23 45 (12345) | ||||||||||||||||||||||||||||||
{{Race info table |name=[[Barbarian]] |img=Barbarian Male.gif |caption=The Barbarian is one of the currently three playable races in the game. |tag={{barbarian|small}} |vit=11 |dex=9 |int=7 |str=11 |availableClasses=[[Archer|Ac]] [[Knight|Kn]] [[Paladin|Pa]] [[Warrior|Wr]] }}
|
Template:Race info table |
|
Tables
- More details: Help:Tables, Help:Tables on MediaWiki
Table formatting can appear somewhat complex compared to other features of the wiki's code which are used throughout the main content articles.
- When you want to create a table, you'll encapsulate all of its contents in
{|
and|}
tags. - Rows are separated with
|-
on their own line. - Cells are created either with
|
when starting on a new line, or||
if continuing on the same line. - Header cells are generated with
!
and!!
instead.
As an example, this code:
{| ! Header 1 !! Header 2 ! Header 3 |- | Cell 1 | Cell 2 || Cell 3 |}
generates this table:
Header 1 Header 2 Header 3 Cell 1 Cell 2 Cell 3
However, if you want to make the table more visually appealing with borders, background colors and text alignment, combine cells in neighboring rows or columns together, make the table sortable by columns and so on, you'll need to add various modifiers to the table, rows and cells to the following places:
{| table modifiers ! cell modifiers | Header text !! cell modifiers | Header text ! cell modifiers | Header text |- row modifiers | cell modifiers | Cell text | cell modifiers | Cell text || cell modifiers | Cell text |}
The most common modifiers are Cascading Style Sheet (CSS) classes (class="class names"
) or style definitions (style="definition"
), which change the appearance of the table. Some classes can set up special behavior on the table, such as sortable
, which allows you to sort the table by columns, or collapsible
and expandable
, which makes the table hidable or hidden by default. Individual cells can also be merged together horizontally with colspan="number of columns to merge"
or vertically with rowspan="number of rows to merge"
.
Images
- For a guide on taking screenshots, see Help:Images
- To upload an image, go here: Special:Upload
Many commonly used images, such as various icons, can be displayed with templates, but if you want to put a screenshot on a page, you'll have to display it directly. In order to do so you'll use the same syntax as for links, except that image filenames are always prefixed with File:
. The syntax which displays the image can be expanded with various options (delimited by |
) which alter the displayed image, such as its dimensions, position, caption or where it should link to (instead of the default location – the image's own page).
Examples
- For further details on displaying images, see Help:Images on MediaWiki
Wiki tools
The wiki provides various tools for contributors through the links at the very top of the page, in the left sidebar and on Special Pages, which allow users to contact each other, discuss or test changes, browse the article history, browse the wiki based on certain criteria and so on.
Discussions
Every single article has, or at least can have, an associated discussion page that you can access with the discussion link at the top of the page, such as Talk:Crafting. These pages are used by contributors to discuss matters regarding the wiki. It is not a tool to suggest or discuss changes to the game itself, but it is a vital tool to reach consensus on certain decisions, to find solutions for layout of some pages, to discuss major changes before they're implemented, and to solve issues when people end up fighting over certain edits.
Editing of discussion pages works just like any other article. When you add comments to a discussion page, you should always put your signature at the end with ~~~~
, and you should indent your comment with one :
character per indent level at the beginning of the line—depending on how far in the discussion the comment is—to make the discussions easier to read:
::: This is my comment, indented by 3 levels. -- ~~~~
You can also add new sections to start new discussion with the + link at the top of the discussion page.
- See also: Help:Signatures, Help:Archiving
History
Another feature of every single page is the history log, reachable through the history link at the top of the page. This page lists all edits ever made to the article, who they were made by, summaries of the edits and so on.
The cur and prev links will show you differences when compared to the current or previous version, respectively, and clicking on the date and time will try to show you what that version looked like, although it doesn't reflect how other pages whose content was also used here (such as templates) looked at that time.
Sandbox
If you just want to test some wiki syntax out and are afraid that you'll accidentally delete parts of another page (it would still appear in the history and could be recovered, but you might get flagged for vandalism if you'd do that repeatedly), you can head to the Sandbox page. This page is made specifically for editing experiments, but be aware that anything on this page can be removed by anyone at any time. However, you often don't need to save your changes to this page either; if you're only trying out something simple, show preview might still be sufficient.
User pages
When you create an account, you will be given access to your own page where you can put anything you want, as long as you don't use this page with malicious intent.
This page will be located at User:<account name>, e.g. User:Example. It even comes with its discussion page where others may contact you, for instance User talk:Example, and you can create subpages as you see fit, such as User:Example/Subpage.
Practices and processes
- See also: FHX Wiki:Practices and processes
This wiki is still very new and has yet to decide on practices and processes - the main focus being to populate it with content. Once more content is written and published, we can revisit this topic. This would include, among others, common formatting templates for items, skills, NPCs and so on, how to use discussion pages or how to handle edit warring or page deletions. These aren't needed at this stage in the project, but would be worthwhile later on as the wiki gets larger.
Overview of other tools
- See also: Special pages
This is an overview of various other tools the wiki offers its users. You definitely don't need to know these in order to contribute, rather treat this section as a reference.
- Redirects
- Some pages can be set up to automatically redirect the user to a page with a different title to make searching or linking easier, for example Sandbox redirects to FHX Wiki:Sandbox. If you click on the original name below the page title after being redirected, you can suppress the redirect to see the original page directly. Redirects are created by including the following code as the only content of the page:
#REDIRECT [[page name]]
- Related pages
- The left sidebar includes two pages in the Tools section which might potentially be useful while editing. What links here will show you a list of all other pages which have a link leading to this page, redirect to this page or include this page as a template.
- Categories
- At the very bottom of a page you might see links to what's known as categories. These create a hierarchical structure for pages, images and templates, and can be used by editors to browse articles (Category:NPC). Categories are given to pages with a similar syntax as links or files, usually at the end of the page's contents:
[[Category:category name]]
- Forcing a link to be displayed regularly
- For links with various prefixes that are treated as a special case and aren't showed in the article as regular links would, such as categories or files, you can type
:
before the prefix to suppress this behaviour; for instance[[:Category:NPC]]
displays Category:NPC.
- Watchlist
- You can add any page to your own watchlist with the watch link at the top of the page, accessible from a link at the top right. The watchlist allows you to watch changes done to the selected pages or its corresponding discussion page by other users.
- Recent changes
- Recent changes link in the left sidebar shows a list of all recent edits made by users on any page on the wiki.
- Moving pages
- The move link at the top of the page allows you to move a page, its discussion page, subpages and all of their history logs to a different name, while leaving a redirect from the old name to the new one. When doing so, make sure that you have a good reason for this move (possibly previously being discussed and agreed on by the community).
How to help |
---|
|