![](http://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png)
Related pages |
---|
|
About
This template is designed to be called from {{Taxobox/core}} or a related template, and tracks pages which may be candidates for a {{Taxonbar}}.
If no {{Taxonbar}} exists on the transcluded page, the page's Wikidata item is checked against this whitelist of acceptable instance of (P31)s/subclass of (P279)s, and this blacklist of unacceptable properties.
If an acceptable instance/subclass is found, then the page is categorized as:
If no acceptables nor unacceptables are found, then it is categorized as:
If no acceptables & at least 1 unacceptable is found, then no categorization is performed.
Usage
Associated lists
Whitelist
- taxon (Q16521)
- monotypic taxon (Q310890)
- monotypic fossil taxon (Q47487597)
- ichnotaxon (Q2568288)
- fossil taxon (Q23038290)
- ootaxon (Q59278506)
- extinct taxon (Q98961713)
- paraphyletic group (Q58051350)
- hybrid (Q42621)
- incertae sedis (Q235536)
- clade (Q713623)
- serotype (Q848328)
- Candidatus (Q857968)
- unavailable combination (Q17487588)
- taxon hypothesis (Q124477390)
local p = {}function p.check(frame)local taxonbarExists = require('Module:Taxonbar/exists').checkif taxonbarExists(frame) == true thenreturn ''elselocal resolveEntity = require( 'Module:ResolveEntityId' )local currentTitle = mw.title.getCurrentTitle()local currentItem = nillocal categories = {'[[Category:Taxobox articles possibly missing a taxonbar]]' --unset if acceptable or unacceptable found}--preliminary exclusion criteriaif string.match( currentTitle.text, '^List of ') thenreturn ''end--find Wikidata itemif currentTitle.namespace == 0 then --mainspacelocal currentEntityId = mw.wikibase.getEntityIdForCurrentPage()if resolveEntity._id(currentEntityId) thencurrentItem = mw.wikibase.getEntity(currentEntityId)else --currentEntityId == nil/unresolvablereturn categories[1]endelsereturn ''endif currentItem then --currentItem should not be nil here, but check just in case--determine if {{Taxonbar}} is *definitely* missing, *possibly* missing, or not missing at alllocal whitelist = require( 'Module:Taxonbar/whitelist' ).whitelistlocal blacklist = require( 'Module:Taxonbar/blacklist' ).blacklistlocal acceptableInstanceOf_All = whitelist{ args = { 'all' } }local unacceptableInstanceOf = blacklist{ args = {} }local acceptableCount = 0local unacceptableCount = 0for _, instanceOfState in pairs ( currentItem:getBestStatements('P31') ) do --instance oflocal instanceOf = instanceOfState.mainsnak.datavalue.value.idif acceptableInstanceOf_All[instanceOf] thenacceptableCount = acceptableCount + 1elseif unacceptableInstanceOf[instanceOf] thenunacceptableCount = unacceptableCount + 1endendfor _, subclassOfState in pairs ( currentItem:getBestStatements('P279') ) do --subclass oflocal subclassOf = subclassOfState.mainsnak.datavalue.value.idif acceptableInstanceOf_All[subclassOf] thenacceptableCount = acceptableCount + 1elseif unacceptableInstanceOf[subclassOf] thenunacceptableCount = unacceptableCount + 1endendif acceptableCount > 0 thencategories[1] = ''categories[2] = '[[Category:Taxobox articles missing a taxonbar]]'elseif unacceptableCount > 0 thencategories[1] = ''categories[2] = ''endreturn table.concat(categories)elsereturn ''endendendreturn p
🔥 Top keywords: Main PageSpecial:SearchPage 3Wikipedia:Featured picturesHouse of the DragonUEFA Euro 2024Bryson DeChambeauJuneteenthInside Out 2Eid al-AdhaCleopatraDeaths in 2024Merrily We Roll Along (musical)Jonathan GroffJude Bellingham.xxx77th Tony AwardsBridgertonGary PlauchéKylian MbappéDaniel RadcliffeUEFA European Championship2024 ICC Men's T20 World CupUnit 731The Boys (TV series)Rory McIlroyN'Golo KantéUEFA Euro 2020YouTubeRomelu LukakuOpinion polling for the 2024 United Kingdom general electionThe Boys season 4Romania national football teamNicola CoughlanStereophonic (play)Gene WilderErin DarkeAntoine GriezmannProject 2025