Jump to content

Module:User contrib

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Zackmann08 (talk | contribs) at 05:08, 16 October 2018. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}
local Userbox = require('Module:Userbox')
local getArgs = require('Module:Arguments').getArgs

function p.contrib(frame, args)
	if not args then
		args = getArgs(frame)
	end
	local pframe = frame:getParent()
	local pargs = pframe.args
	-- TODO: Need to get pagename if no arg2
	local username = args[2] or 'zackmann08'
	mw.logObject(args)
	-- mw.log(count)
	-- id-color	id-bg	info-color	info-bg
	local user_args = {}
	-- local id_color		= '#ff0000'
	-- local id_bg 		= '#00ff00'
	-- local info_color	= '#0000ff'
	-- local info_bg		= '#ff00ff'
	-- -- local root = mw.html.create()
	
	-- user_args['id-color'] = '#ff0000'BASEPAGENAME
	user_args['id'] = args[1]
	user_args['info'] = username ..'This user has made more than ' .. args[1] .. ' [https://xtools.wmflabs.org/ec/en.wikipedia.org/'..username..' contributions] to Wikipedia.'
	
	return Userbox.main('_userbox', user_args)
end

return p

	
	-- {{userbox
	-- 	| border-c      = 
	-- 	| id            = 
	-- 	| id-c          = 
	-- 	| id-fc         = 
	-- 	| id-s          = 
	-- 	| info          = 
	-- 	| info-c        = 
	-- 	| info-fc       = 
	-- 	| info-lh       = 
	-- 	| info-s        = 
	-- }}