Homepage
Games
News
News βΎ
All
Transfers
Drama
Business
Sponsors
Mergers
Investors
Hires
Companies
More
People
Tournaments
Brands
Brands βΎ
Companies
Organizations
Sponsors
Other
Locations
Search
Editing
Module:Infobox/Widget/Sponsors
From TwogPedia
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 Sponsors = {} function Sponsors.make(results, frame) if type(results) == 'string' then results = Sponsors.encode(results) end local container = mw.html.create('div') for r = 1, #results do local result = results[r] local id = string.gsub(result.id, 'Companies/', '') local sponsor = mw.html.create('div') :wikitext('[[Companies/' .. id .. '|' .. id .. ']]') if result.startRef or result.startRefName then local startRefName = result.startRefName or '' local startRef = result.startRef or '' sponsor:wikitext(frame:preprocess('<ref name='.. startRefName .. '>' ..startRef.. '</ref>')) end container:node(sponsor) end return container end function Sponsors.encode(jsonString) local decodedTables = {} for objectString in jsonString:gmatch('{.-}') do local decodedTable = {} for key, value in objectString:gmatch('"(%w+)":"([^"]+)"') do decodedTable[key] = value end table.insert(decodedTables, decodedTable) end return decodedTables end return Sponsors
Summary:
Please note that all contributions to TwogPedia 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
TwogPedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Preview page with this template
Template used on this page:
Module:Infobox/Widget/Sponsors/doc
(
edit
)
No categories
Edit