Template:Software/bc/doc

From Valve Developer Community
Jump to: navigation, search
English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(台灣)‎ (zh-tw)
Edit-copy.png
This is a documentation subpage for Template:Software.
Don't forget to purge the contents of the base page upon creating or editing this subpage.  
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>)".
Note.pngNote:however, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!
  • {{{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 Half-Life: Source, in which case it should be 32px. Experimentation may be necessary for non-square icons.
Tip.pngTip:The actual icon does not need to be this resolution; higher resolutions can be used to improve clarity on high-PPI displays. MediaWiki will automatically send the resolution best suited for the given user-client's display.
  • {{{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.
Tip.pngTip:For Wikipedia links, prepend "Wikipedia:" to the page name (ex: Wikipedia:Gabe Newell)
  • {{{name}}} – display name. Write without the "_".
  • {{{name}}} – this parameter displays an alternate name based on the {{{nt}}} parameter.
Note.pngNote:it is strongly recommended to write the abbreviation of the game in the parameter {{{name0}}}
  • {{{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.
Note.pngNote:Make sure to include "addtext={{{addtext|}}}" in the icon templates!
  • {{{nt}}} – this parameter will be used in the {{{name<number>}}} parameter.

Result

In the end, you should get something like this:

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
{{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}} Portal 2
{{portal2|1}} Portal 2
{{portal2|2}} Portal 2 Portal 2
{{portal2|3}} Portal 2
{{portal2|4}} Portal 2 Portal 2
{{portal2|ico}} Icon-Portal2.png
{{portal2|col}} #23B1E5
{{portal2|name}} Portal 2
{{portal2|in}} (in Portal 2)
{{portal2|only}} (only in Portal 2)
{{portal2|since}} (in all games since Portal 2)
{{portal2|not}} (not in Portal 2)
{{portal2|also|addtext={{csgo}} {{l4d2}}}} (also in Portal 2Counter-Strike: Global Offensive Left 4 Dead 2)
Template:Software/bc
Logo-template.png
Summary
Aids in the creation of icon templates
Type
Metatemplate
Contributors
N/A
Creation date
04/04/2022
(04 April 2022)
Notes
N/A
Subpages
Documentation
Preload
N/A
Sandbox
N/A
Strings
N/A
Testcases
N/A
Other
N/A
Revision information
Latest editor
Nesciuse
Last edited
06/08/2024
20240806030036
Revision size
4667 bytes
4.667 kilobytes
0.004667 megabytes
Technical information
Page identifier
54243
Contains translations
Yes
Uses parser functions?
Yes
Uses variables?
Yes