صفحهٔ اصلی
دسته بندی ویکی ضحی
local p = {}
function p.showArticles(frame)
local category = frame.args[1] or "خارج اصول"
local limit = tonumber(frame.args[2]) or 10
local count = 0
local dpl = require("Module:DPL")
local results = dpl:new({ category = category, count = limit }):exec()
local output = '
' output = output .. '' for i, article in ipairs(results) do
count = count + 1
local title = mw.title.new(article.title)
local creationDate = mw.title.getCreationTimestamp(title)
local persianDate = mw.language.new("fa"):formatDate("Y-m-d", creationDate)
output = output .. string.format('', count, title:fullUrl(), title.text, persianDate)
endoutput = output .. '
| ردیف | عنوان | تاریخ ایجاد |
|---|---|---|
| %d | <a href="%s">%s</a> | %s |
'
return output
end
return p