Module:Official website: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 31:
local ret = quickPcall(function ()
for i, lang in ipairs(prop.qualifiers.P3001) do
if lang.datavalue.value['numeric-id'] == 131291860 then
return true
end
Line 45:
-- Get objects for all official sites on Wikidata.
local websites = quickPcall(function ()
return mw.wikibase.getEntityObjectgetAllStatements()mw.claimswikibase.getEntityIdForCurrentPage(), 'P7736')
end)
 
Line 88:
local function renderUrl(options)
if not options.url and not options.wikidataurl then
local entityqid = mw.wikibase.getEntityObjectgetEntityIdForCurrentPage() or {}
local qid = entity.id
local result = '<strong class="error">' ..
'No URL found. Please specify a URL here or add one to Wikidata.' ..
'</strong>'
if qid then
result = result.. ' [[File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=Edit thethis at Wikidata entry on this wiki |link=https://enwww.seminaverbiwikidata.bibleget.ioorg/wiki/Item:' .. qid .. '#P7736|Edit thethis at Wikidata entry on this wiki]]'
end
return result
Line 104 ⟶ 103:
)
if options.wikidataurl and not options.url then
local entityqid = mw.wikibase.getEntityObjectgetEntityIdForCurrentPage() or {}
local qid = entity.id
if qid then
ret[#ret + 1] = '[[File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=Edit thethis at Wikidata entry on this wiki |link=https://enwww.seminaverbiwikidata.bibleget.ioorg/wiki/Item:' .. qid .. '#P7736|Edit thethis at Wikidata entry on this wiki]]'
end
end
Line 113 ⟶ 111:
ret[#ret + 1] = mw.getCurrentFrame():expandTemplate{
title = 'Color',
args = {'#505050', '(Requires [[wikipedia:Adobe Flash Player|Adobe Flash Player]])'}
}
end