Editing
Module:Career-test
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!
local p = {} function p.getConfig(siteName) local siteConfig = mw.loadData("Module:Career-test/config")[siteName] if not siteConfig then error(string.format("Site '%s' not found in configuration file", siteName)) end return siteConfig end function p.makeUrl(siteName, id) local siteConfig = p.getConfig(siteName) local url = siteConfig.url local variable = siteConfig.variable local idPlaceholder = string.find(url, variable) if idPlaceholder == nil then error(string.format("No id placeholder found in URL for site '%s'", siteName)) end return string.sub(url, 1, idPlaceholder - 1) .. id .. string.sub(url, idPlaceholder + string.len(variable)) end function p.makeTable(frame) local data = mw.html.create("table") data :addClass("wikitable") :addClass("sortable") :addClass("career-new") :tag("tr") :tag("th") :wikitext(frame.args.title or "") :done() for _, row in ipairs(frame.args.list or {}) do local siteName = row.site local id = row.id local alias = row.alias or "" local notes = row.notes or "" local url = p.makeUrl(siteName, id) data :tag("tr") :tag("td") :wikitext(row.site) :done() :tag("td") :wikitext(row.id) :done() :tag("td") :wikitext(row.alias) :done() :tag("td") :wikitext(row.notes) :done() end return tostring(data) end return p
Summary:
Please note that all contributions to Porn Base Central 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
Porn Base Central: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:Career-test/doc
(
view source
)
Navigation menu
Personal tools
English
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
Help about MediaWiki
Tools
What links here
Related changes
Upload file
Special pages
Page information