Help:Editing

From Pikipedia, the Pikmin wiki
Revision as of 04:00, September 28, 2016 by Espyo (talk | contribs)
Jump to navigation Jump to search

This article or section needs to be cleaned up, either its format or general style.
Notes: This should be as basic as possible, as to not overwhelm users new to wikis. Images and tables will help clarify, and getting rid of advanced info, like magic words, will certainly be better.

This page is a reference and a tutorial for Mediawiki code, which is the code used on this Wiki. Should there be something that you cannot find here, but want explained, ask here.

Basic Code

These are the most basic and most used pieces of code.

For italicizing and bolding text, use 2 or 3 apostrophes:

''this is italic''
'''this is bold'''
'''''this is both italic and bold'''''

The "gallery" tags create a gallery of images:

<gallery>
File:first image
File:second image|this one has a caption
File:last image
</gallery>

To make a line across the page, use four hyphens:

----

To indent a paragraph of text, start the line with a colon. Use more to indent further:

Normal text
:An indented line
::A line indented twice

To create a bulleted list, just start lines with asterisks:

*This line is the first bullet point.
*This will become the second.

A numbered list is similar, but with # symbols instead:

#Point number one.
#This line is numbered '2.'.

Bulleted and numbered lists can be combined for more complicated lists. Experiment to see how they work in combination.

To display plain text that is pre-formatted, preserving the line breaks it has, use the <pre> tag:

<pre>Everything in here
retains the line breaks
it has.</pre>

To embed a video (see Help:Files#Videos for more details):

{{#ev:service|id}}

To have a page automatically redirect to a different one, use:

#REDIRECT[[redirect location]]

If a display of wiki coding is wanted, use the "nowiki" HTML-like tag around the code. The following produces the text "[[Main Page]]" rather than creating a link:

<nowiki>[[Main Page]]</nowiki>

If you do not wish to include something on a page but want it on another page that includes that page, add "includeonly" tags around the code:

<includeonly>code to be included only</includeonly>

Similarly, information in "noinclude" tags is only displayed on the original page:

<noinclude>this is not included in pages that include this one</noinclude>

As well as this, a fair amount of HTML is functional. Tags such as <span> and <div> can be given a style attribute to add some CSS, in the form <span style="CSS here"/>content</span>.

Linking

To add an internal link (that is, to another page in Pikipedia), enclose the page name in double square parentheses. Correct capitalization is required for every letter but the first:

[[insert page name here]]

To change the text that is displayed, a pipe character is used to separate the link and text shown:

[[actual page name|displayed text]]

It is also possible to link to a specific section of a page. For that, add a number sign and then the name of the section, like this:

[[article name#name of section]]

To link to a page in another wiki, place its interwiki prefix at the start of the link. This prefix is not necessarily the wiki's title; a full list can be found at Special:Interwiki. Pikmin Fanon's main page, for example, is found here:

[[fanon:Main Page]]

External Links

To add an external link (a link to a website outside of NIWA, MediaWiki, Wikipedia and a few others), use single square parentheses. It is necessary to include the prefix (http://, https://, ftp://, irc://, etc.):

[http://web_address]

Again, it is possible to change the displayed text. This time, however, simply leave a space between the address and the text. The following example displays Google link:

[http://google.com Google link]

Media

This includes images and audio files. To include them on pages, link to them as you would an article. As with categories, adding a colon before the namespace creates a link rather than showing the media.

  • To show an image:
[[File:image name]]
  • To link to the description page of an image.
[[:File:image name]]
  • To link to the image file itself rather than the description page:
[[Media:image name]]

Arguments

As with links, arguments are separated by pipe ("|") characters, all placed within the square brackets. For starters, it is possible to display the image at a different width. This measurement requires a unit: use pixels, abbreviated "px".

  • To show an image at a width of 300 pixels:
[[File:image name|300px]]

To display a frame around an image, pass frame as an argument; images included like this cannot be resized. To give an image a frame and resize it, you want a thumbnail: use thumb. By default, thumbnails are displayed at the size set in the user's preferences (or the original image size, if smaller), so it is recommended not to define a width.

Images with frames can be given captions, by passing the text of the caption to display as an extra argument.

  • Thumbnail image with the caption "this is an image":
[[File:image name|thumb|this is an image]]

The alignment of images is important to the layout of the page. The default value for this argument is none, which leaves the image "inline": it is displayed in line with text in the same paragraph. Images with frames, on the other hand, are "floated" right by default: float images with left or right, to make text and other inline or floated elements of the page flow around the image. Finally, center centers an image on the page, making text before and after it leave a gap to either side, instead of flowing around.

  • Centred image with a width of 350 pixels:
[[File:image name|350px|center]]
  • Image in a frame, displayed in line with text, with the caption "inline image":
[[File:image name|frame|none|inline image]]

The order of arguments is flexible, to some degree; measurements are interpreted as widths, for example. Follow the examples throughout this section for a guide as to what can work, and if the result isn't looking like you expected, try switching arguments around.

Categories

If you want to add a page to a category, simply add:

[[Category:Category name]]

If you want to make a link to a category and don't want to add the page to that specific category, add a colon in front of "Category". For example, to link to Category:2-Player Locations, type:

[[:Category:2-Player Locations]]

Tables

Main article: Help:Tables.

Magic words

So-called "magic words" are pieces of code that affect the layout of a page; here are a few of the commoner ones. Note that there are two underscores on either side of each:

Code Effect
__NOTOC__ Hides the table of contents (ToC)
__TOC__ Forces the ToC to appear where the word is placed
__FORCETOC__ Forces the ToC to appear in the normal place for a page with any number of sections
__NOEDITSECTION__ Removes 'edit' links on sections
__NOGALLERY__ Replaces image thumbnails with links in categories
__END__ Forces the page to end there, allowing extra lines at the end of the page
__HIDDENCAT__ Hides category the word is placed on from the footer of pages in it

Templates and inclusions

Any page can be included in another page by way of enclosing it in double curly parentheses. Write the page name as you would in a link. This includes everything on that other page wherever the code is put:

{{namespace:Page name to be included}}

When a number of pages need similar information or layouts, templates are used, which are pages in the Template namespace created to be included in other pages. They make pages shorter and remove complex code, and allow many pages to be altered at the same time. If a namespace is not supplied in the inclusion code, Template is used by default; to include a page in the main namespace, use {{:Page name}}.

It is possible to pass information to templates when including them, which make the content displayed different. These are either named or numbered, and used as follows:

{{Template name|a piece of information|another piece of information}}

In the template, these are referred to as "{{{1}}}", "{{{2}}}" and so on, and can be put anywhere, as if they were text or code. For example, the following template, included as above, would display "This template contains a piece of information and another piece of information.":

This template contains {{{1}}} and {{{2}}}.

These can be named to make things easier to follow:

Template:

My name is {{{name}}} and I am {{{age}}} years old.

Code:

{{Template name|name=Bob|age=5}}

Result:

My name is Bob and I am 5 years old.

Signatures

How to sign a post

To sign your name at the end of your posts, type four tildes.

~~~~, for me, produces Prezintenden 20:35, 29 January 2008 (UTC)

Three tildes will only display your signature without the time, and five will only show the time without your sig.

Custom signatures

To make a custom signature, first make a subpage to your userpage called "User:yourname/sig"; this can be done by adding /sig to the URL in the address bar while at your userpage. On that page, you can add a link to your userpage if you like, and edit your username as you want it to appear in your signature, maybe adding colour, a picture, or a link to your talk page.

After you fixed up your custom sig to your liking, you now (quite obviously) want to display it. To do so, save your creation, then go to your preferences screen in the upper right hand corner. In the "Nickname" field (right under your email address), add {{SUBST:User:yourname/sig}}, make sure that "Custom signature" is checked, and save. Now when you sign your name, your sig should be replaced by your custom sig.

Note that this now makes it possible to write {{User:yourname/sig}} on a talk page. This will "update" your signature on pages if you perform changes to your sig. This will not display time, though, but adding ~~~~~ will make up for that if you wish.

Pikipedia standards

Main article: Pikipedia:Policies and guidelines.
  • If an article is seriously lacking in vital information, call it a stub by putting {{stub}} at the top of the page.
  • Articles that contain a fair amount of content but have layout problems, are badly written or have any other serious problem should be added to the "Clean it up" category by adding {{clean}} to the top of the page.
  • Articles that qualify for deletion can be submitted for it by adding {{delete|reason goes here}} to the page. Reasons an article would need to be deleted can be found at Pikipedia:Pages for deletion.
  • Images that are screenshots must contain the text {{screenshot}} to add a copyright notice and categorize them. For other image tags and general file information, see Help:Files.