Help:Contents: Difference between revisions

From PZwiki
(adjusted colouring)
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{languages}}
{| role="presentation" width=80% style="text-align:center;" cellspacing=10
==Creating a Page==
| valign="top" colspan="2" | <!--
===Using links===
####################
If you or any other contributor create a link to an article that does not exist yet, the link will be colored red, <span style="color: #ba0000">like this</span>.<br>
### NAVIGATION  ###
 
####################
Clicking a red link will take you to the edit page for the new article. Simply type your text, click save and the new page will be created.<br>
-->{{Languages}}{{Tutorial navigation}}
 
|- valign="top"
Once the page has been created, the link will automatically change from red to blue (or purple for pages you've already visited) indicating that the article now exists.
| width=50% style="text-align:right" |<!--
 
####################
Usually this is the best way to create a new page, because it means that right from the start, the page will be linked from at least one other place on the wiki (and typically you will want to mesh it into other related pages later).<br>
### LEFT COLUMN  ###
 
####################
If you are creating a new page without creating any link to it, you may need to ask yourself: Does this page really fit in with the topics already covered in the wiki? <br>
-->
 
<span style="float: left;">[[File:ScholarSpiffo.png|250px|link=]]</span><span style="font-size:150%">'''Welcome to the<br>Zomboid help articles'''</span>
Also, how are you expecting visitors to find this page? Normally there is no reason to create a page without first creating a red link to it.
----
 
Project Zomboid's complete guide to wiki editing
=== From the search box ===
 
If you search for a page that doesn't exist (using the search box in the top right of the page) then you will be provided with a link to create the new page.
[[File:Sg1.PNG|thumb|500px|left]] <br clear=all>
 
=== Using the URL ===
 
You can also use a URL for creating a new page. The URL to an article of the wiki usually looks like this: &nbsp;
 
<code><nowiki>https://pzwiki.net/wiki/</nowiki>'''ARTICLE'''</code> &nbsp;
 
If you replace <code>'''ARTICLE'''</code> with the name of the page you want to create, you will be taken to a blank page, indicating that no article of that name exists yet.
 
Clicking the "Create" Tab at the top right of the page (next to the search function) will then take you to the edit page for that article, where you can create the new page by typing your text, and clicking submit.
 
 
==Page Format==
There are a variety of formats we use within the wiki to ensure there is consistency between each page type.
 
===Boilerplates===
[[:Category:Boilerplates|Boilerplates]] are premade page templates that should be used as a starting place when creating new pages. You can think of them as being forms where you ultimately just fill in the blanks.
 
Each boilerplate contains a ''language'' bar, ''header'' bar and ''infobox/image''.


* ''[[Template:Languages|language]]'' bar — Adds a list of languages that the page can be found in;
New to wiki editing?
** Placed at the top of every page that is in more than one language;
** Example:
<pre>{{Languages|Main Page}}</pre>
::Will produce:
{{Languages|Main Page}}


* ''[[Template:Header|header]]'' bar — Adds ''category navigation'', ''version updated'' and a ''background'' to the page.
<span style="font-size:125%">'''[[Help:Editing for beginners|Get Started]]'''</span>
** Should be placed at the top of the page, under the language bar, all other content should be added below this;
** '''category navigation''' — Displays the categorical path within the navigational network;
** '''version updated''' — Displays the version the article was last updated on, while also adding it to the version category, used to easily identify outdated articles;
** '''background''' — Presents the article within a type defined background colour.
** Example:
<pre>{{header|The Game World|Items|Consumables|Food|Perishable Food|type=Food|version=Version 39|incver=58}}</pre>
::Will produce:<br><br>
{{header|The Game World|Items|Consumables|Food|Perishable Food|type=Food|version=Version 39|incver=58|hidecat=true}}
A whole page's worth of content in here.</div><br>


{{Items|image=Image.png |weight=?}}
{| width=100% style="background-color: #F0EEDE; margin-top:6px; border: black solid 1px;" cellspacing=0
* ''[[:Category:Infobox|infobox]]'' — Is a fixed-format table added to the top right-hand corner of articles to consistently present a summary of some unifying aspect that the articles share;
|-  
** Example: <code><nowiki>{{</nowiki>Items|image=Image.png |weight=?}}</code>
| colspan="2" style="text-align: center; font-size: 150%; color:#FFF; background: #000;"| <div class="header" style="align: center;"><small>'''Advanced resources'''<br></small> </div>
::Will produce: (displayed on the far right)<br><br><br><br><br>
|- style="vertical-align:top; text-align:left;"
 
| style="width:50%; height:65px; padding: 5px;"|
* ''image'' — Is very similar to the infobox, except it does not display information and will only contain an image and a caption;
:[https://www.mediawiki.org/wiki/Help:Templates Writing templates]
** Used on pages that don't have an infobox, or just simply need an image, such as in [[:Category:Guides|Guides]].
:[https://www.mediawiki.org/wiki/Help:Magic_words Magic words]
** Example:  
| style="width:50%; padding: 5px;"|
{| style="float:right; border:1px solid FFFFFF;margin:.46em 0 0 .2em"
:[https://www.mediawiki.org/wiki/Help:Namespaces Namespaces]
|- style="font-size:100%"
:[https://www.mediawiki.org/wiki/Help:Special_pages Special pages]
| valign="top" |[[Image:Image.png]]<!--
  --><br> ''Text that would go below the image.''
|}
|}
<pre>
| width=50% | <!--
{| style="float:right; border:1px solid FFFFFF;margin:.46em 0 0 .2em"
####################
|- style="font-size:100%"
### RIGHT COLUMN ###
| valign="top" |[[Image:Image.png]]<!--
####################
  --><br> ''Text that would go below the image.''
-->
{| width=100% style="background-color: #F0EEDE; margin-top:6px; border: black solid 1px;" cellspacing=0  
|-  
| colspan="2" style="text-align: center; font-size: 150%; color:#FFF; background: #000;"| <div class="header" style="align: center;"><small>'''PZwiki editing'''<br></small> </div>
|- style="vertical-align:top; text-align:left;"
| style="width:50%; padding: 5px;"|  
:[[Help:Editing for beginners|Editing for beginners]]
:[[Help:Editing pages|Editing pages]]
:[[Help:Creating a new page|Creating a new page]]
:[[Help:Formatting|Formatting]]
| style="width:50%; padding: 5px;"|
:[[Help:Links|Links]]
:[[Help:Images|Images]]
:[[Help:Tables|Tables]]
:[[PZwiki:Style guide|Style guide]]
|}
|}
</pre>
{| width=100% style="background-color: #F0EEDE; margin-top:18px; border: black solid 1px;" cellspacing=0
:: Will produce: (displayed on the far right)<br><br><br><br>
|-
 
| colspan="2" style="text-align: center; font-size: 150%; color:#FFF; background: #000;"| <div class="header" style="align: center;"><small>'''Basic resources'''<br></small> </div>
===Other formats===
|- style="vertical-align:top; text-align:left;"
Boilerplates are currently the standard formats used within the wiki. However not all page types have their dedicated boilerplate, or you (the editor) may be unsure which boilerplates to use.
| style="width:50%; padding: 5px;"|  
 
:[https://www.mediawiki.org/wiki/Help:Editing_pages Editing pages]
Rather than leaving it empty, we ask that you add these if unsure what to add.
:[https://www.mediawiki.org/wiki/Help:Formatting Formatting]
* ''[[Template:VersionNotice|Version Notice]]'' — Displays the version the article was last updated on, while also adding it to the version category;
:[https://www.mediawiki.org/wiki/Help::Links Links]
** This is the bare minimum of what ''should'' be added to any page created, as it allows us to identify which pages might be outdated.
:[https://www.mediawiki.org/wiki/Help:Images Images]
** Should be added at the top of the page, under the ''language bar''.
:[https://www.mediawiki.org/wiki/Help:Tables Tables]
** Example: <code><nowiki>{{</nowiki>VersionNotice|version=Version 39|incver=58}}</code>
:[https://www.mediawiki.org/wiki/Help:Starting_a_new_page Starting a new page]
:: Will produce:
| style="width:50%; padding: 5px;"|  
::: ''Note: This page was updated with [[Version history|Version 39.58]] of Project Zomboid in mind. If the page turns out to be outdated please add an outdated [[Template:Notice|Notice]] banner.''
:[https://www.mediawiki.org/wiki/Help:Subpages Subpages]
* ''[[:Category:Main|Category]]'' — Adds the article to the designated category (seen at the bottom of the page);
:[https://www.mediawiki.org/wiki/Help:Moving_a_page Moving (renaming) a page]
** Pick any one or more categories that you believe fit the page.
:[https://www.mediawiki.org/wiki/Help:Categories Categories]
** Example: <code><nowiki>[[</nowiki>Category:Tools]]</code> will add the page to the [[:Category:Tools|Tools]] category.
:[https://www.mediawiki.org/wiki/Help:Talk_pages Talk pages]
* ''[[Template:Notice|Notice]]'' box — Adds a notice box indicating what is either wrong with the page, or what the page is about.
:[https://www.mediawiki.org/wiki/Help:Cite References]
** Should be added at the top of the page, under the ''language bar'' and ''boilerplate''.
:[[wikipedia:Wikipedia:Manual of style|Manual of style]]
** Example: <code><nowiki>{{</nowiki>Notice|Short}}</code>
:: Will produce:
{{NoticeBox|1|#0af|file=Notepad.png|width=32px|height=32px|desc=This article may '''need more content'''. Editors are encouraged to add new material to the page while expanding upon current topics.}}
* Other templates:
** ''[[Template:RecipeLookup|Recipe Lookup]]'' — Displays all recipe indexes, with instructions on how to add new recipes.
** ''[[Template:About|About]]'' — Used for disambiguation, directing the reader to another page they may have been looking for instead.
 
 
== Formatting ==
 
You can format your text by using wiki markup. This consists of normal characters like asterisks, apostrophes or equal signs which have a special function in the wiki, sometimes depending on their position. For example, to format a word in ''italic'', you include it in two pairs of apostrophes like <code><nowiki>''this''</nowiki></code>.
 
=== Text formatting markup ===
 
{| class="wikitable"
! width=10% |Description
! width=45% | You type
! width=45% | You get
|-
! colspan="3" style="background: #CFCFCF" | Character (inline) formatting – ''applies anywhere''
|-
| Italic text
| <pre>
''italic''
</pre>
|
''italic''
|-
| Bold text
| <pre>
'''bold'''
</pre>
|
'''bold'''
|-
| Bold and italic
| <pre>
'''''bold & italic'''''
</pre>
|
'''''bold & italic'''''
 
|-
| Escape wiki markup
| <pre>
&lt;nowiki&gt;no ''markup''&lt;/nowiki&gt;
</pre>
|
<nowiki>no ''markup''</nowiki>
|-
! colspan="3" style="background: #CFCFCF" | Section formatting – ''only at the beginning of the line''
|-
| Section Headings of different levels
| <pre>
 
== Level 2 ==
 
=== Level 3 ===
 
===== Level 4 =====
 
====== Level 5 ======
 
======== Level 6 ========
 
</pre>
|
<!-- HTML to avoid creating new sections again -->
 
<h2>Level 2</h2>
 
<h3>Level 3</h3>
 
<h4>Level 4</h4>
 
<h5>Level 5</h5>
 
<h6>Level 6</h6>
 
|-
| Horizontal rule
| <pre>
Text before
----
Text after
</pre>
|
Text before
----
Text after
|-
| Bullet list
|
<pre>
 
 
* Start each line
* with an asterisk (*).
** More asterisks give deeper
*** and deeper levels.
* Line breaks <br />don't break levels.
*** But jumping levels creates empty space.
Any other start ends the list.
 
 
* combine bullet list
** with definition
::- definition
** creates empty space
 
* combine bullet list
** with definition
*:- definition
** without empty spaces
*bullet list
:- definition
:* sublist that doesn't create empty
:* spaces after definition
 
</pre>
|
 
* Start each line
* with an (*).
** More asterisks give deeper
*** and deeper levels.
* Line breaks <br />don't break levels.
*** But jumping levels creates empty space.
Any other start ends the list.
* combine bullet list
** with definition
::- definition
** creates empty space
* combine bullet list
** with definition
*:- definition
** without empty spaces
*bullet list
:- definition
:* sublist that doesn't create empty
:* spaces after definition
 
|-
| Definition list
| <pre>
 
;item 1
: definition 1
;item 2
: definition 2-1
: definition 2-2
 
</pre>
|
 
;item 1
: definition 1
;item 2
: definition 2-1
: definition 2-2
 
|-
| Indent text
| <pre>
 
: Single indent
:: Double indent
::::: Multiple indent
 
</pre>
 
|
 
: Single indent
:: Double indent
::::: Multiple indent
 
|-
| Mixture of different types of list
|
<pre>
 
 
# one
# two
#* two point one
#* two point two
# three
#; three item one
#: three def one
# four
#: four def one
#: this looks like a continuation
#: and is often used
#: instead <br />of &lt;nowiki><br />&lt;/nowiki>
# five
## five sub 1
### five sub 1 sub 1
## five sub 2
 
</pre>
 
|
 
# one
# two
#* two point one
#* two point two
# three
#; three item one
#: three def one
# four
#: four def one
#: this looks like a continuation
#: and is often used
#: instead <br />of <nowiki><br /></nowiki>
# five
## five sub 1
### five sub 1 sub 1
## five sub 2{{anchor|pre}}
 
|-
|  Preformatted text
| <pre>
 
 
Start each line with a space.
Text is '''preformatted''' and
''markups'' '''''can''''' be done.
 
</pre>
 
|
 
Start each line with a space.
Text is '''preformatted''' and
''markups'' '''''can''''' be done.
 
|-
|  Preformatted text blocks
| <pre>
<nowiki><nowiki>Start with a space in the first column,
(before the <nowiki>).
 
Then your block format will be
    maintained.
This is good for copying in code blocks:
 
 
def function():
    """documentation string"""
 
 
if True:
        print True
    else:
        print False</nowiki></nowiki>
</pre>
|
<nowiki>Start with a space in the first column,
(before the <nowiki>).
 
 
Then your block format will be
    maintained.
 
 
This is good for copying in code blocks:
 
 
def function():
    """documentation string"""
 
   
if True:
        print True
    else:
        print False</nowiki>
|}
|}
 
|- style="vertical-align:top;"
 
| colspan="2" | <!--
=== Paragraphs ===
####################
 
### FOOTER      ###
MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tag <code>&lt;br /></code>.
####################
 
-->''PZWiki uses [https://www.mediawiki.org/wiki/MediaWiki MediaWiki] wiki software, further help using the software can be found on the [https://www.mediawiki.org/wiki/Help:Contents contents] page.''
=== HTML tags ===
 
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <code>&lt;code></code>, <code>&lt;div></code>, <code><nowiki><span></nowiki></code> and <code><nowiki><font></nowiki></code>. These apply anywhere you insert them.
 
{| class="wikitable"
! Description
! width=40% | You type
! width=40% | You get
|-
| Inserted <br />(Displays as underline in most browsers)
| <pre>
<ins>Inserted</ins>
 
or
 
<u>Underline</u>
</pre>
|
<ins>Inserted</ins>
 
or
 
<u>Underline</u>
|-
| Deleted <br />(Displays as strikethrough in most browsers)
| <pre>
<s>Struck out</s>
 
or
 
<del>Deleted</del>
 
</pre>
|
<s>Struck out</s>
 
or
 
<del>Deleted</del>
|-
| Fixed width text
| <pre>
<code>Source code</code>
 
or
 
<code>Fixed width text</code>
</pre>
|
<code>Source code</code>
 
or
 
<code>Fixed width text</code>
|-
| Blockquotes
| <pre>
Text before
<blockquote>Blockquote</blockquote>
Text after
</pre>
|
Text before
<blockquote>Blockquote</blockquote>
Text after
|-
| Comment
| <pre>
<!-- This is a comment -->
Comments are visible only
in the edit zone.
</pre>
|
 
<!-- This is a comment -->
Comments are visible only
in the edit zone.
 
|-
| Completely preformatted text
| <pre>
<pre>
Text is '''preformatted''' and
''markups'' '''''cannot''''' be done&lt;/pre>
</pre>
 
|
<pre>
Text is '''preformatted''' and
''markups'' '''''cannot''''' be done
</pre>
|-
| '''Customized''' preformatted text
| <pre>
<pre style="color: red">
Text is '''preformatted'''
with a style and
''markups'' '''''cannot''''' be done
&lt;/pre>
</pre>
 
|
<pre style="color: red">
Text is '''preformatted'''  
with a style and
''markups'' '''''cannot''''' be done
</pre>
|}
|}
==Images==
===Suppоrted media types for images===
The following file formats are suppоrted by default:
*.jpg or .jpeg : bitmap image compressed in the standard JPEG format (this lossy format is most suitable for photographs).
*.png : bitmap image in the Portable Network Graphics format (specified by the W3 Consortium).
*.gif : bitmap image in the legacy Graphics Interchange Format.
===Rendering a single image===
====Syntax====
The full syntax for displaying an image is:
<pre>[[File:filename.extension|options|caption]]</pre>
where options can be zero or more of the following, separated by pipes <code>|</code>:
* ''Format'' option: one of border and/or frameless, frame, thumb (or thumbnail);
** Controls how the rendered image is formatted and embedded in the rest of the page.
* ''Resizing'' option: one of
** ''{width}'''''px''' — Resizes the image to fit within the given maximum width in pixels, without restricting its height;
** '''x'''''{height}'''''px''' — Resizes the image to fit within the given maximum height in pixels, without restricting its width;
** ''{width}'''''x'''''{height}'''''px''' — Resizes the image to fit within the given width and height in pixels;
** '''upright''' — Resizes an image to fit within reasonable dimensions, according to user preferences (suitable for images whose height is larger than width).
:: Note that the image will always retain its aspect ratio, and can only be reduced (not increased) in size unless it's in a scalable media type (bitmap images cannot be scaled up).
:: The default maximum size depends on the ''format'' and the internal image dimensions (according to its media type).
* ''Horizontal alignment'' option: one of '''left''', '''right''', '''center''', '''none''';
** Controls the horizontal alignment (and inline/block or floating styles) of the image within a text (no default value).
* ''Vertical alignment'' option: one of '''baseline''', '''sub''', '''super''', '''top''', '''text-top''', '''middle''', '''bottom''', '''text-bottom''';
** Controls the vertical alignment of a non-floating inline image with the text before or after the image, and in the same block (the default vertical alignment is '''middle''').
* ''Link'' option: one of
** link={target} — Allows to change the target (to an arbitrary page title, or URL) of the generated link, activatable on the rendered image surface; e.g. <code><nowiki>[[File:Image.png|20px|link=http://www.wikipedia.org]]</nowiki></code> renders as [[File:Image.png|20px|link=http://www.wikipedia.org]] (external link), or <code><nowiki>[[</nowiki>File:Image.png|20px|link=Main_Page]]</code> renders as [[File:Image.png|20px|link=Main_Page]] (internal link).
** link= (with an empty value) — Displays an image without any activatable link; e.g. <code><nowiki>[[</nowiki>File:Image.png|20px|link=]]</code> renders as [[File:Image.png|20px|link=]].
*** If you set <code>|link=|</code> (empty), then no title will be rendered.
==External Links==
* [https://www.mediawiki.org/wiki/Help:Formatting Format]
* [https://www.mediawiki.org/wiki/Help:Images Images]
* [https://www.mediawiki.org/wiki/Help:Tables Tables]
* [https://www.mediawiki.org/wiki/Help:Links Links]
* [https://www.mediawiki.org/wiki/Help:Lists Lists]


[[Category:Help]]
[[Category:Help]]

Revision as of 16:37, 11 April 2019