Module:Databox : Tameẓla gar ileqman

392 octets ajoutés ,  1 n wayyur aya
aucun résumé de modification
end
 
local function has_value (tab, val)
for index, value in ipairs(tab) do
if value == val then
return true
end
end
 
return false
end
 
local p = {}
local lat_lon = frame:preprocess("{{GetLatLon|P625|P276|P159|item="..(itemId or '').."}}") or ''
local layer = claim({item=itemId, formatting="table", property="P3896", qualifier="P518", blacklist1= "Q94979808", rowformat = "$0", separator="###", editicon="no"}) or ''
local layer = ''
local loc_map_image = claim({item=itemId, formatting="table", property="P242", rowformat = "$0", editicon="no", list='false'}) or ''
if has_value(properties, 'P3896') then
local parents = getParentValues({item=itemId, sorting="-1", separator="</tr>", rowformat = "<tr><td>'''$0'''</td><td>$1</td>", editicon="no"}) or ''
local layer = claim({item=itemId, formatting="table", property="P3896", qualifier="P518", blacklist1= "Q94979808", rowformat = "$0", separator="###", editicon="no"}) or ''
end
local loc_map_image = ''
if has_value(properties, 'P242') then
local loc_map_image = claim({item=itemId, formatting="table", property="P242", rowformat = "$0", editicon="no", list='false'}) or ''
end
local parents = ''
if has_value(properties, 'P131') then
local parents = getParentValues({item=itemId, sorting="-1", separator="</tr>", rowformat = "<tr><td>'''$0'''</td><td>$1</td>", editicon="no"}) or ''
end
if mw.ustring.len(mw.text.trim(lat_lon)) > 0 or mw.ustring.len(mw.text.trim(loc_map_image)) > 0 or mw.ustring.len(mw.text.trim(parents)) > 0 then
17 665

modifications