Modul:Random portal component: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
Hidayatsrf (bicara | kontrib) Tidak ada ringkasan suntingan |
Hidayatsrf (bicara | kontrib) Tidak ada ringkasan suntingan |
||
(3 revisi perantara oleh pengguna yang sama tidak ditampilkan) | |||
Baris 13:
-- don't track DYK etc, only selected/featured articles, biogs etc
if ((string.find(header, "/[
return retval
end
Baris 34:
end
if availableSubPageCount < maxNum then
retval = retval .. "[[
else
-- Check for spurious subpages beyond end of alleged number range
Baris 41:
end
if availableSubPageCount > maxNum then
retval = retval .. "[[
end
end
-- before categorising, check what type of subpage we are categorising, and if detected, categorise images separately
local subpageType = "
local subpageName = pages.subpage
subpageName = mw.ustring.gsub(subpageName, "^[^/]*/", "")
subpageName = mw.ustring.lower(subpageName)
if ((mw.ustring.find(subpageName, "
(mw.ustring.find(subpageName, "
(mw.ustring.find(subpageName, "panorama", 1, true) ~= nil)) then
subpageType = "
end
if (availableSubPageCount < 2) then
retval = retval .. "[[
elseif (availableSubPageCount <= 5) then
retval = retval .. "[[
elseif (availableSubPageCount <= 10) then
retval = retval .. "[[
elseif (availableSubPageCount <= 15) then
retval = retval .. "[[
elseif (availableSubPageCount <= 20) then
retval = retval .. "[[
elseif (availableSubPageCount <= 25) then
retval = retval .. "[[
elseif (availableSubPageCount <= 30) then
retval = retval .. "[[
elseif (availableSubPageCount <= 40) then
retval = retval .. "[[
elseif (availableSubPageCount <= 50) then
retval = retval .. "[[
else
retval = retval .. "[[
end
return retval;
Baris 118:
)
if mw.title.getCurrentTitle().namespace == 100 then -- is in the portal namespace
msg = msg .. '[[
end
return msg
Baris 175:
ret[#ret + 1] = getRandomSubpageContent(frame, pages)
ret[#ret + 1] = getFooter(frame, pages, string.format(
'[[/
expandArg(args, 'subpage'),
pages.subpage,
args.footer or '
))
|