Difference between revisions of "UniWiki:Templates"

From EVE University Wiki
Jump to: navigation, search
(Merge content from Wiki How To Guide, beginning rework)
(Listing most common templates)
Line 16: Line 16:
 
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.
  
 +
=== Maintenance templates ===
 +
These templates are used to mark pages which need attention - either because they're short, need cleanup, are outdated, should be deleted, and so forth. They are usually placed at the top of a page (although you can place them in the middle of a page, to indicate that there is a particular section of a page needing attention). Adding one of these templates to a page automatically puts the page in a special [[Special:Categories|Category]], making it easy to find all the outdated pages, for instance (in order to fix them, obviously! :) ).
  
 +
;<code>{{t|Cleanup}}</code>
 +
:Indicates that the page needs to be cleaned up or improved; use this template to mark pages which have a lot of spelling errors, unwieldy layout, or which generally look very unfinished. All pages tagged with this template are automatically added to the [[:Category:Candidates for Cleanup|Candidates for Cleanup]] category.
  
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.''' }}
+
;<code>{{t|Stub}}</code>
In order to include a template, place the template name between two pairs of curly brackets:
+
:Use this template on pages which are short and which you feel should be expanded. All pages thus marked as "stubs" are automatically added to the [[:Category:Stubs|Stubs]] category.
<pre><nowiki>{{Cleanup}}</nowiki></pre>
 
  
Some templates allow variable input. {{Example|The example template for example!}}
+
;<code>{{t|Work in Progress}}</code>
 +
:Use this template to mark a page which you are currently working on, as a way of letting other Wiki editors know that someone is busy editing or expanding the page. Don't forget to take it off after you're done!  
  
You simply put a pipe character after the template name and then put the text. A new pipe for each variable:
+
;<code>{{t|Merge}}</code>
<pre><nowiki>{{Example|The example template for example!}}</nowiki></pre>
+
:If you see two articles on a similar subject, and you think they should be combined into one article, then feel free to go ahead and do so! If, however, you're unsure and would like to discuss it with other editors, use this template. Alternatively, you can always discuss it on the [http://forum.eveuniversity.org/viewforum.php?f=54 E-UNI forum].
  
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.
+
;<code>{{t|Deletion}}</code>
 +
:Only Wiki admins are allowed to permanently delete pages from the Wiki. If there's a page which you think is superfluous, abusive, was created by accident etc, put this template on the page, and an admin will soon get around to deleting it.  
  
==== Cleanup ====
+
=== Ship templates ===
<pre><nowiki>{{Cleanup}}</nowiki></pre>
+
Ships are at the core of EVE, and so it's no surprise that the UniWiki has some beautiful templates for describing ships and their fittings.  
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 ====
+
;<code>{{t|ShipFitting}}</code>
<pre><nowiki>{{Deprecated}}</nowiki></pre>
+
:Use this template to add a new ship fitting to a page. As there are a myrid different ways of fitting a ship in EVE, this template needs a lot of parameters; check the template documentation for details on how to use it. For an example of how the template looks when in use, take a look at any ship page on the wiki (for instance, a [[Rifter#Fitting|Rifter]]).  
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 ====
+
;<code>{{t|ShipArticle}}</code>, <code>{{t|Ship}}</code>, and others
<pre><nowiki>{{Deletion}}</nowiki></pre>
+
:These templates form the heart of the UniWiki's ship database. They are highly complex but produce beautiful ship overviews - and you probably won't need to use them until CCP rebalances ships in the next expansion to EVE.  
Used for pages that were created by accident, empty categories, blank pages, or abusive articles that are better off removed entirely.
 
  
==== Merge ====
+
=== Skill templates ===
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==
+
;<code>{{t|Skill}}</code>
===Skills===
+
:This template is used to produce the skill summary boxes for the [http://wiki.eveuniversity.org/w/index.php?title=Special%3APrefixIndex&prefix=Skills%3A&namespace=0 UniWiki skill listings].  
The whole of the skills code is in one template that should be used.
 
  
'''Listing Skills on Overview:'''
+
;<code>{{t|Sk}}</code>
<pre><nowiki>*[[Skills:Group#Skill_Name|Skill Name]]</nowiki></pre>
+
:Use this template when you would like to link to a skill from another page, as it makes it easy to find the correct link, and show additional information about the skill (such as its multiplier or the cost of the skill book).  
-First letter of each word is capital.
 
  
-First part, before the "|", has a "_" between the words.
+
=== Topic index templates and infoboxes ===
  
-Second part, after the "|", has a "space" between the words.
+
You will find these infoboxes and navigation boxes on many pages (including this one - see that black bar at the top?), as they are handy for navigating between pages on similar topics, or for showing key information about a page at a glance. If you're writing or editing a page, check to see if there is a template which you can use to better integrate your page with other similar pages. Some of the more common ones are:
 +
* <code>{{t|On-Going Events}}</code>, <code>{{t|Member Services}}</code>, and <code>{{t|EVE University}}</code> for pages about the E-UNI and its members and services.
 +
* <code>{{t|Infobox class}}</code>, used on class pages.
 +
* <code>{{t|Incursion sites}}</code> and <code>{{t|Incursions links}}</code> on pages about incursions.
 +
* <code>{{t|Wormhole Links}}</code> on pages about wormholes.
 +
* <code>{{t|ExplorationNavbox}}</code> on pages about exploration.
 +
* <code>{{t|ShipsMatrix}}</code>, a list of all the ships in the UniWiki ships database.
  
''Example:''
+
=== Formatting templates ===
<pre><nowiki>*[[Skills:Armor#Armor_Layering|Armor Layering]]</nowiki></pre>
 
  
'''Creating/Modifying Skill links in skill description's prerequisites'''
+
These templates are designed to harmonise the design of the different pages on the UniWiki, and allow editors to re-use style elements without having to go to the trouble of re-coding them for every page.
<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.
+
;<code>{{t|Hatnote}}</code>
 +
:If there is a more comprehensive page on the subject you're writing about, use this template to insert a note at the top of the paragraph, letting the reader know that more detailed information is available elsewhere, if she's interested. The templates <code>{{t|Main}}</code> and <code>{{t|See also}}</code> are variants, with more specific wording.  
  
''Example:''
+
;<code>{{t|Box}}</code>
<pre><nowiki>|pre=[[Skills:Engineering#CPU_Management|CPU Management I]] <- Correct way
+
:Use this template to insert a coloured box into an article, to highlight an piece of information, or as a building block for a more complex diagram or infobox.
|pre=[[Skills:Engineering#CPU_Management|CPU Management]] I <- Incorrect way
 
</nowiki></pre>
 
  
-Skill name is listed with "space" between words (if needed), not "_".
+
;<code>{{t|Co}}</code> and <code>{{t|Color}}</code>
 +
:Want to use different-coloured text in your article? These templates can make that happen.  
  
-Attributes are written with capital on first letter, being the Major the one that contributes the most, and Minor the one that contributes less.
+
=== Boilerplate messages ===
  
''Example''
+
Sometimes there's a piece of text which needs to be re-used over and over again - a classic case for a template. <code>{{t|Syllabus}}</code> and <code>{{t|SyllabusReviewed}}</code> are two common examples from the class pages.  
<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===
Line 127: Line 90:
 
#Click "Show preview"
 
#Click "Show preview"
 
#If all looks correct, click save page
 
#If all looks correct, click save page
 
  
 
[[Category:Wiki Information]]
 
[[Category:Wiki Information]]
 
[[Category:Wiki Contributions]]
 
[[Category:Wiki Contributions]]

Revision as of 11:55, 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.

Maintenance templates

These templates are used to mark pages which need attention - either because they're short, need cleanup, are outdated, should be deleted, and so forth. They are usually placed at the top of a page (although you can place them in the middle of a page, to indicate that there is a particular section of a page needing attention). Adding one of these templates to a page automatically puts the page in a special Category, making it easy to find all the outdated pages, for instance (in order to fix them, obviously! :) ).

{{Cleanup}}
Indicates that the page needs to be cleaned up or improved; use this template to mark pages which have a lot of spelling errors, unwieldy layout, or which generally look very unfinished. All pages tagged with this template are automatically added to the Candidates for Cleanup category.
{{Stub}}
Use this template on pages which are short and which you feel should be expanded. All pages thus marked as "stubs" are automatically added to the Stubs category.
{{Work in Progress}}
Use this template to mark a page which you are currently working on, as a way of letting other Wiki editors know that someone is busy editing or expanding the page. Don't forget to take it off after you're done!
{{Merge}}
If you see two articles on a similar subject, and you think they should be combined into one article, then feel free to go ahead and do so! If, however, you're unsure and would like to discuss it with other editors, use this template. Alternatively, you can always discuss it on the E-UNI forum.
{{Deletion}}
Only Wiki admins are allowed to permanently delete pages from the Wiki. If there's a page which you think is superfluous, abusive, was created by accident etc, put this template on the page, and an admin will soon get around to deleting it.

Ship templates

Ships are at the core of EVE, and so it's no surprise that the UniWiki has some beautiful templates for describing ships and their fittings.

{{ShipFitting}}
Use this template to add a new ship fitting to a page. As there are a myrid different ways of fitting a ship in EVE, this template needs a lot of parameters; check the template documentation for details on how to use it. For an example of how the template looks when in use, take a look at any ship page on the wiki (for instance, a Rifter).
{{ShipArticle}}, {{Ship}}, and others
These templates form the heart of the UniWiki's ship database. They are highly complex but produce beautiful ship overviews - and you probably won't need to use them until CCP rebalances ships in the next expansion to EVE.

Skill templates

{{Skill}}
This template is used to produce the skill summary boxes for the UniWiki skill listings.
{{Sk}}
Use this template when you would like to link to a skill from another page, as it makes it easy to find the correct link, and show additional information about the skill (such as its multiplier or the cost of the skill book).

Topic index templates and infoboxes

You will find these infoboxes and navigation boxes on many pages (including this one - see that black bar at the top?), as they are handy for navigating between pages on similar topics, or for showing key information about a page at a glance. If you're writing or editing a page, check to see if there is a template which you can use to better integrate your page with other similar pages. Some of the more common ones are:

Formatting templates

These templates are designed to harmonise the design of the different pages on the UniWiki, and allow editors to re-use style elements without having to go to the trouble of re-coding them for every page.

{{Hatnote}}
If there is a more comprehensive page on the subject you're writing about, use this template to insert a note at the top of the paragraph, letting the reader know that more detailed information is available elsewhere, if she's interested. The templates {{Main}} and {{See also}} are variants, with more specific wording.
{{Box}}
Use this template to insert a coloured box into an article, to highlight an piece of information, or as a building block for a more complex diagram or infobox.
{{Co}} and {{Color}}
Want to use different-coloured text in your article? These templates can make that happen.

Boilerplate messages

Sometimes there's a piece of text which needs to be re-used over and over again - a classic case for a template. {{Syllabus}} and {{SyllabusReviewed}} are two common examples from the class pages.

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