Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Humanipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:TFRRS
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
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 = {} function p.TFRRS(frame) local f = frame.args local pf = frame:getParent().args local turls = {} local ids = {} local xcs = {} local labels = {} local nameslugs = {} local teamslugs = {} local maxparam = 0 if pf[1] or pf['id'] then ids[1] = pf[1] or pf['id'] maxparam = 1 end if pf['nameslug'] then nameslugs[1] = pf['nameslug'] end if pf['teamslug'] then teamslugs[1] = pf['teamslug'] end if pf['xc'] then xcs[1] = pf['xc'] end for k, v in pairs(pf) do if type(k) == 'string' then paramno = tonumber(string.match(k, '^%a*([1-9][0-9]*)$')) if paramno then if paramno > maxparam then maxparam = paramno end if k:find('^id[1-9][0-9]*$') then ids[paramno] = v elseif k:find('^label[1-9][0-9]*$') then labels[paramno] = v elseif k:find('^xc[1-9][0-9]*$') then xcs[paramno] = v elseif k:find('^nameslug[1-9][0-9]*$') then nameslugs[paramno] = v elseif k:find('^teamslug[1-9][0-9]*$') then teamslugs[paramno] = v end end end end for i = 1, maxparam do if xcs[i] then turls[i] = 'https://xc.tfrrs.org/athletes/' else turls[i] = 'https://www.tfrrs.org/athletes/' end turls[i] = turls[i] .. ids[i] if nameslugs[i] and teamslugs[i] then turls[i] = turls[i] .. '/' .. teamslugs[i] .. '/' .. nameslugs[i] .. '.html' end if labels[i] then turls[i] = turls[i] .. ' ' .. labels[i] end end if maxparam == 0 then local category = '' if mw.title.getCurrentTitle().namespace == 0 then category = '[[Category:TFRRS template missing ID]]' end return '<span class="error">{{[[Template:TFRRS|TFRRS]]}} template missing ID.</span>' .. category elseif maxparam == 1 then return '[' .. turls[1] .. ' ' .. f['name'] .. '] profile at [https://tfrrs.org TFRRS]' else for i = 1, maxparam do turls[i] = '[' .. turls[i] .. ']' end end local prefix = '\'\'\'' .. f['name'] .. '\'\'\' ' .. ' profiles at [https://tfrrs.org TFRRS]: ' return prefix .. table.concat(turls, ', ') end return p
Summary:
Please note that all contributions to Humanipedia 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
Humanipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Category link with count
(
edit
)
Template:Clc
(
edit
)
Template:Template link
(
edit
)
Template:Tl
(
edit
)
Module:String
(
edit
)
Module:TFRRS/doc
(
edit
)