Template:Software (Backward Compatibility)
Материал из Valve Developer Community
Перейти к навигации
Перейти к поиску

…
Страница документации Template:Software/bc/doc/ru не существует.
Вместо неё будет отображена документация на английском. Если после данного сообщения ничего нет, вероятней всего документации не существует даже на английском.
Вместо неё будет отображена документация на английском. Если после данного сообщения ничего нет, вероятней всего документации не существует даже на английском.
Todo: Replace the complicated =suf method translations with /strings and
{{autolang}}
+ {{uselangflags}}
one instead.{{Software/bc}}
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 with colored text.
- Enter 4 to get the same as in the case of the number 2, but with an additional design with colored text.
- 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>)".

- {{{ico}}} – the name of the icon is written here, but only the name itself, without "File:" and square brackets.
- {{{ico size}}} - width of the icon. Should be 16px for most icons, unless it's double, like
, in which case it should be 32px. Experimentation may be necessary for non-square icons.

- {{{link}}} – link to the article, External links do not work. If not used, the link will use the {{{name}}} parameter.
Write without the brackets. Underscores and spaces are interchangeable.

- {{{name}}} – display name. Write without the "_".
- {{{name}}} – this parameter displays an alternate name based on the {{{nt}}} parameter.

- {{{col}}} – the color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: #ADD8E6.
It's highly recommended that you use brighter color for better readability with dark/black pages. - {{{addtext}}} – additional text that will be written immediately after the icon. It is mainly needed to add other icons.

- {{{nt}}} – this parameter will be used in the {{{name<number>}}} parameter.
Result
In the end, you should get something like this:
{{doc|docpage=Template:Hl2/doc}}
<includeonly><onlyinclude>{{Software
| {{{1}}}
| ico = Portal2-16px.png
| ico size = 16px
| link = Portal 2
| name = {{#switch: {{language}}|#default = Portal 2|ko=포탈 2|zh=传送门 2|zh-tw=傳送門 2}}
| name0 = portal2
| col = #23B1E5
| addtext = {{{addtext|}}}
| nt = {{{nt|}}}
}}</onlyinclude></includeonly>
Translations
Translations are handled by the {{In text}}
Template.
How To Use
This is how the use of the template in articles will look like:
Code | Result |
---|---|
{{portal2}}
|
![]() |
{{portal2|1}}
|
Portal 2 |
{{portal2|2}}
|
![]() |
{{portal2|3}}
|
Portal 2 |
{{portal2|4}}
|
![]() |
{{portal2|ico}}
|
Icon-Portal2.png |
{{portal2|col}}
|
#23B1E5 |
{{portal2|name}}
|
Portal 2 |
{{portal2|in}}
|
(в ![]() |
{{portal2|only}}
|
(только в ![]() |
{{portal2|since}}
|
(Во всех играх начиная с ![]() |
{{portal2|not}}
|
(нет в ![]() |
{{portal2|also|addtext={{csgo}} {{l4d2}}}}
|
(также в ![]() ![]() ![]() |
Template:Software
Общая информация
Aids in the creation of icon templates
Тип
Metatemplate
Составители
Н/Д
Создан
04/04/2022
(04 April 2022)
(04 April 2022)
Примечания
Н/Д
Подстраницы
Документация
Набросок
Н/Д
Песочница
Строки
Тестовые примеры
Н/Д
Прочее
Н/Д
Информация об изменении
Последний редактор
THE OWL
Последняя правка
08/06/2023
20230608093130
20230608093130
Объём изменения
3725 bytes
3.725 kilobytes
0.003725 megabytes
3.725 kilobytes
0.003725 megabytes
Техническая информация
Идентификатор страницы
54245
Наличие перевода
Yes
Применены функции анализатора?
Yes
Применены переменные?
Yes
Скрытая категория: