Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Tfd links
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!
-- This module implements [[Template:Tfd links]] local p = {} local function urlencode(text) -- Return equivalent of {{urlencode:text}}. local function byte(char) return string.format('%%%02X', string.byte(char)) end return text:gsub('[^ %w%-._]', byte):gsub(' ', '+') end local function fullurllink(t, a, s) return '[//en.wikipedia.org/w/index.php?title=' .. urlencode(t) .. '&' .. a .. ' ' .. s .. ']' end function p.main(frame) local args = frame:getParent().args local ns = (((args['catfd'] and args['catfd'] ~= '') and 'Category') or (args['module'] and args['module'] ~= '') and 'Module') or 'Template' local tname = mw.getContentLanguage():ucfirst(args['1']) local fname = ns .. ':' .. tname local fullpagename = frame:preprocess('{{FULLPAGENAME}}') local sep = ' <b>Β·</b> ' local res = '<span id="' .. ns .. ':' .. tname .. '" class="plainlinks nourlexpansion 1x">' .. '[[:' .. ns .. ':' .. tname .. ']] (' .. '[[' .. ns .. ' talk:' .. tname .. '|talk]]' .. sep .. fullurllink(fname, 'action=history', 'history') .. sep .. fullurllink('Special:Whatlinkshere/' .. fname, 'limit=5000&hidelinks=1&hideredirs=1', 'transclusions') .. sep .. fullurllink('Special:Log', 'page=' .. urlencode(fname), 'logs') .. sep .. '[[Special:PrefixIndex/' .. fname .. '/|subpages]]<span class="sysop-show">' .. sep .. fullurllink(fname, 'action=delete&wpReason=' .. urlencode('[[' .. fullpagename .. '#' .. fname .. ']]'), 'delete') .. '</span>)</span>' return res 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:
Template:Tl
(
edit
)
Module:Tfd links/doc
(
edit
)