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/Row
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 Row = {} function Row.make(rowName, value, link, prefix) local container = mw.html.create('div') :addClass('ib-row') local name = mw.html.create('div') :addClass('ib-rowName') :wikitext(rowName .. ': ') local valueNode = mw.html.create('div') -- If value is table if type(value) ~= 'string' then return container:node(name):node(value) end if link ~= nil then local path = value if prefix ~= nil then path = prefix .. path end local toShow = Row.toShow(value) if toShow then path = path .. '|' .. toShow end valueNode:wikitext('[[' .. path .. '|' .. value .. ']]') else valueNode:wikitext(value) end return container:node(name):node(valueNode) end function Row.person(rowName, value, flag) local container = mw.html.create('div') :addClass('ib-row') local name = mw.html.create('div') :addClass('ib-rowName') :wikitext(rowName .. ': ') local valueNode = mw.html.create('div') local toShow = Row.toShow(value) valueNode:wikitext(flag):wikitext('[[' .. value .. '|' .. toShow .. ']]') return container:node(name):node(valueNode) end function Row.toShow(str) if mw.title.new(str) then return nil end local toShow = mw.text.split(str, '/') if #toShow > 1 then toShow = toShow[2] else toShow = toShow[1] end return toShow end return Row
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/Row/doc
(
edit
)
No categories
Edit