User:Mainframe98/Archive/sandbox 6

Converting Template:Featured Article to Lua

 * Main articles: help:Lua and Lua templating/Converting Wikitext templates.

Main Module
local p = {} local FeaturedArticleData = mw.loadData( 'Module:FeaturedArticle/data 2' ) function p.FeaturedArticle( frame ) local FeaturedArticleText = frame.args[1] if FeaturedArticleData[FeaturedArticleText] ~= nil then FeaturedArticleText = FeaturedArticleData [FeaturedArticleText] end return FeaturedArticleText end return p

Data Module 1
Contains Time Switching option, can be reused in other meta templates related to Template:Featured Article. return { ["week"] = "CURRENTWEEK", ["month"] = "CURRENTMONTH", }

Data Module 2
Contains Link to Featured Articles return { ["01"] = "",	["02"] = "",	["03"] = "",	["04"] = "",	["05"] = "",	["06"] = "",	["07"] = "",	["08"] = "",	["09"] = "",	["10"] = "",	["11"] = "",	["12"] = "",	["13"] = "",	["14"] = "",	["15"] = "",	["16"] = "",	["17"] = "",	["18"] = "",	["19"] = "",	["20"] = "",	["21"] = "",	["22"] = "",	["23"] = "",	["24"] = "",	["25"] = "",	["26"] = "",	["27"] = "",	["28"] = "",	["29"] = "",	["30"] = "",	["31"] = "",	["32"] = "",	["33"] = "",	["34"] = "",	["35"] = "",	["36"] = "",	["37"] = "",	["38"] = "",	["39"] = "",	["40"] = "",	["41"] = "",	["42"] = "",	["43"] = "",	["44"] = "",	["45"] = "",	["46"] = "",	["47"] = "",	["48"] = "",	["49"] = "",	["50"] = "",	["51"] = "",	["52"] = "", }

New using Portable Infoboxes

 * To be located at Template:MoSinfobox.

 Vital Statistics

Code

 * Located in slot 12, on User:Mainframe98/Templates/TemplateStore.

  Research Rewards