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/Aidan9382
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!
require("strict") local p = {} function p.main(data) return "<div style=text-align:right;font-size:80%>This does nothing as of right now. "..os.time().."</div>" end function p.iloveregexold(data) local r = "%[?%[?.-:([^{|]+)%]?%]?" local args = {mw.ustring.match("[[File:Hey.jpg|thumb|left|250px]]",r)} return table.concat(args," -- ") end function p.iloveregex(data) --This assumes [[ is present, and that therefore ]] is present local r = "%[%[%a-:([^{|]+)(.+)%]%]" local args = {mw.ustring.match("[[File:Hey.jpg|thumb|left|250px|All for [[Module:Excerpt/portals]]|alt=text]]",r)} return table.concat(args," -- ") end function p.parentingLogic(frame) --Note: Not even sure this thing goes beyond 1 parent, but have overcomplicated code anyways local parentChain = {} local newframe = frame while true do local parent = newframe:getParent() if not parent then break end newframe = parent parentChain[#parentChain+1] = parent end local parentText = "" for i,p in next,parentChain do parentText = parentText .. " parent"..i.."="..p:getTitle() end return "frame="..frame:getTitle()..parentText.." mw.gct="..mw.title.getCurrentTitle().text end p["module-use"] = function(frame) local parentLogicStuff = p.parentingLogic(frame) local testlogic = "\n\n" local i = 1 while true do local c = frame.args["_test"..i] if c then testlogic = testlogic .. "_test"..i.."="..c else break end i = i + 1 end return parentLogicStuff..testlogic end function p:namecall() return self end return setmetatable(p,{ __index=function(t,k) mw.log("Attempted to access unknown function '"..tostring(k).."'") return function(frame) local s = "<span class=\"error\">Attempted to access unknown function '"..tostring(k).."'</span>" return frame and frame:preprocess(s) or s end end })
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:Sandbox other
(
edit
)
Module:Sandbox/Aidan9382
(
edit
)
Module:Sandbox/Aidan9382/doc
(
edit
)
Module:String
(
edit
)