Module:Episode list: Difference between revisions

Content deleted Content added
added tracking for pages that use this module but don't use Module:Episode table
Undid revision 923006118 by Gonnym (talk) unfortunately, it looks like this added several pages to Category:Pages with script errors including List of Good Mythical Morning episodes, List of Horizon episodes, The Dr. Oz Show, and List of The Nature of Things episodes
Line 33:
["tba_values"] = "[[Category:Episode lists with TBA values]]",
["nonmatching_numbered_parameters"] = "[[Category:Episode lists with a non-matching set of numbered parameters]]",
["raw_unformatted_storyteleplay"] = "[[Category:Episode lists with unformatted story or teleplay credits]]",
["no_episode_table"] = "[[Category:Epiosde lists missing Episode table]]"
}
 
Line 65 ⟶ 64:
'TranslitTitle',
}
 
-- Local function which is used to add a tracking category to the page.
local function addTrackingCategory(category)
trackingCategories = trackingCategories .. category
end
 
-- Local function which is used to check if the page is not using an Episode table template.
-- If it isn't, it adds the page to a tracking category.
local function checkForEpisodeTableTemplate(title)
local content = title:getContent()
if (not string.find(content, "[Ee]pisode table")) then
addTrackingCategory(trackingCategoryList["no_episode_table"])
end
end
 
-- Local function which is used to retrieve the episode number or production code number,
Line 112 ⟶ 97:
:wikitext(text)
end
end
 
-- Local function which is used to add a tracking category to the page.
local function addTrackingCategory(category)
trackingCategories = trackingCategories .. category
end
 
Line 807 ⟶ 797:
end
 
checkForEpisodeTableTemplate(title)
-- Do not show the summary if this is being transcluded on the initial list page
-- Do include it on all other lists