Difference between revisions of "UniWiki:Templates"

From EVE University Wiki
Jump to: navigation, search
(→‎Templates on the UniWiki: Template documentation)
(Merge content from Wiki How To Guide, beginning rework)
Line 5: Line 5:
 
== Creating and editing templates ==
 
== Creating and editing templates ==
 
Anyone can create or edit templates; it works just like editing pages! More advanced templates can take advantage of some programming capabilities, which can look daunting at first glance. Fortunately, Wikipedia has an excellent page on [https://en.wikipedia.org/wiki/Help:Template getting started with templates], which covers both basic and advanced templates.  
 
Anyone can create or edit templates; it works just like editing pages! More advanced templates can take advantage of some programming capabilities, which can look daunting at first glance. Fortunately, Wikipedia has an excellent page on [https://en.wikipedia.org/wiki/Help:Template getting started with templates], which covers both basic and advanced templates.  
 +
 +
== Using templates ==
 +
You can insert by encasing its name in curly brackets. For instance, if you would like to mark a page as "needing cleanup", add the code <code><nowiki>{{Cleanup}}</nowiki></code> to the page, which produces the following:
 +
{{Cleanup}}
 +
 +
Some templates can be used with parameters to customise how they look. For instance, you can use the template <code>{{t|Example}}</code> to mark an example on a page. You pass parameters to templates by using the pipe character | . <code><nowiki>{{Example|This is an example of how a template can look (how very meta!)}}</nowiki></code> produces the following:
 +
{{Example|This is an example of how a template can look (how very meta!)}}
  
 
== Templates on the UniWiki ==  
 
== Templates on the UniWiki ==  
 
There are a [http://wiki.eveuniversity.org/w/index.php?title=Special%3AAllPages&from=&to=&namespace=10 large number of templates] available for use on the UniWiki. This page lists the most common ones, along with tips on how best to use them. Some templates are trivially easy to use, whilst others can be customised with large numbers of parameters. Luckily, each template should include a documentation section (for an example, take a look at the <code>{{t|skill}}</code> template), which explains what the template is for, and how to use it.
 
There are a [http://wiki.eveuniversity.org/w/index.php?title=Special%3AAllPages&from=&to=&namespace=10 large number of templates] available for use on the UniWiki. This page lists the most common ones, along with tips on how best to use them. Some templates are trivially easy to use, whilst others can be customised with large numbers of parameters. Luckily, each template should include a documentation section (for an example, take a look at the <code>{{t|skill}}</code> template), which explains what the template is for, and how to use it.
 +
 +
 +
 +
Templates allow us to automatically format information a certain way. For example, the Clean Up template always looks like this: {{Color box|color=#2B547E|border=#2B3856|'''This article should be cleaned up or improved.''' }}
 +
In order to include a template, place the template name between two pairs of curly brackets:
 +
<pre><nowiki>{{Cleanup}}</nowiki></pre>
 +
 +
Some templates allow variable input. {{Example|The example template for example!}}
 +
 +
You simply put a pipe character after the template name and then put the text. A new pipe for each variable:
 +
<pre><nowiki>{{Example|The example template for example!}}</nowiki></pre>
 +
 +
We have several templates that we use at the moment, see the [[:Category:Template|template category]] for the full collection. We'll discuss some of the more common maintenance templates here.
 +
 +
==== Cleanup ====
 +
<pre><nowiki>{{Cleanup}}</nowiki></pre>
 +
Indicates that this article needs to be cleaned up/improved. Mark articles with the Cleanup template if they contain a lot of spelling errors, unwieldy layout, etc.
 +
 +
==== Deprecated ====
 +
<pre><nowiki>{{Deprecated}}</nowiki></pre>
 +
Indicates that this article is no longer required and is no longer being maintained. Depreciated pages may be reused or edited into something useful.
 +
 +
==== Deletion ====
 +
<pre><nowiki>{{Deletion}}</nowiki></pre>
 +
Used for pages that were created by accident, empty categories, blank pages, or abusive articles that are better off removed entirely.
 +
 +
==== Merge ====
 +
Indicates that the contents of an article is duplicated somewhere else. Duplication of information will almost certainly lead to inconsistencies when changes are applied to only a part of the duplicate information, and as such should be avoided at all cost. Instead, articles should link to one another to reference information. If you find articles that have significant duplicate information, mark them with the Merge template. The Merge template takes one argument, the name of the other article containing the duplicate information:
 +
<pre><nowiki>{{Merge|Second Wiki How To Guide}}</nowiki></pre>
 +
 +
==Uni Specific==
 +
===Skills===
 +
The whole of the skills code is in one template that should be used.
 +
 +
'''Listing Skills on Overview:'''
 +
<pre><nowiki>*[[Skills:Group#Skill_Name|Skill Name]]</nowiki></pre>
 +
-First letter of each word is capital.
 +
 +
-First part, before the "|", has a "_" between the words.
 +
 +
-Second part, after the "|", has a "space" between the words. 
 +
 +
''Example:''
 +
<pre><nowiki>*[[Skills:Armor#Armor_Layering|Armor Layering]]</nowiki></pre>
 +
 +
'''Creating/Modifying Skill links in skill description's prerequisites'''
 +
<pre><nowiki>{{Skill
 +
|skill=Name
 +
|desc=Description
 +
|1=Major Attribute
 +
|2=Minor Attribute
 +
|mult=Multiplierx
 +
|price=32K
 +
|pre=[[Skills:Engineering#CPU_Management|CPU Management I]]
 +
|notes=Notes
 +
}}</nowiki></pre>
 +
-Skill coding is the same as used for the Overview (that's why they all have to be the same).
 +
 +
-Skill level needed should be included inside the brackets.
 +
 +
''Example:''
 +
<pre><nowiki>|pre=[[Skills:Engineering#CPU_Management|CPU Management I]] <- Correct way
 +
|pre=[[Skills:Engineering#CPU_Management|CPU Management]] I <- Incorrect way
 +
</nowiki></pre>
 +
 +
-Skill name is listed with "space" between words (if needed), not "_".
 +
 +
-Attributes are written with capital on first letter, being the Major the one that contributes the most, and Minor the one that contributes less.
 +
 +
''Example''
 +
<pre><nowiki>|1=Intelligence
 +
|2=Memory</nowiki></pre>
 +
 +
-Training multiplier is written a number+x
 +
 +
''Example''
 +
<pre><nowiki>
 +
|mult=1x
 +
</nowiki></pre>
 +
 +
-Price were changed to be coherent across all skill pages. Do not put "ISK" after the price as it will show "ISK ISK" on the wiki. Values have been changed to power of ten nomenclature, therefore K=thousand, M=million, B=billion. There's no need to put "~" before the price to indicate it's approximately, as all prices are a good approximation of the in-game prices. If there's a value range, put "-" between the two numbers, without "spaces", and add the K, M, or B after the last number. The correct fraction denominator is "." and not ",".
 +
 +
''Example''
 +
<pre><nowiki>
 +
|price=32K <- Correct
 +
|price=32.5M <- Correct
 +
|price=20-25.5B <- Correct
 +
 +
|price=32,000 <- Incorrect
 +
|price=32,5M <- Incorrect
 +
|price=~20-25.5B <- Incorrect
 +
|price=20 - 25.5B <- Incorrect
 +
|price=20B-25.5B <- Incorrect
 +
|price=32K ISK <- Incorrect
 +
</nowiki></pre>
 +
 +
Maintaining this pattern is very important because it allows the use of a Code Editing software to more easily and timely modify the skills on the wiki should CCP decide to make any more changes.
 +
 +
You will see that almost all (if not all) skills are properly edited to reflect that. In case of doubt, check a few skills above and below. In case of more doubt, check these examples. :)
 +
 +
===Fits===
 +
Fits can easily be converted from EFT to wiki using an [http://eve.sonicreality.x10.mx/template/ automated tool].
 +
 +
====Adding to Ship Pages====
 +
#Make sure you are logged in
 +
#Navigate to the ship page (eg [[Bantam]])
 +
#On the contents, click "4 Fitting"
 +
#Click "<nowiki>[EDIT]</nowiki>" in the right of the "Fitting" header
 +
#Copy the wikicode from the [http://eve.sonicreality.x10.mx/template/ automated tool]
 +
#Paste right at the '''end''' of the edit box
 +
#Click "Show preview"
 +
#If all looks correct, click save page
 +
  
 
[[Category:Wiki Information]]
 
[[Category:Wiki Information]]
 
[[Category:Wiki Contributions]]
 
[[Category:Wiki Contributions]]

Revision as of 10:34, 28 November 2013

Template:Contribution menu

This page is a work in progress.

This article or section is in the process of an expansion or major restructuring. You are welcome to assist in its construction by editing it as well.
If this article or section has not been edited in several days, please remove this template.

Templates are pages on the Wiki which are designed to be included in other pages. They are normally used for repetitive material (such as text and information boxes, icons, or standard messages). Using templates not only saves having to copy parts of pages to other pages, but they ensure a consistent style throughout the Wiki.

Creating and editing templates

Anyone can create or edit templates; it works just like editing pages! More advanced templates can take advantage of some programming capabilities, which can look daunting at first glance. Fortunately, Wikipedia has an excellent page on getting started with templates, which covers both basic and advanced templates.

Using templates

You can insert by encasing its name in curly brackets. For instance, if you would like to mark a page as "needing cleanup", add the code {{Cleanup}} to the page, which produces the following:

This article should be cleaned up or improved. The reason is: unspecified

Some templates can be used with parameters to customise how they look. For instance, you can use the template {{Example}} to mark an example on a page. You pass parameters to templates by using the pipe character | . {{Example|This is an example of how a template can look (how very meta!)}} produces the following:

This is an example of how a template can look (how very meta!)

Templates on the UniWiki

There are a large number of templates available for use on the UniWiki. This page lists the most common ones, along with tips on how best to use them. Some templates are trivially easy to use, whilst others can be customised with large numbers of parameters. Luckily, each template should include a documentation section (for an example, take a look at the {{skill}} template), which explains what the template is for, and how to use it.


Templates allow us to automatically format information a certain way. For example, the Clean Up template always looks like this:

This article should be cleaned up or improved.

In order to include a template, place the template name between two pairs of curly brackets:

{{Cleanup}}

Some templates allow variable input.

The example template for example!

You simply put a pipe character after the template name and then put the text. A new pipe for each variable:

{{Example|The example template for example!}}

We have several templates that we use at the moment, see the template category for the full collection. We'll discuss some of the more common maintenance templates here.

Cleanup

{{Cleanup}}

Indicates that this article needs to be cleaned up/improved. Mark articles with the Cleanup template if they contain a lot of spelling errors, unwieldy layout, etc.

Deprecated

{{Deprecated}}

Indicates that this article is no longer required and is no longer being maintained. Depreciated pages may be reused or edited into something useful.

Deletion

{{Deletion}}

Used for pages that were created by accident, empty categories, blank pages, or abusive articles that are better off removed entirely.

Merge

Indicates that the contents of an article is duplicated somewhere else. Duplication of information will almost certainly lead to inconsistencies when changes are applied to only a part of the duplicate information, and as such should be avoided at all cost. Instead, articles should link to one another to reference information. If you find articles that have significant duplicate information, mark them with the Merge template. The Merge template takes one argument, the name of the other article containing the duplicate information:

{{Merge|Second Wiki How To Guide}}

Uni Specific

Skills

The whole of the skills code is in one template that should be used.

Listing Skills on Overview:

*[[Skills:Group#Skill_Name|Skill Name]]

-First letter of each word is capital.

-First part, before the "|", has a "_" between the words.

-Second part, after the "|", has a "space" between the words.

Example:

*[[Skills:Armor#Armor_Layering|Armor Layering]]

Creating/Modifying Skill links in skill description's prerequisites

{{Skill
|skill=Name
|desc=Description
|1=Major Attribute 
|2=Minor Attribute
|mult=Multiplierx
|price=32K 
|pre=[[Skills:Engineering#CPU_Management|CPU Management I]]
|notes=Notes
}}

-Skill coding is the same as used for the Overview (that's why they all have to be the same).

-Skill level needed should be included inside the brackets.

Example:

|pre=[[Skills:Engineering#CPU_Management|CPU Management I]] <- Correct way
|pre=[[Skills:Engineering#CPU_Management|CPU Management]] I <- Incorrect way

-Skill name is listed with "space" between words (if needed), not "_".

-Attributes are written with capital on first letter, being the Major the one that contributes the most, and Minor the one that contributes less.

Example

|1=Intelligence 
|2=Memory

-Training multiplier is written a number+x

Example

|mult=1x

-Price were changed to be coherent across all skill pages. Do not put "ISK" after the price as it will show "ISK ISK" on the wiki. Values have been changed to power of ten nomenclature, therefore K=thousand, M=million, B=billion. There's no need to put "~" before the price to indicate it's approximately, as all prices are a good approximation of the in-game prices. If there's a value range, put "-" between the two numbers, without "spaces", and add the K, M, or B after the last number. The correct fraction denominator is "." and not ",".

Example

|price=32K <- Correct 
|price=32.5M <- Correct 
|price=20-25.5B <- Correct

|price=32,000 <- Incorrect 
|price=32,5M <- Incorrect 
|price=~20-25.5B <- Incorrect
|price=20 - 25.5B <- Incorrect
|price=20B-25.5B <- Incorrect
|price=32K ISK <- Incorrect

Maintaining this pattern is very important because it allows the use of a Code Editing software to more easily and timely modify the skills on the wiki should CCP decide to make any more changes.

You will see that almost all (if not all) skills are properly edited to reflect that. In case of doubt, check a few skills above and below. In case of more doubt, check these examples. :)

Fits

Fits can easily be converted from EFT to wiki using an automated tool.

Adding to Ship Pages

  1. Make sure you are logged in
  2. Navigate to the ship page (eg Bantam)
  3. On the contents, click "4 Fitting"
  4. Click "[EDIT]" in the right of the "Fitting" header
  5. Copy the wikicode from the automated tool
  6. Paste right at the end of the edit box
  7. Click "Show preview"
  8. If all looks correct, click save page