Home
Random
Log in
Settings
About Rolling Lounge Wiki
Disclaimers
Rolling Lounge Wiki
Search
Editing
Module:Self
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.setup_template_params(template_name, frame, args) local title = mw.title.new(template_name, 10) if not title.exists then return { txt = '', errors = ('<span class="error scribunto-error">The license "' .. template_name .. '" does not exist.</span>[[Category:Files with invalid licenses]]') } end return { txt = frame:expandTemplate{ title = template_name, args = { dw = args['dw'] or 'no' } }, errors = '' } end function p.more_than_one(args) return args[2] ~= nil end function p.start_line(args) return mw.ustring.format( "'''''%s, the copyright holder of this work,''' hereby publish%s it under the following license%s:''", args['author'] or 'I', args['author'] and 'es' or '', p.more_than_one(args) and 's' or '' ) end function p.categories(args) local currentTitle = mw.title.getCurrentTitle() if currentTitle.namespace ~= 6 then return '' end local cat = args['author'] and 'Files licensed by third parties' or 'Self-published work' return mw.ustring.format('[[Category:%s|%s]]', cat, currentTitle.text) end function p.main(frame) local args = frame:getParent().args local tstyles = frame:extensionTag('templatestyles', '', { src = 'Module:Self/styles.css' }) local templates, errors = '', '' for _, template_name in ipairs(args) do local result = p.setup_template_params(template_name, frame, args) templates = templates .. result.txt errors = errors .. result.errors end local final_line = p.more_than_one(args) and "<div class=\"center\">''You may select the license of your choice.''</div>" or '' return tstyles .. mw.ustring.format( '<div class="wp-tmpl-self-license-wrapper"><div class="center">%s</div><div class="center">%s</div>%s</div>%s', p.start_line(args), templates, final_line, p.categories(args) ) .. errors end return p
Summary:
Please note that all contributions to Rolling Lounge Wiki are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 International (see
RLWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, 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.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:En-WP attribution notice
(
edit
)
Module:Self/doc
(
edit
)