Difference between revisions of "User:Sirryan2002/WikiGuide"
Sirryan2002 (talk | contribs) |
Sirryan2002 (talk | contribs) (→Style: added some attributes to syntax) |
||
Line 521: | Line 521: | ||
==Span== | ==Span== | ||
=== | ==Common Style Attributes== | ||
'''''Color''''' means any HTML Color name or hex value in this format -> #FFFFFF | |||
{|class ="wikitable mw-collapsible" width: "80%";" | |||
|- style="font-weight:bold;background-color:Gray;text-align:center;" | |||
! style="center;" | Format Type | |||
! style="left;" | Usage/Parameters | |||
! style="center;" | Output | |||
|- | |||
! background-color:''Color''; | |||
| Use this to set the background color <pre><div style="background-color:#CCFFCC;">Example Text 1 <br> Example Text 2</div></pre> | |||
| <div style="background-color:#CCFFCC;">Example Text 1 <br> Example Text 2</div> | |||
|- | |||
! color:''Color''; | |||
| Use this to set text color <pre><div style="color:darkred;">Example Text 1 <br> Example Text 2 </div></pre> | |||
| <div style="color:darkred;">Example Text 1 <br> Example Text 2 </div> | |||
|- | |||
! border: #px linetype ''Color''; | |||
| Use this to set the style of borders <pre><div style="border: 1px solid blue;">Example Text 1 <br> Example Text 2</div></pre> | |||
| <div style="border: 1px solid blue;">Example Text 1 <br> Example Text 2</div> | |||
|- | |||
! margin-{side}: #px; <br> or <br> margin: #px #px #px #px | |||
| Use this to set the margins for all four sides. It can be top, bottom, right, or left (in that order) <pre><div style="background-color:grey;margin-top:64px>Example Text 1 <br> Example Text 2</div> | |||
or | |||
<div style="background-color:grey;margin:12px 12px 15px 15px>Example Text 1 <br> Example Text 2</div></pre> | |||
| <div style="background-color:grey;margin-top:64px>Example Text 1 <br> Example Text 2</div> | |||
or | |||
<div style="background-color:grey;margin:12px 12px 15px 15px>Example Text 1 <br> Example Text 2</div> | |||
|- | |||
! padding-{side}: #px; <br> or <br> padding: #px #px #px #px | |||
| Use this to set the spacing between the border and its contents. It can be top, bottom, right, or left (in that order) <pre><div style="background-color:grey;padding-top:64px>Example Text 1 <br> Example Text 2</div> | |||
or | |||
<div style="background-color:grey;padding:12px 12px 15px 15px>Example Text 1 <br> Example Text 2</div></pre> | |||
| <div style="background-color:grey;padding-top:64px>Example Text 1 <br> Example Text 2</div> | |||
or | |||
<div style="background-color:grey;padding:12px 12px 15px 15px>Example Text 1 <br> Example Text 2</div> | |||
|} | |||
==Templates== | ==Templates== | ||
===Calling Templates=== | ===Calling Templates=== |
Revision as of 21:53, 19 January 2021
Assigned to:Sirryan2002
Wiki Editing Tutorial
Many people want to edit the Paradise wiki but have absolutely no idea how or where to start learning. This guide serves as the easiest way to pick up on basic-intermediate wiki code and provide a stepping stone for others to improve their wiki knowledge.
This is not a set of rules for the wiki, for that, you should go Here. Template:TOC
Making Edits
Wikis are such a fabulous tool for servers because they can be constantly edited and updated by the playerbase. Whenever you make a change/edit to any page it is documented in the view history tab at the top of the page. In there you can see who made the edit, when they made it, and what they said they edited. In addition, you can compare edits to see the changes between them and undo them.
Whenever you make an edit, you are required to do two things.
- Summarize your edit
- Declare the type of edit you're making
When summarizing your edit, keep it concise(in 1 sentence) and describe vaguely what you did. For example, if you add a bunch of items to a table, you can just specify "Added additional items to the (insert name here) table."
If your edit is purely to correct a small(within 50 characters) grammatical/phrasing/spelling issue then you should declare your edit as a Minor Edit "grammar fix" or "spellcheck" will suffice as a summary for these types of edits.
Comments
You are able to Comment out text inside the pages wikicode. This is great for letting other editors what to do/not do.
Comments should be used for:
- Explaining Template Code
- Warning users not to delete certain code
- Explaining weird/uncommon syntax
- Warning users not to add something because previous content of that type has been repeatedly reverted
- Used to section areas of the code off when it gets messy
Comments should not be used to:
- Leave funny/friendly messages or jokes
- Temporarily remove sections to be re-added later (this is what user and draft pages are for)
- Explain changes made
Text Formatting
Text by itself is extremely boring and often hard to read, so you can use text formatting to make your words really POP!
Format Type | Usage | Output |
---|---|---|
Bold | Use this to bring attention to important text <b>This text is bold!</b>or '''This text is bold''' |
This text is bold! |
Underline | Use this to underscore important information or warnings <u>This text is underlined!</u> |
This text is underlined! |
Italic | Use this to enounciate certain words <i>This text is italicized!</i>or ''This text is italicized!'' |
This text is italicized! |
Headings | Use this to declare a section of your article and organize it
===Level 3=== ====Level 4==== =====Level 5===== ======Level 6 ====== |
Level 3Level 4Level 5Level 6 |
Bullet Lists | This is how you create bullet lists
*Item 1 * Item 2 ** Item 2.1 ** Item 2.2 * Item 3 ** Item 3.1 *:- Definition |
|
Numbered Lists | This is how you create numbered lists
#Item 1 # Item 2 ## Item 2.1 ## Item 2.2 # Item 3 ## Item 3.1 |
|
Preformatted Text | Use this to preformat text with a certain, this will alos allow you to write anything within the pre blocks without the wiki recognizing it as text formatting.
<pre>This text is preformatted to be the default font and style, <b>Things aren't bolded</b> or <i>Italicized</i>!!!</pre> |
This text is preformatted to be the default font and style, <b>Things aren't bolded</b> or <i>Italicized</i>!!! |
Comments | Use this to leave important notes/messages to people editing the page. Comments do not show up when you view the wiki page and are only visible in the page editor.
<!--This is a comment, to whoever is reading this --> The Fitness Gram Pacer Test is a multi-stage aerobic exercise... |
The Fitness Gram Pacer Test is a multi-stage aerobic exercise... |
Nowiki | The nowiki block makes it so that any formatting within the block is ignore and is instead displayed as regular text. <nowiki><b>This is bold!<b> this is a burger: [[File:Burger.png]]</nowiki> |
<b>This is bold!<b> this is a burger: [[File:Burger.png]] |
Font Usage
Images
Images are extremely important for our wiki, without them people wouldn't know what icons/mobs would look like or get a visual representation of what they're supposed to do. Trying to include pictures in your articles can seem daunting at first, but it's super easy once you get a handle on it.
Usage and Formatting
In order to use an image you must utilize the [[File:]] synax.
For example, if you want to use Burger.png: then you must specify [[File:Burger.png]]. This will make Burger.png appear wherever you declare this.
However, in order to make images useful to us, we need to format that in a way that is easy to understand and see. We can add parameters to our image by utilizing the '|' character. If you want your image to a certain size and make it link to another page you can specify it as [[File:Burger.png|64px|link=Space Law]]. There's a ton of parameters you can use but the most important ones are listed below.
Uploading
In order to upload an image, you must click on upload file in the left taskbar. Here you can upload lots of files(if they're supported) to the wiki.
General Rules about uploading:
- Check to make sure your image doesn't already exist on the wiki
- If your image already exists but you want a better resolution, upload a new version to that file
- Try and upload sprites with the size 32px or 64px
- Once you upload an image, it cannot be removed except by an admin
- Give your images proper names
- Make your images have a transparent background if applicable
- Try to only use these formats: .png and .gif
- Larger images such as File:General Destruction.png don't have to follow sizing guidelines because they're supposed to be large and high resolution
References
It is very important the articles link to each other so we have a web of information. In order to do this, we can reference articles and link keywords to those articles.
The most obvious way to do this is by typing [[Article Name]]
For example, you could link to Space Law by typing
[[Space Law]]
You can also link the article and change the link text. If you wanted to still link to space law but instead have the link be Legal Suggestions then you would have to use the syntax below. The two parameters for images is the Page Name and the Link Text --> [[Page Name|Link Text]]
[[Space Law|Legal Suggestions]]
Referencing Nuances
As a general note, you should always add spaces after references as it will include any characters that are next to it. So if you write [[Space Law]]textextext It will output as Space Lawtextextext.
If you wanted to do something like SMES's where you have characters directly next to the link then you would have to add the <nowiki /> tag to it --> [[SMES]]<nowiki />'s
If you want to link to an image rather than embedding it you will need to add a ':' colon before the name. For example, I can reference File:Burger.png without the image embedding itself by doing:
[[:File:Burger.png]]
If you want to link to something outside of the Main: Namespace (if you're not sure what a namespace is, go here, but for now all you need to know is that all general users will be reading are in the Main Namespace) you will have to specify which namespace the article is in before you link it.
For example if I wanted to link to my user page:User:Sirryan2002 I cannot just use [[Sirryan2002]] because it will automatically default to the main namespace -> [[Main:Sirryan2002]] which does not exist. I will have to instead specify which name space I'm searching in. For the user's name space I will specify User
[[User:Sirryan2002]]
Referencing Subsections
Sometimes you don't want to just link to an article, you want to link to a specific point in that article.
By adding a hashtag '#' to the end of a page name in your link you can specify where you want to go in that article. You can do this for any subsection in an article.
If I wanted to link this to Crime Codes References on the Space Law page. All I would have to do is specify it like so:
[[Space Law#Crime Codes Quick Reference]]
If the area you're referencing is in the article where the link is you can shorten the syntax. For example if I was on the Space Law page and I wanted to link a certain word to a subsection/anchor all I would have to do is use a '#' and write the subsection name:
[[#Crime Codes Quick Reference]]
Anchors
An Anchor is a defined place within in a page that you can link people to. They work much like headings where you can link people to them:
[[Page Name#Anchor Name]]. Infact, all headings have anchors attached to them! On our wiki we have [[Template:Anchor]] which allows us to create anchors extremely easily. What you will need to do is find the area you want someone to be taken to and place the anchor directly next to it via <pre>{{Anchor|Anchor_Name}}
If I wanted to create an anchor right -> here <- all I would have to do is this:
If I wanted to create an anchor right -> here{{Anchor|AnchorExampleSpot}} <-
now if you click on #AnchorExampleSpot it should take you directly to the anchor.
Tables
This is where wikicode starts getting a little more difficult and confusing.
A wikitable always has to be wrapped by curly brackets
{| All the content goes here |}
Below from left to right is Table Syntax, an example table in final form, and example code for a table.
Syntax | What it does |
---|---|
{| | Start a table - required |
|} | End a table - required |
|+ | Add a definition/title to the table |
|- | Starts a new row |
! | Creates a Header Cell |
| | creates a new cell |
Header Cell | Header Cell | Header Cell |
---|---|---|
Header Cell | Cell | Cell |
Header Cell | Cell | Cell |
Header Cell | Cell | Cell |
Header Cell | Cell | Cell |
Header Cell | Cell | Cell |
Header Cell | Cell | Cell |
{|class="wikitable" |- ! Header Cell ! Header Cell ! Header Cell |- ! Header Cell | Cell | Cell |}
Table Classes
You should never go with the default table setup because it has no border or lines to break up cells. In order to give our tables fancy UI we have to declare what class it is.
We always do this at the beginning directly after the table start syntax The wikitable class gives our tables borders/outlines with grey backgrounds for header cells
Header Cell | Header Cell | Header Cell |
---|---|---|
Header Cell | Cell | Cell |
{|class="wikitable" |- ! Header Cell ! Header Cell ! Header Cell |- ! Header Cell | Cell | Cell |}
The mw-collapsible class makes it so you can collapse the table(have to include wikitable class)
Header Cell | Header Cell | Header Cell |
---|---|---|
Header Cell | Cell | Cell |
{|class="wikitable mw-collapsible" |- ! Header Cell ! Header Cell ! Header Cell |- ! Header Cell | Cell | Cell |}
The mw-collapsed starts a table with a mw-collapsible class in the collapsed state.
Header Cell | Header Cell | Header Cell |
---|---|---|
Header Cell | Cell | Cell |
{|class="wikitable mw-collapsible mw-collapsed" |- ! Header Cell ! Header Cell ! Header Cell |- ! Header Cell | Cell | Cell |}
The Sortable class allows you to make your columns sortable alphabetically, numerically, or by date. Additionally, by defining a row with class="unsortable" you can make it so that row isn't sortable.
Alphabetic | Numeric | Date | Unsortable |
---|---|---|---|
d | 20 | 2008-11-24 | This |
b | 8 | 2004-03-01 | column |
a | 6 | 1979-07-23 | cannot |
c | 4.2 | 1492-12-08 | be |
e | 0 | 1601-08-13 | sorted. |
{| class="wikitable sortable" |- ! Alphabetic ! Numeric ! Date ! class="unsortable" | Unsortable |- | d || 20 || 2008-11-24 || This |- | b || 8 || 2004-03-01 || column |- | a || 6 || 1979-07-23 || cannot |- | c || 4.2 || 1492-12-08 || be |- | e || 0 || 1601-08-13 || sorted. |}
Cell Size Formatting
You can define the size of a cell by using colspan and rowspan.
col1 | col2 | col3 | col4 |
---|---|---|---|
row1 | A | C | |
row2 | AA | BB | CC |
row3 | AAA | BBB | CCC |
row4 | AAAA | CCCC |
{| class="wikitable" style="text-align: center;" !col1 !col2 !col3 !col4 |- !row1 | colspan="2" | A |C |- !row2 |AA |BB |CC |- !row3 |AAA | rowspan="2" | BBB |CCC |- !row4 |AAAA |CCCC |}
Table Style
Without defining the style of your table, it will look rather barebones. Most pages on this wiki have a color theme to them so it's important to know how to do this.
Whenever you're defining the style (aka how it looks) of a table you will need to declare it using the style="" syntax.
However, what do you put inbetween those quotations marks? Well the answer isn't the same for all the style options you have with HTML. For example, if you want to make background color of the table CadetBlue you would have to do this:
{|class="wikitable" style="background-color:CadetBlue;" |- | Cell | Cell | Cell |- ! Header Cell | Cell | Cell |}
Notice how the there is a semi-colon ';' after it. You must use semicolons to separate each attribute you use and to end the string.
For more information on what attributes there are for styling go Here.
Depending on what you're trying to do, you can style different parts of a table. To style the entire table, your style will have to go directly after where you define the class of the table:
{|class="wikitable" style="text-align:justify;" |- | Cell | Cell | Cell |- ! Header Cell | Cell | Cell |}
To Style Individual Cells you will need to define the style of the cell and then use the '|' character after which you can then write the content that would go into the cell. Additionally, you can do this to header cells "!" in the sameway.
{|class="wikitable" |- ! style="color:blue; text-weight:bold;" | This Header Cell is Styled! | Cell | Cell |- ! Header Cell | Cell | style="text-align:left" | This Cell is also Styled! |}
To Style Rows you will need to define the style after you declare the row with 'the |-' character
{|class="wikitable" |- | Cell | Cell | Cell |- style="text-weight:bold;" ! Bold Header Cell | Bold Cell | bold Cell |}
Span
Common Style Attributes
Color means any HTML Color name or hex value in this format -> #FFFFFF
Format Type | Usage/Parameters | Output |
---|---|---|
background-color:Color; | Use this to set the background color <div style="background-color:#CCFFCC;">Example Text 1 <br> Example Text 2</div> |
Example Text 1
Example Text 2 |
color:Color; | Use this to set text color <div style="color:darkred;">Example Text 1 <br> Example Text 2 </div> |
Example Text 1
Example Text 2 |
border: #px linetype Color; | Use this to set the style of borders <div style="border: 1px solid blue;">Example Text 1 <br> Example Text 2</div> |
Example Text 1
Example Text 2 |
margin-{side}: #px; or margin: #px #px #px #px |
Use this to set the margins for all four sides. It can be top, bottom, right, or left (in that order) <div style="background-color:grey;margin-top:64px>Example Text 1 <br> Example Text 2</div> or <div style="background-color:grey;margin:12px 12px 15px 15px>Example Text 1 <br> Example Text 2</div> |
Example Text 1
Example Text 2 or Example Text 1
Example Text 2 |
padding-{side}: #px; or padding: #px #px #px #px |
Use this to set the spacing between the border and its contents. It can be top, bottom, right, or left (in that order) <div style="background-color:grey;padding-top:64px>Example Text 1 <br> Example Text 2</div> or <div style="background-color:grey;padding:12px 12px 15px 15px>Example Text 1 <br> Example Text 2</div> |
Example Text 1
Example Text 2 or Example Text 1
Example Text 2 |
Templates
Calling Templates
Making Templates
Categories
In order to assign a wikipage to a category, all you need to do is add this to the bottom of the page:
[[Category:Category name]]
For example, I've assigned this article to Category:Guides by adding this to my page code:
[[Category:Guides]]
You can create a category by typing this into the search bar and creating "create page" which should be highlighted in red
[[Category:Insert name here]]
Protected Pages
Some pages like Paradise's Main Page are what we call a Protected Page.
This means that only users with a certain level of user rights can edit that page. This is usually reserved for Game Admin, Headmins, maintainers etc.
The kind of pages that are protected tend to be SOP pages like Command SOP, Space Law, and templates that are used on protected pages like Template:LawModifiers.