Modul:Icon/data/doc
Ini adalah halaman dokumentasi untuk Modul:Icon/data
TemplateStyles' src
attribute must not be empty.
Modul panèka kaèngkobhi. Modul nèka mèlaghis kantara sè èyangghuy kelabân andhân kaca, otabâ segghut èsubstitusi'aghi. Lakaran vandalisme otabâ kaklèrowan abhâdhi pangaro dâ' andhân kaca, tor beccè'an kèni' kèngèng maparèng tompoan rajâ dâ' server, modul nèka èsabhi, èlinḍhungè otabâ è'èngkobhi sabâgiyân ḍâri sabhârâng pameccè'an. |
TemplateStyles' src
attribute must not be empty.
This Lua module is used on many pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
This module stores icon data for Module:Icon.
Adding icons
beccè'To add a new icon, add a table in the following format:
code = {
image = "My image name.xyz",
tooltip = "My tooltip text",
link = true,
},
The code should be in lower case.
Fields
beccè'image
: the image to be displayed. This should be without theFile:
prefix. So, if you wanted to add File:Featured article star.svg, you would use"Featured article star.svg"
here. If any of the text you add has double quotes in, you will need to escape it with backslashes like this:"My \"quoted\" image.svg"
.tooltip
: the tooltip to be displayed when hovering the mouse above the image. This is optional, although it is recommended you include it.link
: if false, the link to the file description page is suppressed. You should only set this to false if the icon image is in the public domain, or is released under a license that does not require attribution (such as CC-0). For images released under licenses that require attribution such as CC-BY-SA and the GFDL, you should set this to true to preserve the link to the file description page.
Aliases
beccè'If you want to add aliases for the code, add an aliases
table as follows:
code = {
aliases = {"alias1", "alias2"},
image = "My image name.xyz",
tooltip = "My tooltip text",
link = true,
},
Please make sure that any codes and aliases that you add don't match any existing codes or aliases. If they do, one of them will be overwritten with the other (and it's not possible to say for certain which will be overwritten with which).
Removing icons
beccè'Removing icons is fairly easy. Just remove the relevant entry from the data table. You should not remove the _DEFAULT entry, as Module:Icon relies on it being there, and removing it will cause script errors.