Extension:Challenge

From Linux Web Expert

This extension is not feature-complete yet! You are advised strongly against installing this on a production site for the time being. If you want to help out with the development, please get in touch with Jack Phoenix.
MediaWiki extensions manual
Challenge
Release status: beta
Implementation Special page
Description Allows challenging other users through Special:ChallengeUser. Challenge history and statistics can be viewed on their own, separate special pages.
Author(s)
Latest version 1.3
MediaWiki 1.39+
Database changes Yes
License GNU General Public License 2.0 or later
Download
CHANGELOG at Phabricator
  • challengeadmin
Quarterly downloads Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Public wikis using Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin').
Translate the Challenge extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The Challenge extension allows challenging other users through Special:ChallengeUser. When challenging another user, the challenger gets to lay out the terms, i.e. what users must do if they win/lose (for example, edit a certain page or write a new page, and so on).

Challenge history and statistics can be viewed on their own, separate special pages (Special:ChallengeHistory and Special:ChallengeStandings, respectively).

Like many other social tools, Challenge was originally developed at ArmchairGM, where it was used for a while between 2006-2007. It was fixed in late 2014 by Jack Phoenix for ShoutWiki.

Requirements

Installation

  • <translate> [[<tvar name=2>Special:ExtensionDistributor/Challenge</tvar>|Download]] and move the extracted <tvar name=name>Challenge</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
    <translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Challenge
  • <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
    wfLoadExtension( 'Challenge' );
    
  • <translate> Run the [[<tvar name=update>Special:MyLanguage/Manual:Update.php</tvar>|update script]] which will automatically create the necessary database tables that this extension needs.</translate>
  • File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>

User rights

The Challenge extension adds one new user right, challengeadmin, which allows picking the winner of an individual challenge when viewing the details of a challenge on Special:ChallengeView. This user right is granted to the sysop (administrator) user group by default.

Issues/To-do

5. UserActivity changes — this is from Sports (Gaming Newest).php (with some tweaks for fowards-compatibility & best practises, obviously):

						case 'challenge_sent':
							// @todo FIXME: i18n
							$challenge_link = "<a href=\"index.php?title=Special:ChallengeView&id={$item["id"]}\">challenge</a>";
							// "issued an accepted [[Special:ChallengeView/$1|challenge]] to $2 $3",
							$output .= "issued an accepted {$challenge_link} to {$user_link_2} {$item_time}</span>";
							$output .= "<div class=\"user-feed-item-comment\">{$item['pagetitle']}</div>";
							break;
						case 'challenge_rec':
							$challenge_link = "<a href=\"index.php?title=Special:ChallengeView&id={$item["id"]}\">challenge</a>";
							// "accepted a [[Special:ChallengeView/$1|challenge]] from $2 $3",
							$output .= "accepted a {$challenge_link} from {$user_link_2} {$item_time}</span>";
							$output .= "<div class=\"user-feed-item-comment\">{$item['pagetitle']}</div>";
							break;

5. For UserActivity::getTypeIcon():

	case 'challenge_rec':
	case 'challenge_sent':
		return 'challengeIcon.png';

6. Test email i18n messages out, improve the English text(s) as necessary and finally translate them to Finnish (fi)
7. Fix the "counter terms" (internal status code, as used in ChallengeView::displayChallenge etc. for this case is 2) functionality; right now it sends the challenge into a de facto infinite loop as far as the challenger and challengee are considered; I'm not sure if a challenge admin can do stuff with it.