Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Sandbox/DannyS712/learning
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 = {}; --All lua modules on Wikipedia must begin by defining a variable --that will hold their externally accessible functions. --Such variables can have whatever name you want and may --also contain various data as well as functions. function p.hello( frame ) --"frame" will contain the data that Wikipedia sends this function when it runs. local str = "Hello World!" return str end function p.name ( frame ) parent = frame:getParent() local title = parent:getTitle() link = frame.args["link"] if link == "yes" or link == "y" then title = "[[" .. title .. "]]" end explain = frame.args["explain"] if explain == "yes" or explain == "y" then title = "This module was called from: " .. title end return title end function p.getFinalLocation( frame ) local sd = require "Module:SimpleDebug" parent = frame:getParent() local item = frame.args["title"] and mw.wikibase.getEntityIdForTitle( args["title"] ) or mw.wikibase.getEntityIdForCurrentPage() or error('No entity'); local finalEvent = mw.wikibase.getAllStatements( item, 'P3967' ); local finalEventItem = finalEvent[1]["mainsnak"]["datavalue"]["value"]["id"]; local finalEventLocation = mw.wikibase.getAllStatements( finalEventItem, 'P276' ); local location = finalEventLocation[1]["mainsnak"]["datavalue"]["value"]; sd.allidx = true; return sd.namearray( {'item', item, 'finalEvent', finalEvent, 'finalEventItem', finalEventItem, 'finalEventLocation', finalEventLocation, 'location', location } ); 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)
Template used on this page:
Module:Sandbox/DannyS712/learning/doc
(
edit
)