Editing
Module:Taxonbar/whitelist
Jump to navigation
Jump to search
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!
local p = {} --returns any combination of strict/lax/all acceptable instance-of's, --either as a table for use inside [[Module:Taxonbar]] or another module, --or as an ordered list for use in documentation. function p.whitelist( frame ) local listType = frame.args[1] local documentation = frame.args[2] local outList = {} local acceptableInstanceOf_Strict = { --table order == display order 'Q16521', --taxon 'Q310890', --monotypic taxon 'Q47487597', --monotypic fossil taxon 'Q2568288', --ichnotaxon 'Q23038290', --fossil taxon 'Q59278506', --ootaxon 'Q98961713', --extinct taxon 'Q58051350', --paraphyletic group (subclass of taxon) } local acceptableInstanceOf_Lax = { --table order == display order 'Q42621', --hybrid 'Q235536', --incertae sedis 'Q713623', --clade 'Q848328', --serotype 'Q857968', --candidatus 'Q17487588', --unavailable combination 'Q124477390', --taxon hypothesis } if listType == 'strict' then outList = acceptableInstanceOf_Strict elseif listType == 'lax' then outList = acceptableInstanceOf_Lax else --elseif listType == 'all' then --concatenate strict + lax IIF requested local acceptableInstanceOf_All = {} local i = 0 for _, v in pairs( acceptableInstanceOf_Strict ) do i = i + 1 acceptableInstanceOf_All[i] = v end for _, v in pairs( acceptableInstanceOf_Lax ) do i = i + 1 acceptableInstanceOf_All[i] = v end outList = acceptableInstanceOf_All end if (documentation == nil) or --module only (documentation and documentation == '') then local out = {} for k, v in pairs( outList ) do out[v] = k --output Q# as keys for easier searching within Module:Taxonbar end return out elseif (documentation == 'docdoc') then --self-documentation only local selfdocout = 'myWhitelist = {\n' for k, q in pairs( outList ) do selfdocout = selfdocout..'\t\''..q..'\' = '..k..',\n' end selfdocout = selfdocout..'}' local args = { ['lang'] = 'lua', ['code'] = selfdocout } out = frame:expandTemplate{ title = 'Syntaxhighlight', args = args } return out else --normal documentation only local out = '' for _, q in pairs( outList ) do local Q = frame:expandTemplate{ title = 'Q', args = { q } } out = out..'# '..Q..'\n' end out = mw.ustring.gsub(out, '%s+$', '') return out end end return p
Summary:
Please note that all contributions to MycoTaxa may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, 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 (see
MycoTaxa:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
MycoTaxa entities used in this page
P31
: Miscellaneous (e.g. aliases, entity existence)
Templates used on this page:
Template:Category link with count
(
edit
)
Template:Clc
(
edit
)
Template:Endplainlist
(
edit
)
Template:High-use
(
edit
)
Template:Lua sidebar
(
edit
)
Template:Lua sidebar/styles.css
(
edit
)
Template:Plainlist
(
edit
)
Template:Plainlist/styles.css
(
edit
)
Template:Sandbox other
(
edit
)
Template:Sidebar
(
edit
)
Template:Str left
(
edit
)
Template:Syntaxhighlight
(
edit
)
Template:Template link
(
edit
)
Template:Tl
(
edit
)
Template:Wikidata
(
edit
)
Template:Wikidata property link
(
edit
)
Module:Arguments
(
edit
)
Module:High-use
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Redirect
(
edit
)
Module:Sidebar
(
edit
)
Module:Sidebar/configuration
(
edit
)
Module:Sidebar/styles.css
(
edit
)
Module:String
(
edit
)
Module:Taxonbar/whitelist
(
edit
)
Module:Taxonbar/whitelist/doc
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/T
(
edit
)
Module:Wd
(
edit
)
Module:Wd/i18n
(
edit
)
Module:Yesno
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Module
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
In other projects