پرش به محتوا

پودمان:Imamatpedia: تفاوت میان نسخه‌ها

۲۵۳ بایت اضافه‌شده ،  ‏۵ مارس ۲۰۲۴
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
 
(۳ نسخهٔ میانیِ ایجادشده توسط همین کاربر نشان داده نشد)
خط ۱: خط ۱:
local fgetFAlist = require('Module:Imamatpedia/Selected').getFAlist
local fgetFAlist = require('Module:Imamatpedia/Selected').getFAlist


local p = {}
local a = {}
 
function a.rnumber( frame )
    d = {}
 
if (frame.args[1] =='fa' or frame.args[1] =='Selected' ) then
d = fgetFAlist()
return #d
 
end
end
 
function a.rlist( frame )
if (frame.args[1] =='fa' or frame.args[1] =='Selected' ) then
d = fgetFAlist()
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].."]]"


function p.main(frame)
    local selectedModule = require("Module:Imamatpedia/Selected")
    local imams = selectedModule.getFAlist()
   
    local output = ""
    for i, name in ipairs(imams) do
        output = output .. name .. "<br>"
    end
   
    return output
end
end


return p
----
----
return a
۲۴٬۵۵۵

ویرایش