Home
Random
Log in
Settings
About Voice Technology Wiki
Disclaimers
Search
Editing
Module:Icon
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
-- This module implements [[Template:Icon]]. require("Module:No globals") local DATA_MODULE = 'Module:Icon/data' local p = {} function p._main(args, data) data = data or mw.loadData(DATA_MODULE) local code = args.class or args[1] local iconData if code then code = code:match('^%s*(.-)%s*$'):lower() -- trim whitespace and put in lower case iconData = data[code] end if not iconData then iconData = data._DEFAULT end return string.format( '[[File:%s%s%s|%s|class=noviewer]]', iconData.image, iconData.tooltip and '|' .. iconData.tooltip or '', iconData.link == false and '|link=' or '', args.size or '16x16px' ) end function p.main(frame) local args = {} for k, v in pairs(frame:getParent().args) do args[k] = v end return p._main(args) end return p
Summary:
Please note that all contributions to Voice Technology Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
Voice Technology Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Icon/doc
(
edit
)