Module:PornBaseDataIB: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "-- Version: 2020-11-08 -- Module to implement use of a blacklist and whitelist for infobox fields -- Can take a named parameter |qid which is the PornBaseData ID for the artic...")
 
No edit summary
-- see if item might need italics or quotes
local fmt = ""
for k, v in ipairs( mw.wikibase.getBestStatements(id, "P31P1") ) do
if v.mainsnak.datavalue and formats[v.mainsnak.datavalue.value.id] then
fmt = formats[v.mainsnak.datavalue.value.id]
-- or from the PornBaseData item associated with the current page if qid is not supplied.
-- It only checks ranks that are requested (preferred and normal by default)
-- If property is not supplied, then P31P1 (instance of) is assumed.
-- It returns val if found or nothing if not found.
-- e.g. {{#invoke:PornBaseDataIB |checkvalue |val=Q5 |pid=P31P1 |qid=Q42}}
-- or {{#invoke:PornBaseDataIB |checkvalue |val=Q5 |P31P1 |qid=Q42}}
-- or {{#invoke:PornBaseDataIB |checkvalue |val=Q5 |qid=Q42}}
-- or {{#invoke:PornBaseDataIB |checkvalue |val=Q5 |P31P1}} for the current page.
-------------------------------------------------------------------------------
-- Dependencies: none

Navigation menu