Extension talk:SpecialUserScore/Archive

From mediawiki.org
Latest comment: 12 years ago by Nicjansma in topic MediaWiki 1.18.0
The following discussion has been transferred from Meta-Wiki.
Any user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).

Restriction?

Why restrict this page? e.g., in every board is an userlist with the number if contributions and much more data?!?! --Nyks 18:28, 25 December 2006 (UTC)Reply

If you like it in the common list of special pages, just replace the registration line in extensions/SpecialUserScore.php:
SpecialPage::addPage( new SpecialPage( 'UserScore' , 'userrights') );
by
SpecialPage::addPage( new SpecialPage( 'UserScore' ));
-- 84.113.249.152 20:45, 14 March 2007 (UTC)Reply
thanks! --Nyks 01:34, 15 March 2007 (UTC)Reply

Accuracy of Evaluation?

Is there an easy possibility to enhance the quality of the evaluation, e.g. by adding up also the number of bytes for each contribution? This might slow down the script a little bit, however for small wikis this should not be a problem. -- 84.113.249.152 20:39, 14 March 2007 (UTC)Reply

Last Login

Is it possible to update this extension to let it show the last login timestamp for displayed users? Would be great! Greetings Tim.

Change for Special:Contributions link

I made a change to the source:

function formatResult( $skin, $result ) {
  global $wgContLang;
 
  $title = Title::makeTitle( NS_USER, $result->name );
  $real_name  = $result->real_name ;
  $plink = $skin->makeLinkObj( $title, $title->getText() );
  $nl= $result->value . " Edits on " . $result->page_value . " pages";
  $nlink = $skin->makeKnownLink(
    $wgContLang->specialPage( 'Contributions' ),
    $nl,
    'target=' . $title->getPrefixedURL() );
  return "$plink $real_name ($nlink)";
}

To:

function formatResult( $skin, $result ) {
  global $wgContLang;

  $title = Title::makeTitle( NS_USER, $result->name );
  $real_name  = $result->real_name ;
  $plink = $skin->makeLinkObj( $title, $title->getText() );
  $nl= $result->value . " Edits on " . $result->page_value . " pages";
  $nlink = $skin->makeKnownLink(
    $wgContLang->specialPage( 'Contributions' ),
    $nl,
    'target=' . $result->name );
  return "$plink $real_name ($nlink)";
}

This change was made because the link to Special:Contributions would pass User:<username> instead of just <username>
--Imandir 19:52, 26 September 2007 (UTC)Reply

Not working with MediaWiki 1.11.0 / PostgreSQL

Great tool until i switched to 1.11.0 with postgresql. Anyone experienced with the sql problem?

A database error has occurred Query: SELECT COUNT(wr.rev_id) as value, COUNT(DISTINCT wr.rev_page) as page_value, wu.user_name as name, wu.user_real_name as real_name FROM mwuser wu, revision wr, page wp WHERE wu.user_id = wr.rev_user and wp.page_id = wr.rev_page and wp.page_namespace = 0 GROUP BY wu.user_name ORDER BY value DESC LIMIT 50 OFFSET 0 Function: Error: 1 ERROR: column "wu.user_real_name" must appear in the GROUP BY clause or be used in an aggregate function

 Backtrace:
 
 #0 /srv/www/htdocs/mediawiki/includes/Database.php(779): DatabasePostgres->reportQueryError('ERROR: column ...', 1, '? ...', '', false)
 #1 /srv/www/htdocs/mediawiki/includes/QueryPage.php(333): Database->query('? ...')
 #2 /srv/www/htdocs/mediawiki/includes/SpecialUserScore.php(116): QueryPage->doQuery(0, 50)
 #3 /srv/www/htdocs/mediawiki/includes/SpecialPage.php(653): wfSpecialUserScore(NULL, Object(SpecialPage))
 #4 /srv/www/htdocs/mediawiki/includes/SpecialPage.php(459): SpecialPage->execute(NULL)
 #5 /srv/www/htdocs/mediawiki/includes/Wiki.php(201): SpecialPage::executePath(Object(Title))
 #6 /srv/www/htdocs/mediawiki/includes/Wiki.php(45): MediaWiki->initializeSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
 #7 /srv/www/htdocs/mediawiki/index.php(89): MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User), Object(WebRequest))
 #8 /srv/www/htdocs/mediawiki/index.php5(1): require('/srv/www/htdocs...')
 #9 {main}

Thanks in advance
Chris

I seem to have the same problem
xlq

Include Deleted Pages?

If I have 100 edits on page A, and then page A is deleted, I have 0 edits. How can I get this extension to show the edits on deleted pages? Those should count for something! Timneu22 16:39, 3 March 2008 (UTC)Reply

Placing files in include/

For those who don't like placing extension files anywhere other than in the extensions/ hierarchy, you can do the following:

  1. In the first file, modify the wfExtensionSpecialUserScore() function as follows:
    1. Add $IP to the list of global variables.
    2. Change the SpecialPage::addPage call to something like "SpecialPage::addPage( new SpecialPage( 'UserScore' , 'userrights', true, false, "$IP/extensions/SpecialUserScore/SpecialUserScore_include.php") ); (assuming you've got the extension installed in extensions/SpecialUserScore).
  2. Save the second file as SpecialUserScore_include.php in the appropriate path.

-- Schneelocke 12:44, 5 July 2008 (UTC)Reply

Test successfully on mediawiki 1.14

Place source file SpecialUserScore.php in $IP/includes/specials instead of $IP/includes. Others remain in the same directory as instructed before.

-- ckhsu 11:24, 10 April 2009 (UTC)Reply

I can verify this that it does work on 1.14, and the file $IP/includes/SpecialUserScore.php should be in $IP/includes/specialsSpecialUserScore.php

-- WeedApe 9:54, 5 May 2009 (UTC)

Test on mediawiki 1.15

  • Semi-successful. Will install correctly, but doesn't count every edit nor does it count using any method I can determine (such as one count for each page edited in 24 hours). Highly inaccurate, as it seems to report a bit over 1/3rd of actual edits.--96.19.156.242 01:13, 18 July 2009 (UTC)Reply

MediaWiki 1.18.0

After I upgraded my site from 1.15.0 to 1.18.0, this was one of the extensions that was broken. I fixed the problems and copied the source into a GitHub repository[1]. Nicjansma 22:32, 18 December 2011 (UTC)Reply