https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3ATelevision_critical_response%2Fsandbox
Module:Television critical response/sandbox - Revision history
2025-06-18T22:38:37Z
Revision history for this page on the wiki
MediaWiki 1.45.0-wmf.5
https://en.wikipedia.org/w/index.php?title=Module:Television_critical_response/sandbox&diff=1117367660&oldid=prev
WOSlinker: use require('strict') instead of require('Module:No globals')
2022-10-21T10:03:17Z
<p>use require('strict') instead of require('Module:No globals')</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 10:03, 21 October 2022</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- This module implements {{Television critical response}}.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- This module implements {{Television critical response}}.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>require('<del style="font-weight: bold; text-decoration: none;">Module:No globals</del>')</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>require('<ins style="font-weight: bold; text-decoration: none;">strict</ins>')</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local yesno = require('Module:Yesno')</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>local yesno = require('Module:Yesno')</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>
WOSlinker
https://en.wikipedia.org/w/index.php?title=Module:Television_critical_response/sandbox&diff=1087014780&oldid=prev
Certes: Count seasons: # doesn't work with string keys, even "1", "2"...
2022-05-09T19:58:22Z
<p>Count seasons: # doesn't work with string keys, even "1", "2"...</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:58, 9 May 2022</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 144:</td>
<td colspan="2" class="diff-lineno">Line 144:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Extract seasons info and place into a 3D array</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- Extract seasons info and place into a 3D array</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local SeasonEntries = {}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local SeasonEntries = {}</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> local SeasonCount = 0</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for k,v in pairs(args) do</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> for k,v in pairs(args) do</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local str, num, str2 = string.match(k, '([^%d]*)(%d*)(%a*)')</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> local str, num, str2 = string.match(k, '([^%d]*)(%d*)(%a*)')</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 157:</td>
<td colspan="2" class="diff-lineno">Line 158:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if not SeasonEntries[num] then</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> if not SeasonEntries[num] then</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> SeasonEntries[num] = {}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> SeasonEntries[num] = {}</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> SeasonCount = SeasonCount + 1</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> SeasonEntries[num][str .. str2] = v</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> SeasonEntries[num][str .. str2] = v</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 231:</td>
<td colspan="2" class="diff-lineno">Line 233:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> else</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> else</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- One row entries, only categorized in the mainspace</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> -- One row entries, only categorized in the mainspace</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> if <del style="font-weight: bold; text-decoration: none;">#SeasonEntries</del> == 1 then</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> if <ins style="font-weight: bold; text-decoration: none;">SeasonCount</ins> == 1 then</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> categories = categories .. '[[Category:Articles using Template:Television critical response with only one row]]'</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> categories = categories .. '[[Category:Articles using Template:Television critical response with only one row]]'</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> end</div></td>
</tr>
</table>
Certes
https://en.wikipedia.org/w/index.php?title=Module:Television_critical_response/sandbox&diff=1087013570&oldid=prev
Certes: sync
2022-05-09T19:49:41Z
<p>sync</p>
<p><b>New page</b></p><div>-- This module implements {{Television critical response}}.<br />
<br />
require('Module:No globals')<br />
local yesno = require('Module:Yesno')<br />
<br />
--------------------------------------------------------------------------------<br />
-- CriticalResponse class<br />
-- The main class.<br />
--------------------------------------------------------------------------------<br />
<br />
local CriticalResponse = {}<br />
<br />
function CriticalResponse.cellspan(SeasonEntries, SeasonEntries_ordered, key, cell, multipart)<br />
local spanlength = 1<br />
<br />
for i = cell+1, #SeasonEntries_ordered do<br />
local entry = SeasonEntries[SeasonEntries_ordered[i]]<br />
-- Split season, then regular season<br />
if entry.startA then<br />
if not entry[key..'A'] then spanlength = spanlength + 1<br />
else break end<br />
if not entry[key..'B'] then spanlength = spanlength + 1<br />
else break end<br />
else<br />
if not entry[key] and (not entry.special and multipart) then<br />
spanlength = spanlength + 1<br />
else break end<br />
end<br />
end<br />
return spanlength<br />
end<br />
<br />
-- Sorting function<br />
function CriticalResponse.series_sort(op1, op2)<br />
local n1,s1 = string.match(op1,"(%d+)(%a*)")<br />
local n2,s2 = string.match(op2,"(%d+)(%a*)")<br />
local n1N,n2N = tonumber(n1),tonumber(n2)<br />
<br />
if n1N == n2N then<br />
return s1 < s2<br />
else<br />
return n1N < n2N<br />
end<br />
end<br />
<br />
-- Function to add either text or {{N/a}} to cell<br />
function CriticalResponse.season_cell(text, frame)<br />
local cell<br />
<br />
if string.find(text or '', 'table-na', 0, true) ~= nil then<br />
local findpipe = string.find(text, ' | ', 0, true)<br />
if findpipe ~= nil then<br />
cell = CriticalResponse.series_attributes( frame:expandTemplate{title='N/A',args={string.sub(text,findpipe+3)}} )<br />
else<br />
cell = CriticalResponse.series_attributes( frame:expandTemplate{title='N/A'} )<br />
end<br />
else<br />
cell = mw.html.create('td'):wikitext(text)<br />
end<br />
<br />
return cell<br />
end<br />
<br />
-- Allow usages of {{N/A}} cells<br />
function CriticalResponse.series_attributes(infoParam)<br />
local entries = {}<br />
local infoCell = mw.html.create('td')<br />
local attrMatch = '([%a-]*)="([^"]*)"'<br />
<br />
while true do<br />
local a,b = string.match(infoParam,attrMatch)<br />
if a == nil or b == nil then break end<br />
infoCell:attr(a,b)<br />
infoParam = string.gsub(infoParam,attrMatch,'',1)<br />
end<br />
<br />
infoParam = string.gsub(infoParam,'%s*|%s*','',1)<br />
infoCell:wikitext(infoParam)<br />
<br />
return infoCell<br />
end<br />
<br />
function CriticalResponse.new(frame, args)<br />
args = args or {}<br />
<br />
local initialArticle = args['1'] or ''<br />
local categories = ''<br />
local title = mw.title.getCurrentTitle()<br />
local hide_rotten_tomatoes = yesno(args.hide_rotten_tomatoes)<br />
local hide_metacritic = yesno(args.hide_metacritic)<br />
local show_cinemascore = yesno(args.show_cinemascore)<br />
local hide_season = yesno(args.hide_season)<br />
local series_name = tostring(title):gsub("%s%((.-)%)","")<br />
<br />
-- Create critical response table<br />
local root = mw.html.create((args.multiseries or not args.series) and 'table' or '')<br />
local cellPadding = '0 8px'<br />
local basePadding = '0.2em 0.4em'<br />
<br />
root<br />
:addClass('wikitable')<br />
:addClass('plainrowheaders')<br />
:css('text-align', 'center')<br />
<br />
-- Remove float if multiple series<br />
if not args.multiseries then<br />
root:css('float', 'right')<br />
root:css('margin', '10px')<br />
end<br />
<br />
-- Sortable<br />
if args.sortable or args.multiseries then<br />
root:addClass('sortable');<br />
end<br />
<br />
-- Width<br />
if args.width then<br />
root:css('width', args.width)<br />
end<br />
<br />
-- Caption<br />
if not args.series then<br />
local formatted_caption<br />
<br />
if args.caption then<br />
formatted_caption = args.caption<br />
elseif args.title and args.multiseries then<br />
formatted_caption = 'Critical response of ' .. args.title<br />
elseif args.title then<br />
formatted_caption = 'Critical response of <i>' .. args.title .. '</i>'<br />
else<br />
formatted_caption = 'Critical response of <i>' .. series_name .. '</i>'<br />
end<br />
<br />
if args.show_caption then<br />
-- Visible caption option<br />
root:tag('caption'):wikitext(formatted_caption)<br />
elseif formatted_caption then<br />
-- If a visible caption isn't defined, then default to the screenreader-only caption<br />
root:tag('caption'):wikitext(frame:expandTemplate{title='Screen reader-only',args={formatted_caption}})<br />
end<br />
end<br />
<br />
-- Extract seasons info and place into a 3D array<br />
local SeasonEntries = {}<br />
for k,v in pairs(args) do<br />
local str, num, str2 = string.match(k, '([^%d]*)(%d*)(%a*)')<br />
if num ~= '' then<br />
-- Special<br />
local special = false<br />
if string.sub(str2,1,1) == 'S' then<br />
special = true<br />
num = num .. str2<br />
str2 = ''<br />
end<br />
-- Add to entries, create if necessary<br />
if not SeasonEntries[num] then<br />
SeasonEntries[num] = {}<br />
end<br />
SeasonEntries[num][str .. str2] = v<br />
if special then<br />
SeasonEntries[num]['special'] = 'y'<br />
end<br />
end<br />
end<br />
<br />
-- Order table by season number<br />
local SeasonEntries_ordered = {}<br />
for k in pairs(SeasonEntries) do<br />
table.insert(SeasonEntries_ordered, k)<br />
end<br />
table.sort(SeasonEntries_ordered,CriticalResponse.series_sort)<br />
<br />
local firstRow = args.multiseries and {} or SeasonEntries[SeasonEntries_ordered[1]]<br />
<br />
-- Headers<br />
do<br />
if args.multiseries or not args.series then<br />
local headerRow = root:tag('tr')<br />
headerRow<br />
:css('text-align', 'center')<br />
<br />
-- Multiple series header<br />
if args.multiseries then<br />
headerRow:tag('th')<br />
:attr('scope', 'col')<br />
:css('padding', cellPadding)<br />
:wikitext('Title')<br />
end<br />
<br />
-- Season header<br />
if not hide_season then<br />
headerRow:tag('th')<br />
:attr('scope', 'col')<br />
:css('min-width', '50px')<br />
:css('padding', cellPadding)<br />
:addClass('unsortable')<br />
:wikitext(args.seriesT or args.seasonT or 'Season')<br />
end<br />
<br />
-- Rotten Tomatoes header<br />
if not hide_rotten_tomatoes then<br />
headerRow:tag('th')<br />
:attr('scope', 'col')<br />
:wikitext('[[Rotten Tomatoes]]')<br />
end<br />
<br />
-- Metacritic header<br />
if not hide_metacritic then<br />
headerRow:tag('th')<br />
:attr('scope', 'col')<br />
:wikitext('[[Metacritic]]')<br />
end<br />
<br />
-- CinemaScore header<br />
if show_cinemascore then<br />
headerRow:tag('th')<br />
:attr('scope', 'col')<br />
:wikitext('[[CinemaScore]]')<br />
end<br />
end<br />
end<br />
<br />
-- Season rows<br />
do<br />
if args.multiseries then<br />
-- Multi series individual entries<br />
if args.multiseries ~= "y" then<br />
root:node(args.multiseries)<br />
end<br />
else<br />
-- One row entries, only categorized in the mainspace<br />
if #SeasonEntries == 1 then<br />
categories = categories .. '[[Category:Articles using Template:Television critical response with only one row]]'<br />
end<br />
<br />
-- Determine number of rows in the whole table<br />
local SeasonEntriesRows = 0<br />
for X = 1, #SeasonEntries_ordered do<br />
local season, entry = SeasonEntries_ordered[X], SeasonEntries[SeasonEntries_ordered[X]]<br />
SeasonEntriesRows = SeasonEntriesRows + 1<br />
end<br />
<br />
for X = 1, #SeasonEntries_ordered do<br />
local season, entry = SeasonEntries_ordered[X], SeasonEntries[SeasonEntries_ordered[X]]<br />
<br />
-- Season rows for each season<br />
for k0 = string.byte('A')-1, string.byte('Z') do<br />
local k = string.char(k0)<br />
if k0 == string.byte('A')-1 then k = '' end<br />
<br />
-- New season row<br />
local seasonRow = (entry['rotten_tomatoes' .. k] or entry['metacritic' .. k] or entry['cinemascore' .. k]) and root:tag('tr') or mw.html.create('tr')<br />
<br />
-- Series name for group overviews<br />
if X == 1 and (k == '' or k == 'A') and args.series then<br />
seasonRow:tag('th')<br />
:attr('scope', 'row')<br />
:attr('rowspan', SeasonEntriesRows)<br />
:wikitext(args.series)<br />
end<br />
<br />
-- Season number link, included only in the first row<br />
if not hide_season then<br />
if k == '' or k == 'A' then<br />
seasonRow:tag(args.series and 'td' or 'th')<br />
:attr('scope', 'row')<br />
:attr('colspan', entry.special or 1)<br />
:css('text-align', 'center')<br />
:wikitext((entry.link and '[[' .. entry.link .. '|' .. (entry.linkT or season) .. ']]' or (entry.linkT or season)) .. (entry.linkR or ''))<br />
end<br />
end<br />
<br />
-- Rotten Tomatoes<br />
if not hide_rotten_tomatoes and entry['rotten_tomatoes' .. k] ~= 'metacritic' then<br />
if entry['rotten_tomatoes' .. k] then<br />
local thisCell = CriticalResponse.season_cell(entry['rotten_tomatoes' .. k], frame)<br />
:css('padding',basePadding)<br />
seasonRow:node(thisCell)<br />
else<br />
local infoCell = CriticalResponse.series_attributes( frame:expandTemplate{title='N/A'} )<br />
infoCell:css('padding',basePadding)<br />
seasonRow:node(infoCell)<br />
end<br />
end<br />
<br />
-- Metacritic<br />
if not hide_metacritic and entry['metacritic' .. k] ~= 'rotten_tomatoes' then<br />
if entry['metacritic' .. k] then<br />
local thisCell = CriticalResponse.season_cell(entry['metacritic' .. k], frame)<br />
:css('padding',cellPadding)<br />
seasonRow:node(thisCell)<br />
else<br />
local infoCell = CriticalResponse.series_attributes( frame:expandTemplate{title='N/A'} )<br />
infoCell:css('padding',cellPadding)<br />
seasonRow:node(infoCell)<br />
end<br />
end<br />
<br />
-- CinemaScore<br />
if show_cinemascore and entry['cinemascore' .. k] ~= 'rotten_tomatoes' then<br />
if entry['cinemascore' .. k] then<br />
local thisCell = CriticalResponse.season_cell(entry['cinemascore' .. k], frame)<br />
:css('padding',cellPadding)<br />
seasonRow:node(thisCell)<br />
else<br />
local infoCell = CriticalResponse.series_attributes( frame:expandTemplate{title='N/A'} )<br />
infoCell:css('padding',cellPadding)<br />
seasonRow:node(infoCell)<br />
end<br />
end<br />
<br />
end -- End k0 string.byte<br />
end -- End 'for' SeasonEntries_ordered<br />
end -- End 'if' multiseries<br />
end -- End 'do' season rows<br />
<br />
return (args.dontclose and mw.ustring.gsub(tostring(root), "</table>", "") or tostring(root)) .. categories<br />
end<br />
<br />
--------------------------------------------------------------------------------<br />
-- Exports<br />
--------------------------------------------------------------------------------<br />
<br />
local p = {}<br />
<br />
function p.main(frame)<br />
local args = require('Module:Arguments').getArgs(frame, {<br />
wrappers = 'Template:Television critical response'<br />
})<br />
return CriticalResponse.new(frame, args)<br />
end<br />
<br />
return p</div>
Certes