Editing Module:Test

From Test Wiki
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.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 5: Line 5:
]]
]]


local _module = {}
local p ={}
function p.Main(frame)
local m_title = mw.title.new(tonumber(frame.args[1]))
local m_exist = m_title ~= nil
local m_pageidlink = '[[:mw:Manual:Page_table/ja#page_id|ID]] : [[Special:Redirect/page/' .. frame.args[1] .. '|' .. frame.args[1] .. ']]'
local m_titlestring = ''
local m_talkpagelink = ''
local m_historyurl = ''
local m_loglink = ''
local m_whatlinkshere = ''

if m_exist then
m_titlestring = mw.allToString(m_title)
m_talkpagelink = '[[' .. mw.allToString(m_title.talkPageTitle) .. '|ノート]]'
m_historyurl = '[' .. mw.allToString(mw.uri.fullUrl(m_titlestring,'action=history')) .. ' 履歴]'
m_loglink = '[//ja.wikipedia.org/w/index.php?title=%E7%89%B9%E5%88%A5:Log&page=' .. mw.uri.encode(m_titlestring,"WIKI") .. ' ログ]'
m_whatlinkshere = '[[Special:WhatLinksHere/' .. m_titlestring .. '|リンク元]]'
end
if m_exist then
if m_title.isTalkPage then
return m_pageidlink .. '<span style="font-size:smaller" class="plainlinks">(' .. m_historyurl .. ' / ' .. m_loglink .. ' / ' .. m_whatlinkshere .. ')</span>'
else
return m_pageidlink .. '<span style="font-size:smaller" class="plainlinks">(' .. m_talkpagelink .. ' / ' .. m_historyurl .. ' / ' .. m_loglink .. ' / ' .. m_whatlinkshere .. ')</span>'
end
else
return m_pageidlink .. '<span style="font-size:smaller">(非存在)</span>'
end
end
return p
Cancel Editing help (opens in new window)

  [] · [[]] · [[|]] · {{}} · · “” ‘’ «» ‹› „“ ‚‘ · ~ | ° &nbsp; · ± × ÷ ² ³ ½ · §
     [[Category:]] · [[:File:]] · [[Special:MyLanguage/]] · Special:MyLanguage/ · <code></code> · <nowiki></nowiki> <code><nowiki></nowiki></code> · <syntaxhighlight lang="php"></syntaxhighlight> · <includeonly></includeonly> · <noinclude></noinclude> · #REDIRECT[[]] · <translate></translate> · <languages/> · {{#translation:}} · <tvar name=1></tvar> · {{DEFAULTSORT:}} · <s></s>