Module:User contrib/sandbox: Difference between revisions

Content deleted Content added
added url parameter
sync
 
(10 intermediate revisions by 2 users not shown)
Line 25:
local formated_count
local count = args[1] or '1'
local userplural = 'users'
if count:match('^[%d,]*$') then
Line 30 ⟶ 31:
count = tonumber(count)
formated_count = mw.getContentLanguage():formatNum( count )
if count == 1 then plural = '' end
-- 0-9,999 is shades of green
if count < 1000 then id_fc = '#000000'; id_c = '#dddddd'; info_fc = '#000000'; info_c = '#eeeeee'
Line 105 ⟶ 107:
local user_args = {}
local language = ''
if not args['url'] then
local if args['lang'] then language = 'the '.. args['lang'] ..' ' end
if local project = args['langproject'] thenor 'Wikipedia'
language local project_site = 'the '.. args['langprojsite'] or 'en.wikipedia.' org'
local urluser = args['urluser']
end
local projectusername = args['project'2] or 'Wikipedia'mw.title.getCurrentTitle().baseText
local url = args['url'] or args['link'] or 'https://xtools.wmflabs.org/ec/'.. project_site .. '?username=' ..urlencode(username)
local project_site = args['projsite'] or 'en.wikipedia.org'
local user = 'user'
local username = args[2] or mw.title.getCurrentTitle().baseText
local url = 'https://xtools.wmflabs.org/ec/'.. project_site .. '?username=' ..urlencode(username)
else
local url = args['url']
end
local deleted, reverted, articles, automated, distinct, unique, images, insane = '','','','', '', '', '', ''
if args['deleted'] then deleted = ', over <b>' ..formatNumber(args['deleted'])..'</b> of which were to pages that are now deleted' end
if args['deletededitarticles'] then reverted articles = ', over <b>' ..formatNumber(args['deletededitarticles'])..'</b> of which were subsequentlyto revertedarticles' end
if args['articlesautomated'] then articles automated = ', over <b>' ..formatNumber(args['articlesautomated'])..'</b> of which were to articlesautomated' end
if args['automateddistinct'] then automated distinct = ', on over <b>' ..formatNumber(args['automateddistinct'])..'</b> of which weredistinct automatedpages' end
if args['distinctunique'] then distinctunique = ', on over <b>' ..formatNumber(args['distinctunique'])..'</b> distinctunique pages' end
if args['uniqueimages'] then uniqueimages = ', onincluding over <b>' ..formatNumber(args['uniqueimages'])..'</b> uniqueuploaded pagesimages' end
if args['imagesinsane'] then imagesinsane = ' and, includingas overa <b>'result, ..formatNumber(args['images'])..'</b>may be uploadedslightly imagesinsane' end
if args['insanebot'] then insane user = ' and, as a result, may be slightly= insane'bot' end
if args['bot'] then user = 'bot' end
user_args['id-s'] = 12
Line 141 ⟶ 136:
url = 'https://en.wikipedia.org/w/index.php?title=Special:Log&user='..urlencode(username)
user_args['info'] = '<span class="plainlinks neverexpand">This user has logged ['..url..' more than '.. '<b>'..formated_count..'</b>'..
' movesmove' .. plural .. ' or other log actionsaction' .. plural .. '] on '.. language.. project
.. automated
.. deleted
.. reverted
.. articles
.. distinct
Line 158 ⟶ 152:
..'"> more than '
.. '<b>'..formated_count..'</b>'
.. ' contributionscontribution' .. plural .. '</span>] to '.. language.. project
.. automated
.. deleted
.. reverted
.. articles
.. distinct