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:GenerateDescription/Person
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 getArgs = require('Module:Arguments').getArgs local cargo = mw.ext.cargo local p = {} function p.main(frame) local args = getArgs(frame) local currentTitle = mw.title.getCurrentTitle().text local currentTitleSplit = mw.text.split(currentTitle, '/') -- Check if local tables = 'Transfers' local fields = '_pageName, position' local cargoArgs = { where = 'id= "' .. mw.title.getCurrentTitle().text .. '" AND leavedate IS NULL AND inactivedate IS NULL' } transferResults = cargo.query(tables, fields, cargoArgs) local name = args.romanized and args.romanized or args.name and args.name or (args.title or '') -- Find the position of the first space in the name local firstSpaceIndex = string.find(name , " ") -- If a space is found, insert the title before it if firstSpaceIndex then name = string.sub(name, 1, firstSpaceIndex) .. '"' .. args.title .. '" ' .. string.sub(name, firstSpaceIndex + 1) end local div = mw.html.create('div') local str = name if args.birthdate then str = str .. ', born on ' .. args.birthdate .. ',' end if args.activeRoles then str = str .. ' is a ' .. string.lower(args.activeRoles) end if args.nationality then str = str .. (args.activeRoles and ' from ' or ' is from ' ) .. args.nationality end if #transferResults > 0 then str = str .. ' and is currently fulfilling the position of ' .. transferResults[1].position.. ' in [[' .. transferResults[1]._pageName .. ']]' end str = str .. '.' div:wikitext(str) return div end return p
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:GenerateDescription/Person/doc
(
edit
)
No categories
Edit