跳转到内容

模組:Indicator

被永久保护的模块
维基百科,自由的百科全书

这是本页的一个历史版本,由Kovl留言 | 贡献2015年2月25日 (三) 07:17 建立内容为“--模块控制indicator功能 local z = {} function z.main( frame ) local args = require('Module:Arguments').getArgs local text if args.image an...”的新页面)编辑。这可能和当前版本存在着巨大的差异。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)
--模块控制indicator功能
local z = {}

function z.main( frame )
	local args = require('Module:Arguments').getArgs
	local text
	if args.image and args.image  ~= ''  then
		text = '[[File:' .. args.image .. '|' .. args.size .. '|' .. args.alt .. '|link=' .. args.link .. ']]'
	end
	if args.text and args.text  ~= ''  then
		text = text .. args.text
	end
	if args.title and args.title ~= '' then
		text = tostring( mw.html.create( 'div' ):attr( 'title', args.title ):wikitext( text ) )
	end
	return frame:extensionTag{
		name = 'indicator',
		content = text,
		args = { name = string.format( '%x', require( 'Module:Crc32lua' ).crc32( text ) ) },
	}
end

return z