Modulo:DTBase: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
New labels for Interwiki
(Implemented generic "PropertyList")
(New labels for Interwiki)
(15 versioni intermedie di uno stesso utente non sono mostrate)
Riga 46: Riga 46:
end
end
function p.Categories(frame)
function p.Categories(frame)
local Opening = '[[Categoria:'
local Opening = '[[Category:'
local CategoryP = 'P30'
local CategoryP = 'P30'
local AbbrP = 'P24'
local AbbrP = 'P24'
Riga 116: Riga 116:
itwiki = 'Wikipedia (inglese)',
itwiki = 'Wikipedia (inglese)',
dema = 'Memory Alpha (tedesco)',
dema = 'Memory Alpha (tedesco)',
demb = 'Memory Beta (tedesco)'
demb = 'Memory Beta (tedesco)',
fanlore = 'Fanlore',
trekipedia = 'Trekipedia'
}
}
Riga 287: Riga 289:
local WTLink
local WTLink
if (not AddSemantic) and SMWProperty and (SMWProperty ~= "") then
if AddSemantic and SMWProperty and (SMWProperty ~= "") then
AddSemantic = true
AddSemantic = true
else
else
Riga 308: Riga 310:
end
end
if not mw.wikibase.getSitelink(QItem) then
if not mw.wikibase.getSitelink(QItem) and string.find(Label, "Categoria:", 1, true) == nil then
--if mw.wikibase.getSitelink(QItem) == nil or (not mw.wikibase.getSitelink(QItem)) then
--if mw.wikibase.getSitelink(QItem) == nil or (not mw.wikibase.getSitelink(QItem)) then
--return Label
--return Label
Riga 315: Riga 317:
return "[[Special:AboutTopic/" .. QItem .. "|" .. Label .. "]]"
return "[[Special:AboutTopic/" .. QItem .. "|" .. Label .. "]]"
else
else
WTLink = Item.sitelinks['wikitrek'].title
if Item.sitelinks == nil then
WTLink = Label
else
WTLink = Item.sitelinks['wikitrek'].title
end
if not Label then
if not Label then
Label = WTLink
Label = WTLink
Riga 357: Riga 363:
if not Item["P7"] then
if not Item["P7"] then
Previous = "no prev"
Previous = "''nessuno''"
else
else
Previous = p.LabelOrLink(Item["P7"][1].datavalue.value.id)
Previous = p.LabelOrLink(Item["P7"][1].mainsnak.datavalue.value.id)
end
end
if not Item["P23"] then
if not Item["P23"] then
Next = "no next"
Next = "''nessuno''"
else
else
Next = p.LabelOrLink(Item["P23"][1].datavalue.value.id)
Next = p.LabelOrLink(Item["P23"][1].mainsnak.datavalue.value.id)
end
end

Menu di navigazione