Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:TFRRS
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 == 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 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)
Templates used on this page:
Template:Tl
(
edit
)
Module:TFRRS/doc
(
edit
)