Module:Update: Difference between revisions
mNo edit summary |
No edit summary |
||
| (24 intermediate revisions by the same user not shown) | |||
| Line 55: | Line 55: | ||
-- converting month names to hex for sortkeys | -- converting month names to hex for sortkeys | ||
local hexmonthconv = { | local hexmonthconv = { | ||
January = ' | January = '0', | ||
February = ' | February = '1', | ||
March = ' | March = '2', | ||
April = ' | April = '3', | ||
May = ' | May = '4', | ||
June = ' | June = '5', | ||
July = ' | July = '6', | ||
August = ' | August = '7', | ||
September = ' | September = '8', | ||
October = ' | October = '9', | ||
November = ' | November = 'A', | ||
December = ' | December = 'B', | ||
} | } | ||
| Line 201: | Line 201: | ||
month = lang:formatDate('F', a.date) | month = lang:formatDate('F', a.date) | ||
year = lang:formatDate('Y', a.date) | year = lang:formatDate('Y', a.date) | ||
date_link = ' | date_link = '' .. day .. ' ' .. month .. ' [[' .. year .. ']]' | ||
else | else | ||
date_link = '(missing date)' | date_link = '(missing date)' | ||
| Line 242: | Line 242: | ||
local cat = '' | local cat = '' | ||
-- cats only in update namespace | -- cats only in update namespace | ||
if title.namespace == | if title.namespace == 3000 then | ||
cat = '[[Category:' .. get_update_category(a.category) .. '|' .. postTitle .. ']]' | cat = '[[Category:' .. get_update_category(a.category) .. '|' .. postTitle .. ']]' | ||
cat = cat .. get_time_categories(day, month, year) | cat = cat .. get_time_categories(day, month, year) | ||
| Line 277: | Line 277: | ||
-- [[Template:Patch Notes]] | -- [[Template:Patch Notes]] | ||
function p.patchnotes(frame) | function p.patchnotes(frame) | ||
local function | local function qprlink(qpr) | ||
return ' | return '' .. string.gsub(qpr, '%-', '%-') | ||
end | end | ||
| Line 290: | Line 290: | ||
local link | local link | ||
if hc(a. | if hc(a.qpr) then | ||
if a. | if a.qpr == 'no' then | ||
link = ' | link = 'the patch note page' | ||
elseif a. | elseif a.qpr == 'none' then | ||
link = '' | link = '' | ||
else | else | ||
link = '[' .. | link = '[' .. qprlink(a.qpr) .. ' this news post]' | ||
end | end | ||
else | else | ||
link = '( | link = '(qpr missing)' | ||
cat = cat .. '[[Category:Missing patch notes | cat = cat .. '[[Category:Missing patch notes qpr]]' | ||
end | end | ||
| Line 332: | Line 332: | ||
:tag('span') | :tag('span') | ||
:addClass('plainlinks') | :addClass('plainlinks') | ||
:wikitext('[ | :wikitext('[https://www.geministation.com \'\'Gemini Station\'\' website]') | ||
:done() | :done() | ||
:wikitext(' or alternatively from ' .. newspostlink .. ' of the ') | :wikitext(' or alternatively from ' .. newspostlink .. ' of the ') | ||
| Line 339: | Line 339: | ||
:wikitext('[https://www.geministation.com \'\'Gemini Station\'\' website]') | :wikitext('[https://www.geministation.com \'\'Gemini Station\'\' website]') | ||
:done() | :done() | ||
:wikitext('. It is copyrighted by [[ | :wikitext('. It is copyrighted by [[User:Noresist|The Developer]].') | ||
:tag('br'):done() | :tag('br'):done() | ||
:wikitext('These Patch Notes were announced on ' .. date_link .. '.') | :wikitext('These Patch Notes were announced on ' .. date_link .. '.') | ||
| Line 347: | Line 347: | ||
:tag('span') | :tag('span') | ||
:addClass('plainlinks') | :addClass('plainlinks') | ||
:wikitext('[ | :wikitext('[https://www.geministation.com \'\'Gemini Station\'\' website]') | ||
:done() | :done() | ||
:wikitext('. It is copyrighted by [[ | :wikitext('. It is copyrighted by [[User:Noresist|The Developer]].') | ||
:tag('br'):done() | :tag('br'):done() | ||
:wikitext('These Patch Notes were announced on ' .. date_link .. '.') | :wikitext('These Patch Notes were announced on ' .. date_link .. '.') | ||
| Line 357: | Line 357: | ||
:tag('span') | :tag('span') | ||
:addClass('plainlinks') | :addClass('plainlinks') | ||
:wikitext('[https:// | :wikitext('[https://www.geministation.com \'\'Gemini Station\'\' website]') | ||
:done() | :done() | ||
:wikitext('. It is copyrighted by [[User:Noresist|The Developer]].') | :wikitext('. It is copyrighted by [[User:Noresist|The Developer]].') | ||
| Line 364: | Line 364: | ||
:done() | :done() | ||
else | else | ||
div:wikitext('These official [[Patch Notes]] are copied verbatim from (missing link). It is copyrighted by [[ | div:wikitext('These official [[Patch Notes]] are copied verbatim from (missing link). It is copyrighted by [[User:Noresist|The Developer]].') | ||
:tag('br'):done() | :tag('br'):done() | ||
:wikitext('These Patch Notes were announced on ' .. date_link .. '.') | :wikitext('These Patch Notes were announced on ' .. date_link .. '.') | ||
| Line 375: | Line 375: | ||
-- not update namespace, remove cat | -- not update namespace, remove cat | ||
if title.namespace ~= | if title.namespace ~= 3000 then | ||
cat = '' | cat = '' | ||
end | end | ||
| Line 406: | Line 406: | ||
if hc(a.link) then | if hc(a.link) then | ||
if a.link == 'no' then | if a.link == 'no' then | ||
link = "'' | link = "''Gemini Station'' website" | ||
else | else | ||
link = '[' .. a.link .. " '' | link = '[' .. a.link .. " ''Gemini Station'' website]" | ||
end | end | ||
else | else | ||
| Line 420: | Line 420: | ||
end | end | ||
link = '[https:// | link = '[https://forum.geministation.com/forumdisplay.php?fid=2'.. link .. " ''Gemini Station'' forum]" | ||
end | end | ||
| Line 429: | Line 429: | ||
month = lang:formatDate('F', a.date) | month = lang:formatDate('F', a.date) | ||
year = lang:formatDate('Y', a.date) | year = lang:formatDate('Y', a.date) | ||
date_link = ' | date_link = '' .. day .. ' ' .. month .. ' [[' .. year .. ']]' | ||
else | else | ||
date_link = '(missing date)' | date_link = '(missing date)' | ||
| Line 448: | Line 448: | ||
:wikitext(link) | :wikitext(link) | ||
:done() | :done() | ||
:wikitext('. It is copyrighted by [[ | :wikitext('. It is copyrighted by [[User:Noresist|The Developer]].') | ||
:tag('br'):done() | :tag('br'):done() | ||
:wikitext('It is written by ' .. authorstr .. ' and is dated ' .. date_link .. '.') | :wikitext('It is written by ' .. authorstr .. ' and is dated ' .. date_link .. '.') | ||
| Line 469: | Line 469: | ||
-- cats only in update namespace | -- cats only in update namespace | ||
if title.namespace == | if title.namespace == 3000 then | ||
cat = '[[Category:Developer Blogs|' .. blogtitle .. ']]' | cat = '[[Category:Developer Blogs|' .. blogtitle .. ']]' | ||
cat = cat .. get_time_categories(day, month, year) | cat = cat .. get_time_categories(day, month, year) | ||
| Line 555: | Line 555: | ||
-- if it has category, {{Update}} | -- if it has category, {{Update}} | ||
cat = category_info[cat_switch[string.gsub(string.lower(a.category), ' ?updates?', '')]][2] | cat = category_info[cat_switch[string.gsub(string.lower(a.category), ' ?updates?', '')]][2] | ||
elseif hc(a. | elseif hc(a.qpr) then | ||
-- if it has | -- if it has qpr, {{Patch Notes}} | ||
cat = 'Patch Notes' | cat = 'Patch Notes' | ||
else | else | ||