تضامنًا مع حق الشعب الفلسطيني |
وحدة:ملعب/FShbib/وفيات حديثة
اذهب إلى التنقل
اذهب إلى البحث
توثيق الوحدة[أنشئ] [محو الاختزان][استخدامات] [قوالب]
--وحدة
local fgetRecentDeaths = require('وحدة:ملعب/FShbib/وفيات حديثة/قائمة').getRecentDeaths
local a = {}
function a.rnumber( frame )
d = {}
if(frame.args[1] =='RD' or frame.args[1] =='وفيات حديثة' ) then
d = fgetRecentDeaths()
end
return #d
end
function a.rlist( frame )
d = {}
if(frame.args[1] =='RD' or frame.args[1] =='وفيات حديثة' ) then
d = fgetRecentDeaths()
end
math.randomseed( os.time() )
x = math.random(1,#d)
repeat
x1 = math.random(1,#d)
until x1 ~= x
repeat
x2 = math.random(1,#d)
until (x2 ~= x and x2 ~= x1)
return "[["..d[x1].."]] – [["..d[x].."]] – [["..d[x2].."]]"
end
function a.plist(frame)
local c = ''
local d = {}
if(frame.args[1] =='RD' or frame.args[1] =='وفيات حديثة' ) then
d = fgetRecentDeaths()
end
for _,s in ipairs(d) do
c = c .. "\n{{بوابة:أحداث جارية/شريط جانبي/وفيات حديثة/قالب|" .. s .. "}}"
end
return c
end
return a