Extension:SocialProfile

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Social Profile

Release status: stable

Implementation Special page, Database, Ajax
Description Incorporates a basic social profile into a MediaWiki, specifically Avatars, Friending, Foeing, User Board, Board Blast, and basic Profile Information.
Author(s) Wikia, Inc. (David Pean and Aaron Wright)
MediaWiki 1.11
License GPL 2.0
Download MediaWiki SVN

Contents

[edit] 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, and basic Profile Information. 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.

[edit] Requirements

  • MediaWiki 1.11
  • Yahoo! User Interface Library (an extension for including the js is included in this package)
  • User Stats Package (included in this package)

[edit] Screen Shots

[edit] Avatars

Users can upload an avatar which will appear on profile pages and user board posts.

[edit] Profile Page

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

[edit] Editing Profile Information

Users can update their profile information with a simple form.

[edit] 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.

[edit] Board Blast

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

[edit] Installation

To install the social profile, please follow the below steps.

[edit] Copy All Necessary Files into the Extension Folder

First, copy all files into the extensions folder, maintaining the current file structure. If you install the folder in a different location please change any path references below.

[edit] Create database tables

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

[edit] LocalSettings.php

Open LocalSettings.php in your favourite text editor and add the following lines:

require_once("$IP/extensions/SocialProfile/SocialProfile.php");
$wgExtraNamespaces[NS_USER_PROFILE] = "User_profile";
$wgExtraNamespaces[NS_USER_WIKI] = "UserWiki";

[edit] Add Default Avatar Images

Please move the directory avatars from extensions/SocialProfile for images used in your MediaWiki installation. This directory should be writeable.

[edit] Update MediaWiki source code

Register AJAX functions by editing /includes/AjaxFunctions.php, add the following line (changing path as neccessary)

global $IP;
require_once("$IP/extensions/SocialProfile/UserBoard/UserBoard_AjaxFunctions.php");
require_once("$IP/extensions/SocialProfile/UserRelationship/Relationship_AjaxFunctions.php");

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

[edit] 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:

Note Note: If you don't use them, you don't need to pay them any special attention.
$wgHooks['UserProfileBeginLeft'][] = 'wfUserProfileBeginTest';
function wfUserProfileBeginTest($user_profile) {
        global $wgOut;
        $wgOut->addHTML("this was inserted at the left beginning from the hook [profile:{$user_profile->user_name}]");
        return true;
}
 
$wgHooks['UserProfileEndLeft'][] = 'wfUserProfileBeginTest2';
function wfUserProfileBeginTest2($user_profile) {
        global $wgOut;
        $wgOut->addHTML("this was inserted at the left end from the hook [profile:{$user_profile->user_name}]");
        return true;
}
 
$wgHooks['UserProfileBeginRight'][] = 'wfUserProfileBeginTest3';
function wfUserProfileBeginTest3($user_profile) {
        global $wgOut;
        $wgOut->addHTML("this was inserted at the right beginning from the hook [profile:{$user_profile->user_name}]");
        return true;
}
 
$wgHooks['UserProfileEndRight'][] = 'wfUserProfileBeginTest4';
function wfUserProfileBeginTest4($user_profile) {
        global $wgOut;
        $wgOut->addHTML("this was inserted at the right end from the hook [profile:{$user_profile->user_name}]");
        return true;
}

[edit] Licensing and downloads

The extension is available under the GNU General Public License 2.0 or later, and can be downloaded from MediaWiki SVN:

http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SocialProfile/

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

Personal tools