<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ATaxonbar%2Fcandidate</id>
	<title>Module:Taxonbar/candidate - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3ATaxonbar%2Fcandidate"/>
	<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Module:Taxonbar/candidate&amp;action=history"/>
	<updated>2026-04-05T00:10:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://moasspedia.org/w/index.php?title=Module:Taxonbar/candidate&amp;diff=3468&amp;oldid=prev</id>
		<title>Wikipedia&gt;Tom.Reding: +drupe, compound drupe, compound fruit, and trivial name to unacceptable list</title>
		<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Module:Taxonbar/candidate&amp;diff=3468&amp;oldid=prev"/>
		<updated>2019-09-05T17:15:13Z</updated>

		<summary type="html">&lt;p&gt;+drupe, compound drupe, compound fruit, and trivial name to unacceptable list&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.check(frame)&lt;br /&gt;
	local taxonbarExists = require(&amp;#039;Module:Taxonbar/exists&amp;#039;).check&lt;br /&gt;
	if taxonbarExists(frame) then&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	else&lt;br /&gt;
		local resolveEntity = require( &amp;#039;Module:ResolveEntityId&amp;#039; )&lt;br /&gt;
		local currentTitle = mw.title.getCurrentTitle()&lt;br /&gt;
		local currentItem = nil&lt;br /&gt;
		local categories = {&lt;br /&gt;
			&amp;#039;[[Category:Taxobox articles possibly missing a taxonbar]]&amp;#039; --unset if acceptable or unacceptable found&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		--preliminary exclusion criteria&lt;br /&gt;
		if string.match( currentTitle.text, &amp;#039;^List of &amp;#039;) then&lt;br /&gt;
			return &amp;#039;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		--find Wikidata item&lt;br /&gt;
		if currentTitle.namespace == 0 then --mainspace&lt;br /&gt;
			local currentEntityId = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
			if resolveEntity._id(currentEntityId) then&lt;br /&gt;
				currentItem = mw.wikibase.getEntity(currentEntityId)&lt;br /&gt;
			else --currentEntityId == nil/unresolvable&lt;br /&gt;
				return categories[1]&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			return &amp;#039;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		if currentItem then --currentItem should not be nil here, but check just in case&lt;br /&gt;
			--determine if {{Taxonbar}} is *possibly* missing, or *definitely* missing&lt;br /&gt;
			local acceptableInstanceOf_All = { --copied from [[Module:Taxonbar]]&lt;br /&gt;
				[&amp;#039;Q16521&amp;#039;] = &amp;#039;taxon&amp;#039;,                      --strict&lt;br /&gt;
				[&amp;#039;Q310890&amp;#039;] = &amp;#039;monotypic taxon&amp;#039;,           --strict&lt;br /&gt;
				[&amp;#039;Q2568288&amp;#039;] = &amp;#039;ichnotaxon&amp;#039;,               --strict&lt;br /&gt;
				[&amp;#039;Q23038290&amp;#039;] = &amp;#039;fossil taxon&amp;#039;,            --strict&lt;br /&gt;
				[&amp;#039;Q47487597&amp;#039;] = &amp;#039;monotypic fossil taxon&amp;#039;,  --strict&lt;br /&gt;
				[&amp;#039;Q42621&amp;#039;] = &amp;#039;hybrid&amp;#039;,                     --lax&lt;br /&gt;
				[&amp;#039;Q235536&amp;#039;] = &amp;#039;incertae sedis&amp;#039;,            --lax&lt;br /&gt;
				[&amp;#039;Q713623&amp;#039;] = &amp;#039;clade&amp;#039;,                     --lax&lt;br /&gt;
				[&amp;#039;Q848328&amp;#039;] = &amp;#039;serotype&amp;#039;,                  --lax&lt;br /&gt;
				[&amp;#039;Q857968&amp;#039;] = &amp;#039;candidatus&amp;#039;,                --lax&lt;br /&gt;
				[&amp;#039;Q17487588&amp;#039;] = &amp;#039;unavailable combination&amp;#039;, --lax&lt;br /&gt;
			}&lt;br /&gt;
			local unacceptableInstanceOf = {&lt;br /&gt;
				[&amp;#039;Q913170&amp;#039;] = &amp;#039;trivial name&amp;#039;,&lt;br /&gt;
				[&amp;#039;Q55983715&amp;#039;] = &amp;#039;group of organisms known by one particular common name&amp;#039;,&lt;br /&gt;
				[&amp;#039;Q937228&amp;#039;] = &amp;#039;property&amp;#039;,&lt;br /&gt;
				[&amp;#039;Q14712&amp;#039;] = &amp;#039;drupe&amp;#039;,&lt;br /&gt;
				[&amp;#039;Q163233&amp;#039;] = &amp;#039;compound drupe&amp;#039;,&lt;br /&gt;
				[&amp;#039;Q747463&amp;#039;] = &amp;#039;compound fruit&amp;#039;,&lt;br /&gt;
			}&lt;br /&gt;
			&lt;br /&gt;
			local acceptableCount = 0&lt;br /&gt;
			local unacceptableCount = 0&lt;br /&gt;
			for _, instanceOfState in pairs ( currentItem:getBestStatements(&amp;#039;P31&amp;#039;) ) do --instance of&lt;br /&gt;
				local instanceOf = instanceOfState.mainsnak.datavalue.value.id&lt;br /&gt;
				if acceptableInstanceOf_All[instanceOf] then&lt;br /&gt;
					acceptableCount = acceptableCount + 1&lt;br /&gt;
				elseif unacceptableInstanceOf[instanceOf] then&lt;br /&gt;
					unacceptableCount = unacceptableCount + 1&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			for _, subclassOfState in pairs ( currentItem:getBestStatements(&amp;#039;P279&amp;#039;) ) do --subclass of&lt;br /&gt;
				local subclassOf = subclassOfState.mainsnak.datavalue.value.id&lt;br /&gt;
				if acceptableInstanceOf_All[subclassOf] then&lt;br /&gt;
					acceptableCount = acceptableCount + 1&lt;br /&gt;
				elseif unacceptableInstanceOf[subclassOf] then&lt;br /&gt;
					unacceptableCount = unacceptableCount + 1&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			if acceptableCount &amp;gt; 0 then&lt;br /&gt;
				categories[1] = &amp;#039;&amp;#039;&lt;br /&gt;
				categories[2] = &amp;#039;[[Category:Taxobox articles missing a taxonbar]]&amp;#039;&lt;br /&gt;
			elseif unacceptableCount &amp;gt; 0 then&lt;br /&gt;
				categories[1] = &amp;#039;&amp;#039;&lt;br /&gt;
				categories[2] = &amp;#039;&amp;#039;&lt;br /&gt;
			end&lt;br /&gt;
			&lt;br /&gt;
			return table.concat(categories)&lt;br /&gt;
			&lt;br /&gt;
		else&lt;br /&gt;
			return &amp;#039;&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;Tom.Reding</name></author>
	</entry>
</feed>