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:Sandbox/Nyoron/revisionuser
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!
p={} local function err(message) return mw.ustring.format("<span class='error'>Error: %s</span>", message) end local function isTrue(x) if type(x)=='boolean' then return x end if type(x)=='number' then if x == 0 then return false else return true end end if type(x)=='string' then x = mw.ustring.lower(x) if x == 't' or x == 'true' or x == 'y'or x == 'yes' or x == 'on' then return true end n = tonumber(x) if n then if n == 0 then return false else return true end end end return false end p.REVISIONUSER = function(frame) local pageName = frame.args[1] or nil local ignore_errors = frame.args.ignore_errors or false -- args[1] is blank if pageName == nil or pageName == "" then -- with no colon return frame:preprocess("{{REVISIONUSER}}") end -- args[1] is not blank pageTitle = mw.title.new(pageName) if pageTitle.exists then -- with colon return frame:preprocess("{{REVISIONUSER:" .. pageTitle.prefixedText .. "}}") end -- you may want try relative path if mw.ustring.sub(pageName,1,1) == '/' then local fullpageName = frame:preprocess("{{FULLPAGENAME}}") local pageTitle = mw.title.new(fullpageName .. pageName) if pageTitle.exists then return frame:preprocess("{{REVISIONUSER:" .. pageTitle.prefixedText .. "}}") end end -- The pageTitle does not exist if isTrue(ignore_errors) then return "" end return err("The page [" .. pageTitle.prefixedText .. "] does not exist.") 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:
/doc
(
edit
)
Oleic acid
(
edit
)
Oreic acid
(
edit
)
Template:Module other
(
edit
)
Template:Module rating
(
edit
)
Template:Ombox
(
edit
)
Template:REVISIONUSER
(
edit
)
Template:Tld
(
edit
)
Module:Arguments
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:REVISIONUSER
(
edit
)
Module:Sandbox/Nyoron/revisionuser/doc
(
edit
)
Module:Yesno
(
edit
)