Jump to content

Extension:RandomFeaturedUser

From mediawiki.org
Revision as of 22:31, 13 August 2012 by KrenairBot (talk | contribs) (This extension appears to be in SVN, not Git.)
MediaWiki extensions manual
RandomFeaturedUser
Release status: stable
Implementation Parser extension
Description Adds <randomfeatureduser> parser hook to display a random featured user along with some data
Author(s) Aaron Wright
David Pean
Jack Phoenix
Latest version 1.1
MediaWiki 1.16+
License GNU General Public License 2.0 or later
Download Template:WikimediaDownload/svn
$wgRandomFeaturedUser
Translate the RandomFeaturedUser extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

RandomFeaturedUser is an extension that adds <randomfeatureduser> parser hook to display a random featured user along with some data. To use it, type <randomfeatureduser period="weekly"/> or <randomfeatureduser period="monthly"/> on a page.

This extension requires the SocialProfile extension. You will need to set either $wgUserStatsTrackWeekly or $wgUserStatsTrackMonthly or both to true.

You can control what is displayed as the output of the tag. By default, the random featured user's avatar, amount of points and a blurb is displayed. To not display the avatar, set $wgRandomFeaturedUser['avatar'] = false;. To not display the amount of points, set $wgRandomFeaturedUser['points'] = false; and finally to not display the blurb, set $wgRandomFeaturedUser['about'] = false;.

Requirements

  1. SocialProfile extension

Installation

  1. Download the extension files
  2. Create the three required database tables
  3. Add require_once("$IP/extensions/RandomFeaturedUser/RandomFeaturedUser.php"); into the wiki's LocalSettings.php
  4. Installation can now be verified through the wiki's Special:Version

Usage

Type <randomfeatureduser period="weekly"/> or <randomfeatureduser period="monthly"/> on a page.