Editing
Module:Player list
Jump to navigation
Jump to search
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!
--- Functions for making lists of players -- @require Dev:Links -- @require Module:Player link -- @require Module:RobloxUrls -- @require Module:Utils -- @require Module:DPL -- <nowiki> local links = require("Dev:Links") local player_link = require("Module:Player link") local roblox_urls = require("Module:RobloxUrls") local utils = require("Module:Utils") local dpl = require("Module:DPL") local p = {} --- Create an unordered list of players with links. -- This function makes an attempt to avoid exceeding the expensive function limit. -- @param {table} args A table with player names as values. -- @return {string} Wikitext for list of players. function p._player_list(args, forceDPL) forceDPL = true -- temporary args = utils.trim_positional_arguments(args) local items = {} if #args <= 90 and not forceDPL then for _, name in ipairs(args) do local item = "* " .. player_link._player_link{player = name} table.insert(items, item) end else local pages = dpl.list({category="Player pages"}) local page_set = utils.array_to_set(pages) for _, name in ipairs(args) do local title = mw.title.makeTitle('Community', name) if title and page_set[title.prefixedText] then local item = "* " .. links.link(title.fullText, name, "local") table.insert(items, item) else local item = "* " .. links.link(tostring(roblox_urls.user_from_username(name)), name, "ext") table.insert(items, item) end end end return table.concat(items, "\n") end p.player_list = utils.make_wrapper_function(p._player_list) return p
Summary:
Please note that all contributions to nUSA Wiki Archive 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
NUSA Wiki Archive:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Player list/doc
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Module
Discussion
English
Views
Read
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Tools
What links here
Related changes
Special pages
Page information