Help:Editing

From GPWiki
Jump to: navigation, search

Contents

The Golden Rules

  1. Please refer to the MediaWiki formatting manual if you are unsure of how to do something.
  2. Please use the sandbox page to do any tests so that regular pages are not disrupted.

Posting Conventions

All Edits

=This would be a major heading.=

==This would be a sub-heading.==

===This would be a sub-subheading.===

Adding a New Page

<noinclude>
{{Warning_Template}}
{{Note:Use|use=INSTRUCTIONS FOR USE}}
</noinclude>
This will keep the wiki consistent, automatically add the new template to the template category, and tell others what purpose your template can be used for

Modifying an Existing Page

Game Programming Wiki Features

GPWiki has some special extra features in addition to the standard MediaWiki markup.

Syntax Highlighting

When posting code, be sure to enclose all code blocks with <syntaxhighlight type="language"> or <source type="language"> tags. This will cause your code block to be displayed with syntax highlighting.

Example:

<syntaxhighlight type="java">
Guy bob = new Guy();
if (somethingHappened == false) {
    bob.yawn();
}
</syntaxhighlight>

Or

<source type="java">
Guy bob = new Guy();
if (somethingHappened == false) {
    bob.yawn();
}
</source>


Result:

Guy bob = new Guy();
if (somethingHappened == false) {
    bob.yawn();
}


In the language parameter you can select from an extensive list of languages such as:

See the Generic Syntax Highlighter website for the complete list.

Math

GPWiki uses LaTeX to generate images for better representation of mathematical formulae as images.

Example:

<math>
\begin{Bmatrix}
x & y & a\\
y & u & b\\
z & v & c
\end{Bmatrix}
</math>

Result

\begin{Bmatrix}
x & y & a\\
y & u & b\\
z & v & c
\end{Bmatrix}


Another Example

<math>\sum_{k=1}^N k^2</math>

Result
\sum_{k=1}^N k^2

The resulting image is cached after being rendered for the first view. You may have to force a browser refresh when adjusting the markup to see the result.

See MediaWiki's Formula Help for advanced techniques.

Templates

Templates are a powerful feature of MediaWiki. Some are simple chunks of markup, some take arguments and some simply modify the way pages are handled.

All templates are invoked by using the {{TEMPLATE_NAME|ARGUMENTS}} syntax.

The following templates are available for use:

Stub

Use Stub if a page needs to have more information added. This will automatically put the page in the stubs category.

Example:

{{Stub}}

Result:

40px-sprout.png   This article is a stub. You can help out by expanding it.


Markup Fix

Use this template to add a page to the Category:Pages with Broken Markup category.

Example:

{{MarkupFix}}

Result:

40px-broken-icon.png   This page has broken markup.
If you fix this problem, please remove this banner.


Deprecated

Use this template to highlight out of date code. The information in the article may still be useful, but it is generally better to direct people to the latest information.

Example:

{{Deprecated|BETTER_PAGE}}

Result:

40x-binary.png The source code or techniques discussed in this article may be deprecated.
Please see BETTER_PAGE for a better solution.


Forum Banners

Use these templates to link your user page to your forum profile.

Example:

{{GPWiki User|FORUM_ID_HERE}}

Result:

GPWiki Logo 64px.png   This user is also a GPWiki forums user.


Example:

{{Gamedev User|FORUM_ID_HERE}}

Result:

Gamedev Logo 64px.png   This user is also a gamedev.net user.


TipBox

Example:

{{TipBox|Peanut butter goes well with strawberry jam.}}

Result:

GUITutorial info.gif Tip
Peanut butter goes well with strawberry jam.


InformationBox

Example:

{{InformationBox|Snapples provide an entire day's worth of your recommended tin intake.}}

Result:

GUITutorial info.gif Information
One snapple provides an entire day's worth of your recommended tin intake.


NoticeBox

Example:

{{NoticeBox|Never mix coffee and relish.}}

Result:

GUITutorial warn.gif Notice
Never mix coffee and relish.


Icons

GPWiki has a range of icons that are used to keep table sizes down and add a splash of colour to articles. Using the icons templates rather than linking to images means that updating the icons across the whole wiki is much easier.


Amazon Book Info Lookup

GPWiki's Amazon Book Info lookup feature produces an info box using Amazon web services when given an ASIN-10 ID number as an argument. This number is listed on the product details on each Amazon page.

Example:

{{#AmazonBookInfo:0735619670}}
Code Complete: A Practical Handbook of Software Construction, Second Edition
51nWkLCu1SL._SL160_.jpg Author: Steve McConnell
Publisher: Microsoft Press
Published: 2004-07-07
Pages: 960
Edition: 2nd
Amazon Product Page

Note, this template will normally float to the right of the page.


If the book title is very long and spoils the layout, you can specify a shorter title as a second argument.

{{#AmazonBookInfo:0735619670|Code Complete 2}}
Code Complete 2
51nWkLCu1SL._SL160_.jpg Author: Steve McConnell
Publisher: Microsoft Press
Published: 2004-07-07
Pages: 960
Edition: 2nd
Amazon Product Page
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox