Extension:SocialProfile

Summary
The following package of extensions will incorporate a social profile, user board, and basic profile information into MediaWiki, specifically Avatars, Friending, Foeing, User Board, Board Blast, basic Profile Information and User Levels rank system. The package also notifies users via email when other users request them as a friend or foe and/or sends them a message. The package was developed by Wikia, Inc.

Requirements

 * MediaWiki 1.11
 * Yahoo! User Interface Library (included in this package)
 * User Stats Package (included in this package)

Avatars
Users can upload an avatar which will appear on profile pages and user board posts. Administrators (or other users with the avatarremove privilege) can remove offensive or inappropriate avatars through Special:RemoveAvatar.



Profile Page
Users will have a profile page, which displays friendships with other users, basic profile information, and any public messages they received.



Editing Profile Information
Users can update their profile information with a simple form.



User Board
You can send public or private messages to other users with the User Board. The User Board supports wiki text and also has conversation threads between users.



Board Blast
Users can send messages to multiple friends or foes using Board Blast.



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 install the folder in a different location please change any path references below.

Create database tables
Run the script 'install.php' from the command line (Database superuser has to be mentioned in AdminSettings.php)

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

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

Update MediaWiki source code
Register AJAX functions by editing /includes/AjaxFunctions.php, add the following lines:

This code patch will probably be replaced with a hook that is to be created in the near future.

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 here.

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 the 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 Wikia 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'])

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 be in the staff usergroup). 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.

Special Page: Populate user profiles
To enable access to the special page Populate User Profiles, you need to be in the staff usergroup by default. If you do not have a usergroup called staff and you don't want to create it either, you can edit the file extensions/SocialProfile/UserProfile/SpecialPopulateExistingUsersProfiles.php by finding the line:

and changing the word 'staff' to the name of an existing usergroup of your choice, say, sysop or bureaucrat. Same goes for Special:UpdateEditCounts page (file extensions/SocialProfile/UserStats/SpecialUpdateEditCounts.php).

Custom Information
The titles of the custom text input boxes can be changed, via the pages:
 * 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 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.

Customization of Profile
The user profile allows several custom hooks to inject custom data into the profile. You can add anything above and below both columns of the profile by the following hooks:

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 SVN:
 * http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SocialProfile/

Older releases of SocialProfile extension can be also downloaded from MediaWiki SVN and they are located in the tags/extensions/SocialProfile/ directory:
 * http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/SocialProfile/

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