Module:PornBaseDataIB: Difference between revisions
Content deleted Content added
PeaceDeadC (talk | contribs) No edit summary |
PeaceDeadC (talk | contribs) No edit summary |
||
Line 499:
onlycat = parseParam(onlycat, false)
if fallback == "" then fallback = nil end
local sitelink = _getSitelink(qid, "
if onlycat and sitelink and sitelink:sub(1,9) ~= "Category:" then sitelink = nil end
if not sitelink then
Line 506:
if prop50 then
local tmcid = prop50.mainsnak.datavalue and prop50.mainsnak.datavalue.value.id
sitelink = _getSitelink(tmcid, "
end
if not sitelink then
Line 513:
if prop189 then
local tmcid = prop189.mainsnak.datavalue and prop189.mainsnak.datavalue.value.id
sitelink = _getSitelink(tmcid, "
end
end
Line 563:
-- 5. Display entity-id for now to indicate a label could be provided
-- dtxt is text to be used instead of label, or nil.
-- shortname is boolean switch to use
-- lang is the current language code.
-- uselbl is boolean switch to display the label
Line 590:
elseif shortname then
-- see if there is a shortname in our language, and set label to it
for k, v in ipairs( mw.wikibase.getBestStatements(id, "
if v.mainsnak.datavalue.value.language == lang then
label, islabel = v.mainsnak.datavalue.value.text, true
Line 604:
label, islabel = labelOrId(id)
end
if mw.site.siteName ~= "
if sitelink then
if not (dtxt or shortname) then
Line 651:
-- add tracking category [[Category:Articles with missing PornBaseData information]]
-- for enwiki, just return the tracking category
if mw.wikibase.getGlobalSiteId() == "
disp = i18n.missinginfocat
else
Line 658:
end
else
local ccat = mw.wikibase.getBestStatements(id, "
if ccat and ccat.mainsnak.datavalue then
ccat = ccat.mainsnak.datavalue.value
Line 905:
-- wikibase-item
-- time
-- string, url,
-- quantity
-- globe-coordinate
Line 924:
local dtxt = args.displaytext or args.dt
if dtxt == "" then dtxt = nil end
-- switch to use display of short name (
local shortname = args.shortname or args.sn
shortname = parseParam(shortname, false)
Line 978:
------------------------------------
-- data types which are strings:
elseif dtype == "
--
-- all have mainsnak.datavalue.value as string
if (lpre == "" or lpre == ":") and lpost == "" then
| |||