View source for Module:FindYDCportal

Jump to navigation Jump to search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in one of the groups: Users, Administrators, Trusted.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

--[[
For a given 3- or 4-digit year or decade, find the most specific portal
which actually exists.
Takes one parameter, which must be either a year (e.g. "1879", "1123")
or a decade (e.g. "1940s", "790s").
If a portal is found, return its name with out the nmaespace prefix
(e.g. for "Portal:1980s" rerurn "1980s"); otherwise return an empty string.
If the parameter is missing, empty, or does not fit the required format,
an empty string is returned"
]]
local p = {}
-- check for the existence of a portal with the given name
-- if it exists, returns the name
-- otherwise returns nil
function doesPortalExist(portalName)
local portalPage = mw.title.new( portalName, "Portal" )
if (portalPage.exists) then
return portalName
end
הההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Template used on this page:

Return to Module:FindYDCportal.