Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sandbox/Gonnym/sometest3
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} local function addRow() local row = root:tag('tr') if (rowArgs.label) then row :tag('th') :attr('scope', 'row') :wikitext(rowArgs.label) :done() end local dataCell = row:tag('td') dataCell:wikitext(rowArgs.data, 'td') end local list = require('Module:List') -- Very rough initial code. function p.main(frame) -- Standard programs. if (network) then local network = args.network local firstAired local lastAired if (args.releaed) then firstAired = args.releaed else firstAired = args.first_aired lastAired = args.last_aired end end -- Co productions. A TV show that can air in different countries but both count as an original production and should be listed in the infobox. if (args.co_network1) then local label = "Original networks" local networks = {} local firstAiredDates = {} local lastAiredDates = {} for i = 1, 4 do table.insert(networks, args["co_network" .. i]) -- When the networks have different start or released dates (used for streaming) if (args.released_network1) then table.insert(firstAiredDates, args["released_network" .. i]) -- When the networks have different start or finish airing dates (used for broastcast television). elseif (args.first_aired_network1) then table.insert(firstAiredDates, args["first_aired_network" .. i]) table.insert(lastAiredDates, args["last_aired_network" .. i]) -- When the networks have the same dates. else table.insert(firstAiredDates, args.first_aired) table.insert(lastAiredDates, args.last_aired) end end list.makeList("unbulleted", networks) end -- This is used when a show switched channels. if (args.network1) then local label = "Original networks" local networks = {} local firstAiredDates = {} local lastAiredDates = {} for i = 1, 10 do table.insert(networks, args["network" .. i]) -- When the networks have different start or released dates (used for streaming) if (args.released_network1) then table.insert(firstAiredDates, args["released_network" .. i]) -- When the networks have different start or finish airing dates (used for broastcast television). elseif (args.first_aired_network1) then table.insert(firstAiredDates, args["first_aired_network" .. i]) table.insert(lastAiredDates, args["last_aired_network" .. i]) end end list.makeList("unbulleted", networks) end if (first_aired1) then local network = args.network local firstAiredDates = {} local lastAiredDates = {} for i = 1, 10 do table.insert(firstAiredDates, args["first_aired" .. i]) table.insert(lastAiredDates, args["last_aired" .. i]) end end return end return p
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Sandbox/Gonnym/sometest3/doc
(
edit
)