Jump to content

Help:Extension:PictureGame

From mediawiki.org

Picture games are like social polls, except the main focus is on the images. Unlike quiz games, picture games have no "right" answer.

To play the picture game, go to Special:PictureGameHome and click on either of the images and you'll be taken to the next pair of images. If you come across an inappropriate image or image pair, click on the "Report images" link, which flags the picture game in question for administrator attention and temporarily removes it from circulation.

Creating a new picture game

[edit]

To create a new picture game, go to Special:PictureGameHome and click on the "Create new picture game" link. Give it a good title (for example, "Which one is cuter?") and select two images for it, either by uploading two new ones or using existing images (either from the local wiki or Wikimedia Commons, if the InstantCommons feature is enabled on the wiki).

Note that on uploading new images, you will not be able to customize the file name or supply any additional metadata (e.g. on the creator, copyright status, etc.) at this point. To prevent potential file name collisions, the uploaded files will be automatically prefixed with the current Unix time (e.g. the output of PHP's time() function at the upload), a hyphen and "imageOne" or "imageTwo", followed by the original file name to ensure uniqueness. This may result in a lot of files with ugly file names and inadequate metadata, so be aware of this.

Once the images have been selected, the "Create and play!" button will appear; click on it to finish the creation process.

Picture game creations are logged to Special:Log/picturegame.

Picture game administration

[edit]

By default administrators are given the picturegameadmin user right, which is needed to access the picture game admin panel. Via this UI privileged users can view flagged picture games and, if needed, unflag them, protect them and delete them.

Such privileged users can also edit the images used in picture games and add captions to them.

Administrative actions done to picture games by picture game admins are logged to Special:Log/picturegame.

Images uploaded via the picture game creation UI will be saved into the category defined in MediaWiki:Picturegame-images-category.

Restricting who can create new picture games

[edit]

It's possible to restrict the creation of new picture games so that users will need, for example, five edits or need to have two friends before they are allowed to create new picture games. This is similar to the same feature present in PollNY ($wgCreatePollThresholds) and QuizGame ($wgCreateQuizThresholds) for restricting who can create new polls and quizzes, or in SocialProfile ($wgUserProfileThresholds) restricting who can edit their social profile page. (Note that SocialProfile's $wgUserProfileThresholds uses edit instead of edits that PictureGame uses.)

For example:

$wgCreatePictureGameThresholds = [
	'edits' => 5,
	'comments' => 3
];

This would mean that users must have made five edits (to pages in the namespaces listed in $wgNamespacesForEditPoints array in the wiki's LocalSettings.php) and three comments before they would be allowed to create a new picture game.

All supported values for restriction:

  • edits — edits made to pages in the namespaces listed in $wgNamespacesForEditPoints array
  • comments — # of comments left on pages using the Comments extension (such as blog pages)
  • comment_score_plus — # of times your comment got upvoted
  • comment_score_minus — # of times your comment got downvoted
  • recruits — # of users referred to the wiki via special referral links
  • friend_count — # of friends you have
  • foe_count — # of foes you have
  • weekly_wins — times you've been the weekly winner
  • monthly_wins — times you've been the monthly winner
  • only_confirmed_email — self-explanatory, isn't it?
  • poll_votes — # of polls you've voted in
  • picture_game_votes — # of picture games you've voted in
  • quiz_created — # quizzes created
  • quiz_answered — # quizzes answered in total
  • quiz_correct — # of points gotten by taking quizzes and getting the answer correct
  • quiz_points — # of points gotten by taking quizzes

In practise, one or two restrictions are probably sufficient enough to curb abuse. All of the available restrictions are documented here for completeness' sake, but it would likely be highly impractical to use restrictions like weekly_wins or monthly_wins.

Points

[edit]

It's possible to give out points for both creating new picture games and for playing existing ones. A system administrator should define the following variables in the wiki's LocalSettings.php file for that:

  • $wgUserStatsPointValues['picturegame_created'] — the amount of points received for creating a brand new picture game
  • $wgUserStatsPointValues['picturegame_vote'] — the amount of points received for voting in an existing picture game