Modulo:WikidataIB e Modulo:WikidataIB/sandbox: differenze tra le pagine

(Differenze fra le pagine)
Vai alla navigazione Vai alla ricerca
Pagina 1
Pagina 2
m (una versione importata)
 
m (una versione importata)
 
Riga 832: Riga 832:
if not entityID or entityID == "" then entityID= mw.wikibase.getEntityIdForCurrentPage() end
if not entityID or entityID == "" then entityID= mw.wikibase.getEntityIdForCurrentPage() end
propertyID = propertyID or ""
propertyID = propertyID or ""
local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[["
local icon = "&#32;<span class='penicon autoconfirmed-show'>[["
-- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge
-- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge
.. i18n["filespace"]
.. i18n["filespace"]
Riga 3 250: Riga 3 250:
local url = frame.args.url or ""
local url = frame.args.url or ""
if url:upper() == "NONE" then return nil end
if url:upper() == "NONE" then return nil end
local qid = frame.args.qid or ""
if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end
if not qid then return nil end
local urls = {}
local urls = {}
local quals = {}
local quals = {}
local qid = frame.args.qid or ""
if url == "" then
if url and url ~= "" then
urls[1] = url
else
if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end
if not qid then return nil end
 
local prop856 = mw.wikibase.getBestStatements(qid, "P856")
local prop856 = mw.wikibase.getBestStatements(qid, "P856")
for k, v in pairs(prop856) do
for k, v in pairs(prop856) do
Riga 3 272: Riga 3 271:
end -- test for website having a value
end -- test for website having a value
end -- loop through website(s)
end -- loop through website(s)
else
urls[1] = url
end
end
if #urls == 0 then return nil end
if #urls == 0 then return nil end