Module:RandomQueue: Difference between revisions

Content deleted Content added
m Protected "Module:RandomQueue" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 17:
if (mode == "fa" or mode == "both") then
fa_list = mw.title.new('WookieepediaED Wiki:Featured articles/Canon'):getContent() .. mw.title.new('WookieepediaED Wiki:Featured articles/Legends'):getContent() .. mw.title.new('WookieepediaED Wiki:Featured articles/OOU'):getContent()
--fa_list = fa_list:match(listpatt)
end
if (mode == "ga" or mode == "both") then
ga_list = mw.title.new('WookieepediaED Wiki:Good articles/Canon'):getContent() .. mw.title.new('WookieepediaED Wiki:Good articles/Legends'):getContent() .. mw.title.new('WookieepediaED Wiki:Good articles/OOU'):getContent()
--ga_list = ga_list:match(listpatt)
end
Line 29:
pagename = link:gsub("%[%[(.*)%]%]", "%1")
pagename = pagename:gsub("(.*)%|.*", "%1")
if mw.title.new(pagename):getContent() ~= nil and not pagename:find("Unidentified") then
list[#list + 1] = pagename
end
Line 40:
math.randomseed(os.time())
num = math.random(1, #list)
pagetext = mw.title.new(list[num]):getContent() or ""
pagetext = pagetext:gsub("%=%=(.*)", "")
filename = pagetext:match(".*%[%[File:(.*)%]%].*")