Extension:SocialProfile

The SocialProfile extension incorporates a social profile, user board, and basic profile information into MediaWiki, specifically avatars, friending, foeing, user board, board blast, basic profile information, user levels rank system, awards and gifts. The package also notifies users via email when other users request them as a friend or foe and/or sends them a message.

You'll need MediaWiki or newer for this extension. Everything else required by SocialProfile is included in the package already.

If you are upgrading from SocialProfile version 1.2 or older, you'll need to create four new database tables manually: gift, system_gift, user_gift and user_system_gift. If you're upgrading from 1.3, you'll need to create user_system_messages database table.

Screenshots

 * Please see Extension:SocialProfile/Screenshots for screenshots of the extension and some very brief descriptions of the features.

Installation
To install SocialProfile extension, please follow the steps below.

Copy All Necessary Files into the Extension Folder
First, copy all files into the extensions folder, maintaining the current file structure. For example:

If you use the ExtensionDistributor to download SocialProfile, make sure that you select "master (latest development version)"; older versions are guaranteed to have lots of bugs and they are unmaintained, while trunk is always up-to-date and contains the newest features and bugfixes!

LocalSettings.php
Open LocalSettings.php in your favourite non-Windows Notepad text editor and add the following line:

Since r93317, SocialProfile's namespaces are automagically registered, so you do not need to add them to $wgExtraNamespaces.

SocialProfile uses either ImageMagick or PHP's built-in GD library (since r93067), depending on which one is available, for creating the resized avatar, award and gift image files.

Create database tables
Run MediaWiki's standard update script, update.php from command line to create the necessary database tables.

In older versions of SocialProfile, there was a script named 'install.php' in SocialProfile's directory, which was used to initialize the tables.

Directories
The following directories should exist under the wiki's $wgUploadDirectory:
 * avatars/ &mdash; the directory where all user-uploaded avatar images are stored
 * awards/ &mdash; system gift (award) and normal gift images will be stored here

Please read below for more info.

Add Default Avatar Images
Please move the directory  from   for images used in your MediaWiki installation. This directory should be writable.

Add Awards Folder
Please move the directory  from   into the images directory that is used in your MediaWiki installation. This directory should be writable. The images included in this folder by default can be used for awards if you upload them through Special:SystemGiftManagerLogo, but they won't show up as "defaults" the same way avatar default images do show up.

Settings
Some features will not work without additional modifications, but if chosen by the site admin, may be left out.

Friends/Foes
To enable friends/foes to display on the user page, the following additions need to be made to LocalSettings.php:

The following settings should be placed directly under the require_once line:

Board
To enable the Board to display on the user page, allowing users to view messages posted, the following additions need to be made to LocalSettings.php:

The following settings should be placed directly under the require_once line:

User-specific statistics
To enable per-user statistics that show up on the profile pages, add the following into your wiki's LocalSettings.php:

Points/rank system
User Levels show on the users' profile pages and on various other places across the wiki. This feature is available from SocialProfile version 1.1 onwards (37590).

Note that this feature must be correctly configured, or it can interfere with other features, such as avatar upload and messaging. See the discussion on the talk page.

To enable User Levels, add something like the following into your wiki's LocalSettings.php, after calling SocialProfile.php:

You may also want to configure the actions for which points are being awarded. By default, 50 points are awarded on a main namespace edit. The defaults are:

Most of the above require separate social extensions to be installed and configured. However, there are actions for which you can give out points without installing separate extensions. These actions are:
 * editing ($wgUserStatsPointValues['edit'])
 * friending another user ($wgUserStatsPointValues['friend'])
 * foeing another user ($wgUserStatsPointValues['foe'])
 * uploading your first avatar ($wgUserStatsPointValues['user_image'])
 * sending a gift ($wgUserStatsPointValues['gift_sent'])
 * receiving a gift ($wgUserStatsPointValues['gift_rec'])

Even if you didn't want to change the defaults, you might need to re-define one $wgUserStatsPointValues variable after including EditCount.php and defining $wgUserLevels. You could just add the following default to your wiki's LocalSettings.php, assuming that you don't want to change it:

After UserLevels is configured, you might want to visit Special:UpdateEditCounts to initialize the points (requires you to have the updatepoints user right). You should also visit this page every time after changing $wgUserStatsPointValues.

The list of users with the most points can be seen at Special:TopUsers.

New Configuration Variables Introduced in 1.3

 * $wgUserGiftsDirectory</tt> &mdash; path to UserGifts files. Defaults to $IP/extensions/SocialProfile/UserGifts</tt>.
 * $wgUserGiftsScripts</tt> &mdash; similar to the above. Defaults to $wgScriptPath/extensions/SocialProfile/UserGifts</tt>.
 * $wgSystemGiftsDirectory</tt> &mdash; path to SystemGift files. Defaults to $IP/extensions/SocialProfile/SystemGifts</tt>.
 * $wgSystemGiftsScripts</tt> &mdash; Defaults to $wgScriptPath/extensions/SocialProfile/SystemGifts</tt>.
 * $wgFriendingEnabled</tt> &mdash; whether to enable friending or not. Not really effective, don't rely on it.
 * $wgMaxCustomUserGiftCount</tt> &mdash; maximum number of private custom gifts that a user may create. If not set (as per default), normal users cannot access Special:GiftManager, only those with giftadmin privileges can access it. Please note that when this is set, users can create their own gifts but they cannot delete them.
 * $wgGiveGiftPerRow</tt> &mdash; (description needed)

New Special Pages in 1.3 release

 * Related to SystemGifts a.k.a the award functionality:
 * Special:TopAwards &mdash; lists the awards that have been given out the most times.
 * Special:ViewSystemGifts &mdash; a special page for viewing all of your own awards.
 * Special:ViewSystemGift &mdash; not meant to be accessed directly.
 * Special:SystemGiftManager &mdash; allows to add and remove awards, requires the awardsmanage right.
 * Special:SystemGiftManagerLogo &mdash; allows to upload award images which will be stored in the awards</tt> folder. Restricted to users with the awardsmanage right.
 * Special:PopulateAwards &mdash; a special page to give out awards. Restricted to users with awardsmanage right.


 * Related to UserGifts a.k.a user-to-user gifting functionality:
 * Special:GiveGift &mdash; a special page that allows you to give a gift to another wiki user.
 * Special:ViewGifts &mdash; a special page for viewing all your own gifts.
 * Special:ViewGift &mdash; not meant to be accessed directly.
 * Special:GiftManager &mdash; allows to add, remove and modify gifts. Restricted to users with the giftadmin right or all logged-in users if $wgMaxCustomUserGiftCount is set.
 * Special:GiftManagerLogo &mdash; allows to upload new gift images, restricted to users with the giftadmin right.
 * Special:RemoveMasterGift &mdash; allows to remove a gift completely, restricted to users with giftadmin right.
 * Special:RemoveGift &mdash; allows an individual user to remove a gift given to him/her.

Restricted Special Pages
Certain special pages introduced by SocialProfile extension are restricted to the staff user group by default. To enable access to the special page Special:PopulateUserProfiles, create a user group called staff and add yourself into the group.

If you do not want to create such a user group however, you can manually edit the file extensions/SocialProfile/UserProfile/SpecialPopulateUserProfiles.php</tt>.

Custom Information
The titles of the custom text input boxes can be changed via the following system messages:
 * MediaWiki:Custom-info-field1
 * MediaWiki:Custom-info-field2
 * MediaWiki:Custom-info-field3
 * MediaWiki:Custom-info-field4

Logging
SocialProfile adds two logs: avatar log (Special:Log/avatar), which tracks avatar image uploads and user profile log (Special:Log/profile), which tracks changes to users' social profiles. Since version 1.1 (37590), avatar and profile logs can be hidden from the recent changes as they tend to flood the recent changes list quickly.

To turn off the display of avatar uploads, set:

To turn off the display of user profile changes, set:

Both of these variables are pre-set to false in version 1.1.

Permissions

 * avatarremove</tt> &mdash; allows access to Special:RemoveAvatar, it allows removal of others' avatars. Given to 'sysop' and 'staff' groups by default.
 * awardsmanage</tt> &mdash; allows access to Special:PopulateAwards and Special:SystemGiftManager. Given to 'awardsmanage', 'sysop' and 'staff' groups by default.
 * editothersprofiles</tt> &mdash; allows access to Special:EditProfile, a special page to edit other users' social profiles. Given to the 'staff' group by default; since 84989.
 * <tt>generatetopusersreport</tt> &mdash; allows accessing Special:GenerateTopUsersReport, which can be used to generate the report of top users, and thus to give out points for having the most points for a week or for a month; available since r91854. By default no group has this right.
 * <tt>giftadmin</tt> &mdash; allows access to Special:GiftManager. Given to 'giftadmin', 'sysop' and 'staff' groups by default.
 * <tt>updatepoints</tt> &mdash; available since r50604. Users with this right are allowed access to Special:UpdateEditCounts. By default no group has this right.
 * <tt>userboard-delete</tt> &mdash; available since r50565. Users with this right can delete other users' board messages. By default no group has this right.

Developer Info

 * Please see Extension:SocialProfile/For developers for info on how to develop SocialProfile, submit patches and more.

Reporting software bugs
Bugs and issues can be reported on the MediaWiki Bugzilla (preferred) or on the [//www.mediawiki.org/w/index.php?title=Extension_talk:SocialProfile&action=edit&section=new extension's talk page].

Licensing and downloads
The extension is available under the GNU General Public License 2.0 or later, and the newest version can always be downloaded from MediaWiki git:
 * https://git.wikimedia.org/git/mediawiki/extensions/SocialProfile.git (https://git.wikimedia.org/summary/mediawiki%2Fextensions%2FSocialProfile.git for the web-based viewer)

The software is provided as-is. Updates will be made when critical vulnerabilities are discovered.