Template:Software/doc: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 8: | Line 8: | ||
** Enter "col" (without quotes) to get the color of the game. This is mainly needed for other templates. | ** Enter "col" (without quotes) to get the color of the game. This is mainly needed for other templates. | ||
** Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "(also in <game icon>)". There is also an automatic translation here, so if you type "suf=:es" the text will also be in Spanish. | ** Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "(also in <game icon>)". There is also an automatic translation here, so if you type "suf=:es" the text will also be in Spanish. | ||
{{ | {{ModernNote|<nowiki>however, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!</nowiki>}} | ||
*{{param|ico}} - the name of the icon is written here, but only the name itself, without "File:" and square brackets. | *{{param|ico}} - the name of the icon is written here, but only the name itself, without "File:" and square brackets. | ||
*{{param|link}} - link to the article, external links do not work. If not used, the link will use the {{param|name}} parameter. Write without the "_". | *{{param|link}} - link to the article, external links do not work. If not used, the link will use the {{param|name}} parameter. Write without the "_". | ||
Line 14: | Line 14: | ||
**{{param|name:<lang_code>}} - Instead of <lang_code>, write down the code of the language you need and the localized name. It will be shown depending on the parameter {{param|suf}}. | **{{param|name:<lang_code>}} - Instead of <lang_code>, write down the code of the language you need and the localized name. It will be shown depending on the parameter {{param|suf}}. | ||
*{{param|name<number>}} - this parameter displays an alternate name based on the {{param|nt}} parameter. You can also make a translated version using the {{param|name<number>:<lang_code>}} parameter | *{{param|name<number>}} - this parameter displays an alternate name based on the {{param|nt}} parameter. You can also make a translated version using the {{param|name<number>:<lang_code>}} parameter | ||
{{ | {{ModernNote|it is strongly recommended to write the abbreviation of the game in the parameter {{param|name0}}}} | ||
*{{param|suf}} - the suffix that is added at the end of the link to the article so that you can make links to different languages of the article. Be sure to write ":es" but not "es". | *{{param|suf}} - the suffix that is added at the end of the link to the article so that you can make links to different languages of the article. Be sure to write ":es" but not "es". | ||
{{ | {{ModernNote|<nowiki>{{{suf}}} should also be "suf={{{suf|}}}" in the icon templates, but after "{{{suf" there should be "|}}}" so that entering this parameter is optional.</nowiki>}} | ||
*{{param|col}} - the color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: <span style="color:#ADD8E6;font-weight:bold">#ADD8E6</span>. | *{{param|col}} - the color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: <span style="color:#ADD8E6;font-weight:bold">#ADD8E6</span>. | ||
*{{param|addtext}} - additional text that will be written immediately after the icon. It is mainly needed to add other icons, however, they will not be associated with the template in any way, so for them you will have to enter the "suf" parameter again. | *{{param|addtext}} - additional text that will be written immediately after the icon. It is mainly needed to add other icons, however, they will not be associated with the template in any way, so for them you will have to enter the "suf" parameter again. | ||
{{ | {{ModernNote|<nowiki>"addtext={{{addtext|}}}" in the icon templates!</nowiki>}} | ||
*{{param|nt}} - this parameter will be used in the {{param|name<number>}} parameter. | *{{param|nt}} - this parameter will be used in the {{param|name<number>}} parameter. | ||
Line 30: | Line 30: | ||
This is how the use of the icon template in articles will look like: | This is how the use of the icon template in articles will look like: | ||
{{ | {{ModernNote|Some of the examples given may lead to non-existent pages.}} | ||
{| class=wikitable | {| class=wikitable | ||
|- | |- |
Revision as of 05:25, 14 September 2022
Template:New_icon is the template that underlies the icon templates. It has 8 main parameters:
- {{{1}}} - the way the icon will be displayed.
- Do not enter this value if you need a regular icon.
- Enter 1 to get the name of the game with a link to an article about the game.
- Enter 2 to get the icon and the name of the game after it.
- Enter 3 to get the same as in the case of the number 1, but with an additional design.
- Enter 4 to get the same as in the case of the number 2, but with an additional design.
- Enter "col" (without quotes) to get the color of the game. This is mainly needed for other templates.
- Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "(also in <game icon>)". There is also an automatic translation here, so if you type "suf=:es" the text will also be in Spanish.
- {{{ico}}} - the name of the icon is written here, but only the name itself, without "File:" and square brackets.
- {{{link}}} - link to the article, external links do not work. If not used, the link will use the {{{name}}} parameter. Write without the "_".
- {{{name}}} - display name. Write without the "_".
- {{{name:<lang_code>}}} - Instead of <lang_code>, write down the code of the language you need and the localized name. It will be shown depending on the parameter {{{suf}}}.
- {{{name<number>}}} - this parameter displays an alternate name based on the {{{nt}}} parameter. You can also make a translated version using the {{{name<number>:<lang_code>}}} parameter
- {{{suf}}} - the suffix that is added at the end of the link to the article so that you can make links to different languages of the article. Be sure to write ":es" but not "es".
- {{{col}}} - the color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: #ADD8E6.
- {{{addtext}}} - additional text that will be written immediately after the icon. It is mainly needed to add other icons, however, they will not be associated with the template in any way, so for them you will have to enter the "suf" parameter again.
- {{{nt}}} - this parameter will be used in the {{{name<number>}}} parameter.
Result
In the end, you should get something like this (Template:Portal2 was taken as an example):
<onlyinclude><includeonly>{{New icon|{{{1}}}|ico=Portal2-16px.png|name=Portal 2|name:ko=포탈 2|name:zh-cn=傳送門2|suf={{{suf|}}}|col=#23B1E5|addtext={{{addtext|}}}|nt={{{nt|}}}}}</includeonly></onlyinclude> {{documentation|Template:Hl2/doc}}
How To Use
This is how the use of the icon template in articles will look like:
{{portal2}}
|
![]() |
{{portal2|1}}
|
Portal 2 |
{{portal2|2}}
|
![]() |
{{portal2|3}}
|
Portal 2 |
{{portal2|4}}
|
![]() |
{{portal2|1|suf=:es}}
|
Portal 2 |
{{portal2|4|suf=:zh-cn}}
|
![]() |
{{portal2|col}}
|
#23B1E5 |
{{portal2|in}}
|
(in ![]() |
{{portal2|only}}
|
(only in ![]() |
{{portal2|since}}
|
(in all games since ![]() |
{{portal2|not}}
|
(not in ![]() |
{{portal2|removed|suf=:ru}}
|
(removed since ![]() |
{{portal2|also|suf=:de|addtext={{csgo|suf=:de}} {{l4d2|suf=:de}}}}
|
(also in ![]() ![]() ![]() |