Tech, emailconfirmed, Administrators (Semantic MediaWiki), Curators (Semantic MediaWiki), Administrators
12,451
edits
Bongolium500 (talk | contribs) No edit summary |
Bongolium500 (talk | contribs) No edit summary |
||
Line 11: | Line 11: | ||
local outputWidget = cache.get(PREFIX .. currentDate) or "" | local outputWidget = cache.get(PREFIX .. currentDate) or "" | ||
if outputWidget == "" then | if true then--outputWidget == "" then | ||
local year, month, day = string.match(currentDate, "(%d+)-(%d+)-(%d+)") | local year, month, day = string.match(currentDate, "(%d+)-(%d+)-(%d+)") | ||
local monthName = MONTHS[tonumber(month)] | local monthName = MONTHS[tonumber(month)] | ||
Line 17: | Line 17: | ||
local outputWidget = "<div class=\"mainpage-releases tech\" id=\"releases\"><h2>[[" .. pageName .. "|On this day in...]]</h2>" | local outputWidget = "<div class=\"mainpage-releases tech\" id=\"releases\"><h2>[[" .. pageName .. "|On this day in...]]</h2>" | ||
local pageText = frame:callParserFunction('#dpl:', {include='*', title=pageName}):gsub(".*-->", ""):gsub("<!--.*", "") | local pageText = frame:callParserFunction('#dpl:', {include='*', title=pageName}):gsub(".*-->", ""):gsub("<!--.*", "") | ||
local releases = textUtil.split(pageText, "*") | return pageText | ||
--[[local releases = textUtil.split(pageText, "*") | |||
local numToReturn = 0 | local numToReturn = 0 | ||
Line 31: | Line 32: | ||
local temp = textUtil.split(randomRelease, " %- ") | local temp = textUtil.split(randomRelease, " %- ") | ||
local year = temp[1] | local year = temp[1] | ||
if not string.find(year, "%[%[") then | if not string.find(year, "%[%[") then--]] | ||
-- year = "[[" .. year .. " (releases)|" .. year .. "]]" | |||
end | --end | ||
local text = temp[2] or "" --:gsub([['"`UNIQ--nowiki-00000001-QINU`"' | --local text = temp[2] or "" --:gsub([['"`UNIQ--nowiki-00000001-QINU`"']], "\'") | ||
outputWidget = outputWidget .. "\n<h3>..." .. year .."</h3>\n<span>" .. text .. "</span>" | --outputWidget = outputWidget .. "\n<h3>..." .. year .."</h3>\n<span>" .. text .. "</span>" | ||
end | --end | ||
outputWidget = outputWidget .. "</div>" | --outputWidget = outputWidget .. "</div>" | ||
cache.set(PREFIX .. currentDate, outputWidget) | --cache.set(PREFIX .. currentDate, outputWidget)--]] | ||
end | end | ||
return outputWidget | return outputWidget |
edits