Modulo:WikidataIB e Modulo:WikidataIB/sandbox: differenze tra le pagine
(Differenze fra le pagine)
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 = "& | local icon = " <span class='penicon autoconfirmed-show'>[[" | ||
-- " <span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge | -- " <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 = {} | ||
if url == "" then | |||
if url | |||
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 |