Help:Editing: Difference between revisions

m
changed tip to take advantage of new Center template
mNo edit summary
m (changed tip to take advantage of new Center template)
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
:''After reading this page, please see our rules on the [[OniGalore:Policy]] page.''
{{PoliciesSidebox}}
 
Below is a selected set of tips that will get you started editing any wiki that's powered by the MediaWiki software. Basic tips are followed by {{SectionLink||Advanced tricks}} that we've used on the wiki. For additional reading, see {{SectionLink||Further help}} which directs to pages on Wikimedia Foundation's sites (the developer of MediaWiki). Their general [[metawikimedia:Help:Contents|Help pages]] are available in [[wp:it:Aiuto:Aiuto|Italian]], [[wp:ru:Википедия:Справка|Russian]] and many other languages. That is where you'll find the most detailed and up-to-date info on editing a MediaWiki wiki.
We won't be giving a detailed course on MediaWiki markup here; just a few basic "how to"s, "do"s and "don't"s that will mostly get you by, when it comes to our wiki. For more details, see the section "[[#Further help|Further help]]" below. Wikimedia's general [[metawikimedia:Help:Help|Help]] is also available in [[wp:it:Aiuto:Aiuto|Italian]] and [[wp:ru:Википедия:Справка|Russian]], as well as many other languages. That is where you'll find the most detailed info on the MediaWiki software.


==Text formatting==
==Text formatting==
Line 11: Line 10:
Underlining text is not as convenient; it requires you to fall back to raw HTML markup:<br />
Underlining text is not as convenient; it requires you to fall back to raw HTML markup:<br />
<code><nowiki><u>Here's the underline tag</u></nowiki></code> gives you <u>Here's the underline tag</u>.
<code><nowiki><u>Here's the underline tag</u></nowiki></code> gives you <u>Here's the underline tag</u>.
Finally, although we have not been in the habit of using it on OniGalore, you can highlight text with the mark tag:<br />
<code><nowiki><mark>Pay attention</mark></nowiki></code> yields <mark>Pay attention</mark>.


===Monospace and unformatted text===
===Monospace and unformatted text===
Line 63: Line 59:
===External links===
===External links===
(1a) Write the following to get some text acting as an ''outgoing'' hyperlink.
(1a) Write the following to get some text acting as an ''outgoing'' hyperlink.
  '''['''<nowiki>http://oni.bungie.org/forum/ here is our forum</nowiki>''']'''
  '''['''<nowiki>https://discord.com/invite/eqDMnkD here is our Discord server</nowiki>''']'''
The result is: [http://oni.bungie.org/forum/ here is our forum]
The result is: [https://discord.com/invite/eqDMnkD here is our Discord server]


(1b) If you omit the label text, the result will be different:
(1b) If you omit the label text, the result will be different:
  Here '''['''<nowiki>http://oni.bungie.org/forum/</nowiki>''']''' is our forum
  here '''['''<nowiki>https://discord.com/invite/eqDMnkD</nowiki>''']''' is our Discord server
The result is: here [http://oni.bungie.org/forum/] is our forum. However, this is not part of our usual style on this wiki. You should always label your links.
The result is: here [https://discord.com/invite/eqDMnkD] is our Discord server. However, this is not our usual style on this wiki; you should always label your links.


(1c) You can also write URLs without any markup. Like this:
(1c) You can also write URLs without any markup. Like this:
:Here is our forum: http://oni.bungie.org/forum/
:Here is our Discord server: https://discord.com/invite/eqDMnkD
Note that external images will appear inline if you use their bare URL like this.
Note that external images will appear inline if you use their bare URL like this.


===Intrawiki links===
===Intrawiki links===
(2a) Write the following to get an ''intrawiki'' link to one of our own pages:
"Intrawiki" refers to links to other pages on this wiki.
 
(2a) Simply write the following to get an intrawiki link:


<nowiki>[[Quotes/Consoles#STURMANDERUNG_:_Final_Stage]]</nowiki>
<nowiki>[[Quotes/Consoles#STURMANDERUNG_:_Final_Stage]]</nowiki>
Line 81: Line 79:
The result is this: [[Quotes/Consoles#STURMANDERUNG_:_Final_Stage]]
The result is this: [[Quotes/Consoles#STURMANDERUNG_:_Final_Stage]]


(2b) Write following to get an ''intrawiki'' link which is labeled with some text:
(2b) Write the following to get an intrawiki link which is labeled with some text:


<nowiki>[[OniSplit#Download_links|You can download OniSplit here]]</nowiki>
<nowiki>[[OniSplit#Download_links|You can download OniSplit here]]</nowiki>
Line 87: Line 85:
The result is this: [[OniSplit#Download_links|You can download OniSplit here]]
The result is this: [[OniSplit#Download_links|You can download OniSplit here]]


This kind of link (2a/2b) spares you from writing '''<nowiki>http://wiki.oni2.net/</nowiki>OniSplit#Download_links'''
This kind of link spares you from writing '''<nowiki>http://wiki.oni2.net/</nowiki>OniSplit#Download_links''', and also allows various features of the wiki to work properly, such as "What links here" and the [[Special:LonelyPages|orphaned pages]] list.
 
====Preview content on link hover====
For this to work you need some unformatted or simple formatted text '''before''' the first section <nowiki>(==section==)</nowiki>. Previewing of images is possible but not documented. (See chapter previews.)
 
Similarly, you can use the H template to show some shortened custom text.
<nowiki>[[link|{{H|hover text|normal text}}]]</nowiki>


===Interwiki links===
===Interwiki links===
You can link to pages on [[wikt:Wiktionary:Main_Page|Wiktionary]], the [[wp:Main_Page|English Wikipedia]] and [[metawikimedia:Main_Page|Meta-Wiki]] as if they were pages of our own wiki, using the shortcuts '''<nowiki>wiktionary:</nowiki>''', '''<nowiki>wikipedia:</nowiki>''' and '''<nowiki>metawikimedia:</nowiki>'''. When you make an interwiki link, the outbound link icon changes from an upward arrow to a sideward arrow to show that you are linking to a fellow wiki, not some random web site.
You can link to pages on wikis in the Wikimedia family, e.g. [[wikt:Wiktionary:Main_Page|Wiktionary]], [[wp:Main_Page|Wikipedia]] and [[metawikimedia:Main_Page|Meta-Wiki]], as if they were pages of our own wiki by adding the shortcuts '''<nowiki>wiktionary:</nowiki>''', '''<nowiki>wikipedia:</nowiki>''' and '''<nowiki>metawikimedia:</nowiki>''' within double brackets. When you make an interwiki link, the outbound link icon changes from an upward arrow to a sideward arrow to show that you are linking to a fellow wiki, not some random web site.


An example of using an interwiki prefix would be '''<nowiki>[[wikipedia:Test]]</nowiki>''', which produces [[wikipedia:Test]] (you can supply alternate text using the syntax '''<nowiki>[[wikipedia:Test|Test]]</nowiki>''' to get rid of that pesky prefix in the final markup: [[wikipedia:Test|Test]]). These prefixes accept language codes, so you could use the markup '''<nowiki>[[wikipedia:de:Test|Test]]</nowiki>''' to link to the German article [[wikipedia:de:Test|Test]] (the URL will appear wrong, but Wikipedia knows what it means).
An example of using an interwiki prefix would be '''<nowiki>[[wikipedia:Test]]</nowiki>''', which produces [[wikipedia:Test]]. You can supply label text using the syntax '''<nowiki>[[wikipedia:Test|Test]]</nowiki>''' to get rid of that pesky prefix in the final markup: [[wikipedia:Test|Test]]. These prefixes accept language codes, so you could use the markup '''<nowiki>[[wikipedia:de:Test|Test]]</nowiki>''' to link to the German article [[wikipedia:de:Test|Test]].


All of the Wikimedia Foundation's projects have prefixes available for linking to them. Also note that we have handy shortcuts for the two most-used prefixes; '''wikipedia:''' can be shortened to '''wp:''' and '''wiktionary:''' can be shortened to '''wikt:'''. The complete list of currently supported interwiki links can be obtained by clicking [https://wiki.oni2.net/w/api.php?action=query&meta=siteinfo&siprop=interwikimap here].
All of the Wikimedia Foundation's projects have prefixes available for linking to them. Also note that we have handy shortcuts for the two most-used prefixes; '''wikipedia:''' can be shortened to '''wp:''' and '''wiktionary:''' can be shortened to '''wikt:'''. The complete list of currently supported interwiki links can be obtained by clicking [https://wiki.oni2.net/w/api.php?action=query&meta=siteinfo&siprop=interwikimap here].
Line 105: Line 97:


==Images and categories==
==Images and categories==
To place an image, you type its name inside of double brackets, preceded by "Image:", e.g. <code><nowiki>[[Image:TXMPPOSTER3.png]]</nowiki></code>. This markup will be replaced by the named image. If you only want to link to the page of an image, you type <code><nowiki>[[:Image:TXMPPOSTER3.png]]</nowiki></code> to get [[:Image:TXMPPOSTER3.png]].
To place an image, you type its name inside of double brackets preceded by "Image:", e.g. <code><nowiki>[[Image:TXMPPOSTER3.png]]</nowiki></code>. This markup will be replaced by the named image. If you only want to link to an image, not display it, you type <code><nowiki>[[:Image:TXMPPOSTER3.png]]</nowiki></code> to get [[:Image:TXMPPOSTER3.png]].


Categories work the same way. Every page on the wiki should be placed into at least one category using this kind of markup at the end of the page: <code><nowiki>[[Category:Policies and documentation]]</nowiki></code>. This will cause the name of the category to appear at the bottom of the page. However, if you only want to link to a category page, not place the current page into that category, you use the same technique as linking to an image page: <code><nowiki>[[:Category:Policies and documentation]]</nowiki></code> gives you [[:Category:Policies and documentation]]. To see what categories are available, you can look at the [[Site Map]].
Categories work the same way. Every page on the wiki should be placed into at least one category using this kind of markup, placed at the end of the page: <code><nowiki>[[Category:Policies and documentation]]</nowiki></code>. This will cause the name of the category to appear at the bottom of the page. However, if you only want to link to a category page, not place the current page into that category, you use the same technique as linking to an image page: <code><nowiki>[[:Category:Policies and documentation]]</nowiki></code> gives you [[:Category:Policies and documentation]]. To see what categories are available, you can look at the [[Site Map]].


==Templates and transclusion==
==Templates and transclusion==
Text can be "transcluded" from one place on the wiki to another using <nowiki>{{this markup}}</nowiki>. Transclusion means that whenever the original text is updated, so is the text inserted in place of the page link enclosed in double-braces. Transclusion is most commonly used in order to place templates on a page. Here's [[:Category:Templates|a list of templates]].  Pick one, and then click on "What links here" once you're on the template page.  You should see a list of pages, each one probably followed by "(transclusion)". Look at the wiki code for those pages to see how the template's text or markup was placed into the page.
Text can be "transcluded" from one place on the wiki to another using <nowiki>{{this markup}}</nowiki>. Transclusion means that whenever the original text is updated, so is the text inserted in place of the page link enclosed in double-braces. Transclusion is most commonly used in order to place templates on a page. [[:Category:Templates|Here's a list of our wiki's templates.]] Click on one, and then click on "What links here": you should see a list of pages, each one probably followed by "(transclusion)". Look at the wiki markup for those pages to see how the template was utilized on the page.
 
Templates are not a special kind of wiki page; they're simply a term that we use to refer to pages that are meant to be transcluded, and which often use magic words (terms with special meaning to the MediaWiki parser) to provide logic (but again, this logic can be used on any page). Templates usually provide a standardized format for something like a table, header or footer, e.g. [[:Template:OBD File Footer]]. You should familiarize yourself with our templates if you plan to do a decent amount of editing; they are not only time-savers but they also help editors make their edits fit in with OniGalore standards, and make it easier to change large amounts of wiki text at once.
 
==Tables==
MediaWiki provides simple markup for creating HTML tables that avoids the need to create lots of <code><nowiki><tr></nowiki></code> and <code><nowiki><td></nowiki></code> tags, though the results are also somewhat more limited than a pure HTML table. To open a table simply write <code><nowiki>{|</nowiki></code>, optionally declare column names with <code><nowiki>!</nowiki></code>, then declare new rows with <code><nowiki>|-</nowiki></code> and new cells within a row with <code><nowiki>|</nowiki></code>. This markup…
<pre>
{|
!Column 1
!Column 2
|-
|R1C1
|R1C2
|-
|R2C1
|R2C2
|}</pre>
 
…produces this table:
{|
!Column 1
!Column 2
|-
|R1C1
|R1C2
|-
|R2C1
|R2C2
|}
 
Normally we apply the class "wikitable" to a table to give it borders and make it look pretty with <code>{| class="wikitable"</code>, though you can do a lot of manual styling for almost any custom look you want (see {{SectionLink||Further help}} to read more about tables).
 
To make the table a fixed width, add this CSS styling to the first line: <code>{| style="width:500px;"</code>. You can also use a percentage such as <code>width:50%;</code>. To center the table on the page, use <code>{| style="[[Template:Center|<nowiki>{{center}}</nowiki>]]"</code>. To right-align it, use <code>"float:right;"</code> instead.
 
You can add styling directives to individual columns, rows and cells like this:
 
<pre>
{| class="wikitable"
!width="200"|Column 1
!Column 2
|- style="font-size:75%;"
|R1C1
|R1C2
|-
|colspan="2" align="center" style="height:40px; background:DarkSeaGreen;" valign="top"|R2C1&2
|}</pre>
 
…which yields:
 
{| class="wikitable"
!width="200"|Column 1
!Column 2
|- style="font-size:75%;"
|R1C1
|R1C2
|-
|colspan="2" align="center" style="height:40px; background:DarkSeaGreen;" valign="top"|R2C1&2
|}
 
For more advanced table markup, see below.


Templates are not a special kind of wiki page; they're simply a term that we use to refer to pages that are meant to be transcluded. Templates usually provide a standardized format for something like a [[:Template:Chapters|table]], or else they supply a standard [[:Template:Cleanup|header]] or [[:Template:OBD_File_Footer|footer]].  You should familiarize yourself with the templates if you plan to do a decent amount of editing; they are not only time-savers, they also help editors make their edits fit in with OniGalore standards, and make it easier to change large amounts of wiki text at once.
==Advanced tricks==
Some of these "tricks" are very simple in practice, but hard to remember. This is basically a list of bookmarks to helpful examples around the wiki:
*Alphabetic footnotes: [[Quotes/Manual]]
*Indenting wrapped text: [[Walkthrough]]
*Justified text: [[Oni2:Aftermath]]
*Math extension usage: [[OBD:SNDD]], [[XML:OBAN]]
*Multicolumn text: [[User:Iritscen]]
*Retitling a page: [[Template:Retitle]]
*Separating footnotes and citations on an article: [[Oni]]
*Tables:
**Advanced styling: [[Template:OBD File Header]]
**Aesthetic designs: [[Template:PoliciesSidebox]], [[Anniversary Edition]]
**Hideable columns: [[OBD:Versions]]
**Multipart tables: [[Rights]]
**Multirow sortable groups: {{SectionLink|Videos|Full playthroughs}}
**Sortable columns: [[Oni 2 (Angel Studios)/Levels]]


==Further help==
==Further help==
Here's some more comprehensive help, straight from the source.
Here's some more comprehensive help, straight from the source.


;[[metawikimedia:Help:Reader|Reading]]
;Reading
:[[metawikimedia:Help:Go button|Go]] | [[metawikimedia:Help:Searching|Search]] | [[metawikimedia:Help:Common words, searching for which is not possible|Stop words]] | [[metawikimedia:Help:URL|URL]] | [[metawikimedia:Help:Namespace|Namespace]] | [[metawikimedia:Help:Page name|Page name]] | [[metawikimedia:Help:Section|Section]]
:[[metawikimedia:Help:Go button|Go]] | [[metawikimedia:Help:Searching|Search]] | [[metawikimedia:Help:URL|URL]] | [[mw:Help:Namespaces|Namespace]] | [[metawikimedia:Help:Page name|Page name]] | [[metawikimedia:Help:Section|Section]] | [[mw:Help:What links here|Backlinks]]
:[[metawikimedia:Help:What links here|Backlinks]] | [[metawikimedia:Help:Link|Link]] | [[metawikimedia:Help:Piped link|Piped link]] | [[metawikimedia:Help:Interwiki linking|Interwiki link]] | [[metawikimedia:Help:Redirect|Redirect]] | [[metawikimedia:Help:Category|Category]] | [[metawikimedia:Help:Image page|Image page]]
:[[metawikimedia:Help:Link|Link]] | [[metawikimedia:Help:Piped link|Piped link]] | [[metawikimedia:Help:Interwiki linking on Wikimedia wikis|Interwiki link]] | [[metawikimedia:Redirects|Redirect]] | [[mw:Help:Categories|Category]] | [[metawikimedia:Help:Image page|Image page]]
;Logging in and preferences
;Logging in and preferences
:[[metawikimedia:Help:Logging in|Logging in]] | [[metawikimedia:Help:Preferences|Preferences]] | [[metawikimedia:Help:User style|User style]]
:[[metawikimedia:Help:Logging in|Logging in]] | [[mw:Help:Preferences|Preferences]] | [[metawikimedia:Help:User style|User style]]
;[[metawikimedia:Help:Editing|Editing]]
;[[mw:Help:Editing pages|Editing]]
:[[metawikimedia:Help:Advanced editing|Advanced editing]] | [[metawikimedia:Help:Editing FAQ|Editing FAQ]] | [[metawikimedia:Help:Edit toolbar|Edit toolbar]] | [[metawikimedia:Help:Export|Export]] | [[metawikimedia:Help:Import|Import]] | [[metawikimedia:Help:Editing shortcuts|Shortcuts]]  
:[[metawikimedia:Help:Advanced editing|Advanced editing]] | [[metawikimedia:Help:Editing FAQ|Editing FAQ]] | [[mw:Editor|Edit toolbar]] | [[mw:Help:Export|Export]] | [[metawikimedia:Help:Import|Import]] | [[metawikimedia:Help:Automatic conversion of wikitext|Shortcuts]]  
;[[metawikimedia:Help:Tracking changes|Tracking changes]]
;[[mw:Help:Tracking changes|Tracking changes]]
:[[metawikimedia:Help:Recent changes|Recent changes]] <small>([[metawikimedia:Help:Enhanced recent changes|enhanced]])</small> | [[metawikimedia:Help:Related changes|Related changes]] | [[metawikimedia:Help:Watching pages|Watching pages]] | [[metawikimedia:Help:Diff|Diff]]
:[[metawikimedia:Help:Recent changes|Recent changes]] <small>([[mw:Help:New filters for edit review|enhanced]])</small> | [[mw:Help:Related changes|Related changes]] | [[mw:Help:Watching pages|Watching pages]] | [[mw:Help:Diff|Diff]]
:[[metawikimedia:Help:Page history|Page history]] | [[metawikimedia:Help:Edit summary|Edit summary]] | [[metawikimedia:Help:User contributions|User contributions]] | [[metawikimedia:Help:Minor edit|Minor edit]] | [[metawikimedia:Help:Patrolled edit|Patrolled edit]]
:[[metawikimedia:Help:Page history|Page history]] | [[metawikimedia:Help:Edit summary|Edit summary]] | [[mw:Help:User contributions|User contributions]] | [[metawikimedia:Help:Minor edit|Minor edit]] | [[mw:Help:Patrolled edits|Patrolled edit]]
;Style & formatting
;Style & formatting
:[[metawikimedia:Help:Wikitext examples|Wikitext examples]] | [[metawikimedia:Help:Reference card|Reference card]] | [[metawikimedia:Help:HTML in wikitext|HTML in wikitext]] | [[metawikimedia:Help:List|List]] | [[metawikimedia:Help:Table|Table]] | [[metawikimedia:Help:Sorting|Sorting]] | [[metawikimedia:Help:Text_color|Colors]]
:[[metawikimedia:Help:Wikitext examples|Wikitext examples]] | [[metawikimedia:Help:Reference card|Reference card]] | [[mw:Help:HTML in wikitext|HTML in wikitext]] | [[mw:Help:Lists|List]] | [[mw:Help:Tables|Table]] | [[metawikimedia:Help:Sorting|Sorting]] | [[metawikimedia:Help:Text_color|Colors]]
;Special input and output
;Special input and output
:[[mw:Extension:Inputbox|Inputbox]] | [[metawikimedia:Help:Special characters|Special characters]] | [[metawikimedia:Help:Displaying a formula|Displaying a formula]] | [[metawikimedia:Help:Images and other uploaded files|Images<small> (uploads)</small>]] | [[mw:Extension:EasyTimeline/syntax|EasyTimeline]]
:[[mw:Extension:InputBox|InputBox]] | [[metawikimedia:Help:Special characters|Special characters]] | [[metawikimedia:Help:Displaying a formula|Displaying a formula]] | [[mw:Help:Images|Images<small> (uploads)</small>]] | [[mw:Extension:EasyTimeline/syntax|EasyTimeline]]
;Advanced functioning
;Advanced functioning
:[[metawikimedia:Help:Template|Template]] | [[metawikimedia:Help:Advanced templates|Advanced templates]] | [[metawikimedia:Help:Parser function|Parser function]] | [[metawikimedia:Help:ParserFunctions|ParserFunctions]] | [[metawikimedia:Help:Parameter default|Parameter default]]
:[[metawikimedia:Help:Template|Template]] | [[metawikimedia:Help:Advanced templates|Advanced templates]] | [[metawikimedia:Help:Parameter default|Parameter default]] | [[mw:Help:Magic_words|Magic word]]
:[[metawikimedia:Help:Variable|Variable]] | [[mw:Help:Magic_words|Magic word]] | [[metawikimedia:Help:System message|System message]] | [[metawikimedia:Help:Substitution|Substitution]] | [[metawikimedia:Help:Array|Array]] | [[metawikimedia:Help:Calculation|Calculation]]
:[[mw:Help:Extension:ParserFunctions|ParserFunctions]] | [[mw:Help:Substitution|Substitution]] | [[metawikimedia:Help:Array|Array]] | [[metawikimedia:Help:Calculation|Calculation]] | [[mw:Help:System message|System message]]
;Page management
;Page management
:[[metawikimedia:Help:Starting a new page|Starting a new page]] | [[metawikimedia:Help:Moving a page|Renaming (moving) a page]] | [[mw:Manual:Administrators#Protection|Protecting pages]] | [[metawikimedia:Help:Deleting a page|Deleting a page]]
:[[mw:Help:Starting a new page|Starting a new page]] | [[metawikimedia:Help:Moving a page|Renaming (moving) a page]] | [[mw:Manual:Administrators#Protection|Protecting pages]] | [[mw:Help:History#Deleting a page|Deleting a page]]
;[[metawikimedia:Help:Special page|Special pages]]
;[[metawikimedia:Help:Special page|Special pages]]
:[[metawikimedia:Help:Talk page|Talk page]] | [[metawikimedia:Help:Testing|Testing]] | [[Test|Sandbox]]
:[[metawikimedia:Help:Talk page|Talk pages]]




[[Category:Policies and documentation]]
[[Category:Policies and documentation]]