Topic on Extension talk:Contribution Scores

Jump to navigation Jump to search

change the way score is calculated

1
Rbirmann (talkcontribs)

Hi,

First of all, just wanted to say this extension is great.

We have installed it in our corporate wiki, as part of an internal program to motivate users to contribute to it. We would like, however, to give more points to users who create new articles as well as to differentiate longer, well thought, editions (such as a 5 paragraph long new section on an article) from shorter, quicker, less relevant changes (such as a one letter typo correction).

While thinking about this it came to me that maybe it is possible to allow users to create, on their LocalSettings.php a custom calculating function. I am no php expert myself, so please see the pseudo-code below:

on the extension itself:


efContributionScores_Render (...)
  
  for u in all_users do

    new_articles = countNewArticles(u)
    total_edits = countTotalEdits(u)
    unique_edits = countUniquePageEdits(u)
    other_data = countOtherRelevantData(u)
    (...)

    if function_exists "csCustomUserCalculation" then

      score[u] = csCustomUserCalculation (new_articles, total_edits, unique_edits, other_data)

    else

      score[u] = unique_edits + 2 * sqrt(total_edits - unique_edits)    // default behaviour
  
    end if

  end for

return score


Users would then be able to add a custom way of calculating scores to their LocalSettings, something like this (again in pseudo-code):


csCustomUserCalculation (new_articles, total_edits, unique_edits, ...)

    score = 10 * new_articles + total_edits

return score

Any thoughts???

Rbirmann (talk) 16:10, 22 January 2015 (UTC)

Reply to "change the way score is calculated"