Jump to content

Extension:Challenge

From mediawiki.org
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 0
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

[edit]

Installation

[edit]
  • Download and move the extracted Challenge folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Challenge
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Challenge' );
    
  • Run the update script which will automatically create the necessary database tables that this extension needs.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

User rights

[edit]

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

[edit]

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.