Wikia

LyricWiki

Changes: Help:Templates

Edit

Back to page

m (listing Covered once should be enough...)
m (Robot: Automated text replacement (-Wikipedia +WP-Song))
Line 24: Line 24:
 
}}</pre>
 
}}</pre>
  
'''''NOTE:''''' Like all pages on LyricWiki, templates are case-sensitive, '''except''' the first letter of the template name. Therefore, '''&#123;{Wikipedia}}''' and '''&#123;{wikipedia}}''' will produce the same result, but '''&#123;{WikiPedia}}''' won't.
+
'''''NOTE:''''' Like all pages on LyricWiki, templates are case-sensitive, '''except''' the first letter of the template name. Therefore, '''&#123;{WP-Song}}''' and '''&#123;{wikipedia}}''' will produce the same result, but '''&#123;{WikiPedia}}''' won't.
  
  
==Wikipedia==
+
==WP-Song==
'''All LyricWiki articles''' for which a [http://en.wikipedia.org Wikipedia] page exists should include a link to that page. The {{tl|ArtistHeader}}, {{tl|Album}} and {{tl|SongFooter}} templates have parameters for producing such a link. Here are some additional options:
+
'''All LyricWiki articles''' for which a [http://en.wikipedia.org WP-Song] page exists should include a link to that page. The {{tl|ArtistHeader}}, {{tl|Album}} and {{tl|SongFooter}} templates have parameters for producing such a link. Here are some additional options:
 
   
 
   
 
===Floating Box===
 
===Floating Box===
A floating box containing the article link and the Wikipedia graphic.
+
A floating box containing the article link and the WP-Song graphic.
  
For example, the Wikipedia template:
+
For example, the WP-Song template:
<pre>{{Wikipedia|Country (film)|Country}}</pre>
+
<pre>{{WP-Song|Country (film)|Country}}</pre>
 
produces:
 
produces:
{{Wikipedia|Country (film)|Country}}
+
{{WP-Song|Country (film)|Country}}
 
{{Clear}}
 
{{Clear}}
In this example, the first division holds the template's '''name''' (in this case, Wikipedia), followed by two divisions that specify information for completing the template.  The second division specifies the name of the Wikipedia '''article''' being linked to.  In this case, "Country" wouldn't be specific enough to link to the film's article, so "Country (film)" must be used.  The final division specifies the '''title''' that LyricWiki users will see, i.e. "Country".
+
In this example, the first division holds the template's '''name''' (in this case, WP-Song), followed by two divisions that specify information for completing the template.  The second division specifies the name of the WP-Song '''article''' being linked to.  In this case, "Country" wouldn't be specific enough to link to the film's article, so "Country (film)" must be used.  The final division specifies the '''title''' that LyricWiki users will see, i.e. "Country".
  
See the [[Template:Wikipedia|template documentation]] for more information.
+
See the [[Template:WP-Song|template documentation]] for more information.
  
 
'''''NOTE:'''''
 
'''''NOTE:'''''
*For song pages, the {{tl|WP-Song}} template is preferred over {{tl|Wikipedia}}.
+
*For song pages, the {{tl|WP-Song}} template is preferred over {{tl|WP-Song}}.
*For [[:Category:Hometown|country, state and hometown categories]], {{tl|WP-Flag}} can be used instead of {{tl|Wikipedia}}. This will display the country's flag instead of the Wikipedia globe.
+
*For [[:Category:Hometown|country, state and hometown categories]], {{tl|WP-Flag}} can be used instead of {{tl|WP-Song}}. This will display the country's flag instead of the WP-Song globe.
  
 
===Simple Text===
 
===Simple Text===
A simple text link to a Wikipedia page can be created using the {{tl|wp}} template:
+
A simple text link to a WP-Song page can be created using the {{tl|wp}} template:
 
<pre>{{wp|Article name|display text}}</pre>
 
<pre>{{wp|Article name|display text}}</pre>
  
All parameters of the {{tl|wp}} are the same as for the {{tl|Wikipedia}} template. For example, this text...
+
All parameters of the {{tl|wp}} are the same as for the {{tl|WP-Song}} template. For example, this text...
<pre>Read about {{wp|Country (film)|Country}} on Wikipedia.</pre>
+
<pre>Read about {{wp|Country (film)|Country}} on WP-Song.</pre>
 
...produces the following result:
 
...produces the following result:
  
Read about {{wp|Country (film)|Country}} on Wikipedia.
+
Read about {{wp|Country (film)|Country}} on WP-Song.
  
 
===Simple Text with Icon===
 
===Simple Text with Icon===
The template {{tl|wpi}} is similar to the simple text link above but is preceded by a Wikipedia icon:
+
The template {{tl|wpi}} is similar to the simple text link above but is preceded by a WP-Song icon:
<pre>Read about {{wpi|Country (film)|Country}} on Wikipedia.</pre>
+
<pre>Read about {{wpi|Country (film)|Country}} on WP-Song.</pre>
 
...produces the following result:
 
...produces the following result:
  
Read about {{wpi|Country (film)|Country}} on Wikipedia.
+
Read about {{wpi|Country (film)|Country}} on WP-Song.
  
 
==Song Flagging==
 
==Song Flagging==
Line 91: Line 91:
 
*ru (Russian)
 
*ru (Russian)
 
*zh (Chinese)
 
*zh (Chinese)
A complete Wikipedia list of ISO 639-1 language codes can be found {{wp|List of ISO 639-1 codes|here}}.
+
A complete WP-Song list of ISO 639-1 language codes can be found {{wp|List of ISO 639-1 codes|here}}.
  
 
===Instrumental Tracks===
 
===Instrumental Tracks===
Line 170: Line 170:
  
 
==External linking==
 
==External linking==
* Link to Wikipedia:
+
* Link to WP-Song:
** Floating box with Wikipedia icon: {{tl|Wikipedia}}
+
** Floating box with WP-Song icon: {{tl|WP-Song}}
** Floating box with Wikipedia icon, for song pages: {{tl|WP-Song}}
+
** Floating box with WP-Song icon, for song pages: {{tl|WP-Song}}
 
** Text-only link: {{tl|wp}}
 
** Text-only link: {{tl|wp}}
 
* External links section, for
 
* External links section, for

Revision as of 01:56, July 16, 2009

Contents


General Information

Templates are provided to reduce the amount of repetitive wikitext in pages. Templates are a sort of shorthand, to make creating and editing wiki pages easier. Templates also help to make LyricWiki visually more uniform. Templates are placed within two sets of curly brackets, or braces, {{}} and contain one or more divisions of information.

If the template has more than one division, each division is separated by a vertical line, or pipe |. The first division contains the name of the template, followed by any number of divisions containing information that are used to complete the template. More often, the template uses named parameters to make the order irrelevant and the parameters optional.

This page contains a listing of all frequently used and useful templates available on LyricWiki. If you find a template to be missing, please insert it at the appropriate location in the list. For documentation and use of the template, please refer to the template page.

Templates without much information are usually formatted as:

{{Name|Division Two|Division Three}}

Templates containing more information are usually formatted as:

{{Name
|Division Two 
|Division Three 
|Division Four 
|Named Parameter One = value 
|Named Parameter Two = value 
}}

NOTE: Like all pages on LyricWiki, templates are case-sensitive, except the first letter of the template name. Therefore, {{WP-Song}} and {{wikipedia}} will produce the same result, but {{WikiPedia}} won't.


WP-Song

All LyricWiki articles for which a WP-Song page exists should include a link to that page. The {{ArtistHeader}}, {{Album}} and {{SongFooter}} templates have parameters for producing such a link. Here are some additional options:

Floating Box

A floating box containing the article link and the WP-Song graphic.

For example, the WP-Song template:

{{WP-Song|Country (film)|Country}}

produces:

Wikipedia sphere
Wikipedia has an article on

In this example, the first division holds the template's name (in this case, WP-Song), followed by two divisions that specify information for completing the template. The second division specifies the name of the WP-Song article being linked to. In this case, "Country" wouldn't be specific enough to link to the film's article, so "Country (film)" must be used. The final division specifies the title that LyricWiki users will see, i.e. "Country".

See the template documentation for more information.

NOTE:

Simple Text

A simple text link to a WP-Song page can be created using the {{wp}} template:

{{wp|Article name|display text}}

All parameters of the {{wp}} are the same as for the {{WP-Song}} template. For example, this text...

Read about {{wp|Country (film)|Country}} on WP-Song.

...produces the following result:

Read about Country on WP-Song.

Simple Text with Icon

The template {{wpi}} is similar to the simple text link above but is preceded by a WP-Song icon:

Read about {{wpi|Country (film)|Country}} on WP-Song.

...produces the following result:

Read about Wikipedia16 Country on WP-Song.

Song Flagging

Multiple Languages

In the case that a song is released in more than one language, it is recommended that links to the other versions of the lyrics be added. The {{Multiple Languages}} template makes this task easier.

{{Multiple Languages
|Artist=V6
|Song=Change The World
|Original=ja
|Lang1=en
|Lang2=es
}}

The above completed template produces: Template:Multiple Languages Common language codes are:

  • de (German)
  • en (English)
  • es (Spanish)
  • fr (French)
  • ja (Japanese)
  • ko (Korean)
  • pl (Polish)
  • ru (Russian)
  • zh (Chinese)

A complete WP-Song list of ISO 639-1 language codes can be found here.

Instrumental Tracks

Tracks that are instrumentals should be marked with the {{Instrumental}} template inside the lyric tags:

<lyrics>{{Instrumental}}</lyrics>

This template only has one division, its name. It produces the following:

Informational templates

  • Information about the song: {{SInfo}}
  • General information box: {{Info}}
  • Instrumental song: {{Instrumental}}
  • Cover version of a song:
    • {{Cover}} for a link to the original song
    • {{Cover2}} for a link to the cover version
    • {{Covered}} for a collapsible list of artists who have covered the song
  • Additional albums song released on: {{AddAlb}}
  • Parody of another song: {{Parody}}
  • Unplugged (Acoustic) album: {{Unplugged}}
  • Remix of original song: {{Remix}}
  • {{GameFeature}}
  • {{tl|Live Lyrics))
  • {{No.1}}

Awards

  • (Grammy) award: {{Award}} (or specifically: {{Grammy}}).
  • Album Of The Week: {{AOTW}}
  • Song Of The Day: {{SOTD}}

Flagging for Edits

  • General request for editing: {{Edit}}
  • When possible, please use one of the following instead:

Artist Pages

See Help:Contents/Editing/Formatting/Artists for more information.

  • To display an album picture next to a track listing insert the {{Album Art}} template directly under the album's title:
{{Album Art|IMAGE|ALBUM NAME}}

IMAGE is generally in the form ARTIST - ALBUM NAME.jpg

  • When {{Album Art}} invades into an album listing below it, use {{Clear}} after that album listing to prevent the invasion. {{Clear}} inserts a division break.
  • {{ft}} for listing featured artists
  • {{H4}} for formatting headers for individual discs
  • {{Labels}}
  • {{tl|Genres))

Multiple languages

  • Songs released in more than one language: {{Multiple Languages}}
  • To provide a translation side by side with the original lyrics: {{Translation}}
  • Request for translation to English: {{RequestTranslation}}
  • Request for romanization of foreign alphabet: {{RequestRomanization}}
  • Request to add lyrics written in Kanji: {{RequestKanji}}
  • For pages with Japanese titles to provide reading and translation: {{JaTitle}}
  • For pages with Chinese titles to provide reading and translation: {{ChineseTitle}}

User (talk) pages

  • Welcome to LyricWiki message: {{Welcome}}
  • Welcome to LyricWiki and invitation to register for unregistered users: {{WelcomeIP}}
  • Reverted edit: {{Reverted}} (for inappropriate but good-faith edits)
  • Vandalism warning: {{WarnUser}} or {{WarnUser/Editing}} (for users who are clearly committing vandalism)
  • {{ArchNav}}: for archive talk pages

User pages

Wiki restrictions

External linking

  • Link to WP-Song:
    • Floating box with WP-Song icon: {{WP-Song}}
    • Floating box with WP-Song icon, for song pages: {{WP-Song}}
    • Text-only link: {{wp}}
  • External links section, for

Administration

A template is a special type of page that has been designed so its content can be included in other pages. Since a given template can be included in many pages, it can help reduce duplication and promote a uniform style between pages.

Templates are usually located in the Template namespace. This includes any page with a name beginning with Template:, such as Template:Name.

Video overview

If you're new to templates, this video will help you get started.


Why use templates?

Templates can be useful for...

  • Creating content that should appear on many pages.
  • Formatting content (such as infoboxes) in a way that should be consistent across many pages.
  • Creating a shortcut for writing things that you repeat often when communicating with others.
  • Replacing long, complicated code so that a page is easier for other users to edit.
  • Protecting parts of a page from editing while leaving other sections open for edits.

How to create a basic template

Templates can be very powerful, but also sometimes very complicated. It often helps to start by creating the simplest possible kind of template, and then experimenting from there.

  • Type "Hello, World" in the editor.
  • Click "Publish." You have just created a template with some sample content.
  • On your wiki, create a new article called "Testing templates".
  • In the editor, go to Source mode and enter the following code:
{{Example}}
  • Click Publish. Your "Testing Templates" page should display the text you added to your template.

You've successfully created and used a template! Now you can change the content of your template and add it to more pages to make it more useful for your wiki.

Adding and editing pre-existing templates

Templates-rightrail

Wikis come with pre-loaded default templates. You can view a complete list of templates available on your wiki by going to Special:AllPages and selecting "Template" from the namespace dropdown menu. Click "Go" and all available templates will appear in a list.

  • In the Visual editing mode, you can select from the list of all templates available on your wiki by clicking "Add other templates".
  • In source mode, you can use the code {{Template name}} to add any template to your wiki.
  • Advanced users can edit the page MediaWiki:Editor-template-list to change the list of templates available by default in the "Templates" section of the editor. Up to 4 templates can be in this list.

Substituting templates

A different way to use a template is to substitute its content into a page. This is done by inserting subst: immediately after the opening braces: {{subst:templatename}}. Once the page is saved, the link to the template is removed and the template output is substituted in its place and can be further edited. Any updates to the template will not affect the content that was substituted into the page.

To learn how to change the output of the template based on what the user inputs, see Help:Template parameters and Help:Parser functions.

Updating and adding standard templates

Wikia's official Starter Pages and semi-official Templates wikis occasionally improve some of their documentation as well as adding new templates specifically designed for Wikia sites, and are therefore worth checking from time to time.
For sites created before about December 2008, the Starter Pages wiki should be compared and ideally used for upgrading to its standard documentation system similar to that introduced in Wikipedia.

Template Webinar

Looking for further video instruction? This webinar recording overviews the basics of adding and customizing templates for your wiki.


See also

Further help and feedback

Around Wikia's network

Random Wiki