Jump to content

Module:UserLinks/extra

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mr. Stradivarius (talk | contribs) at 06:39, 3 April 2014 (convert to the new makeWikilink function scheme). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

--------------------------------------------------------------------------------
-- This module holds extra link functions for use with [[Module:UserLinks]].
--
-- It is intended for experimenting with new link functions that will eventually
-- be added to the main module code.
--
-- Since this module is transcluded in only a small number of pages, changes
-- should cause little server overhead and should propagate quickly.
--
-- Link functions using the same link code as a function in the main module will
-- be ignored; please give your function a unique code.
--------------------------------------------------------------------------------

-- Load shared helper functions
local mShared = require('Module:UserLinks/shared')
local raiseError = mShared.raiseError
local makeWikitextError = mShared.makeWikitextError
local makeWikilink = mShared.makeWikilink
local makeUrlLink = mShared.makeUrlLink
local message = mShared.message

local linkFunctions = {}

function linkFunctions.sbx(snippets)
	-- User sandbox
	return makeWikilink(snippets.interwiki, 2, snippets.username .. '/sandbox', 'sandbox')
end

return {linkFunctions = linkFunctions}