欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Extension:SocialProfile
(→Issue) |
(→Issue) |
||
第65行: | 第65行: | ||
Relationship requests 时, 接受, 拒绝两个按钮都不起作用? | Relationship requests 时, 接受, 拒绝两个按钮都不起作用? | ||
− | 报错: 缺少对象 | + | 108行 报错: 缺少对象 |
==Links== | ==Links== | ||
*http://www.mediawiki.org/wiki/Extension:SocialProfile | *http://www.mediawiki.org/wiki/Extension:SocialProfile | ||
*http://halo.wikia.com/ | *http://halo.wikia.com/ |
2010年8月11日 (三) 03:54的版本
SocialProfile extension will incorporate 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. The package was developed by Wikia, Inc.
SocialProfile consists of 7 components:
- SystemGifts — awards functionality
- UserBoard — user-to-user messages
- UserGifts — gifting functionality
- UserProfile — social profile pages
- UserRelationship — friend/foe relationships
- UserStats — statistics, such as the User Levels system
- UserWelcome — <userWelcome/> parser hook for displaying social info on a wiki page
Install
获得代码
svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SocialProfile/ SocialProfile
上传 SocialProfile 到 extensions 目录下
修改 LocalSettings.php 增加以下内容
#SocialProfile require_once("extensions/SocialProfile/UserWelcome/UserWelcome.php"); require_once("extensions/SocialProfile/SocialProfile.php"); $wgExtraNamespaces[NS_USER_PROFILE] = 'User_profile'; $wgExtraNamespaces[NS_USER_WIKI] = 'UserWiki'; $wgUserProfileDisplay['friends'] = true; $wgUserProfileDisplay['foes'] = true; $wgUserBoard = true; $wgUserProfileDisplay['board'] = true; $wgUserProfileDisplay['stats'] = true; $wgUserStatsPointValues['edit'] = 50;
require_once("extensions/SocialProfile/UserStats/EditCount.php"); // Necessary edit counter // The actual user level definitions -- key is simple: 'Level name' => points needed $wgUserLevels = array( 'Recruit' => 0, 'Apprentice' => 1200, 'Private' => 1750, 'Corporal' => 2500, 'Sergeant' => 5000, 'Gunnery Sergeant' => 10000, 'Lieutenant' => 20000, 'Captain' => 35000, 'Major' => 50000, 'Lieutenant Commander' => 75000, 'Commander' => 100000, 'Colonel' => 150000, 'Brigadier' => 250000, 'Brigadier General' => 350000, 'Major General' => 500000, 'Lieutenant General' => 650000, 'General' => 800000, 'General of the Army' => 1000000, );
创建数据表
cd $MediaWiki maintenance 目录下 执行 php update.php // 这个功能很 cool :)
转移目录
mv extensions/SocialProfile/avatars ../../images mv extensions/SocialProfile/awards ../../images
上传头像时图片大小超过100kb会出现: // 调大些, extensions/SocialProfile/UserProfile/SpecialUploadAvatar.php 如-quality 120 , 120kb
Warning: Invalid argument supplied for foreach() in extensions/SocialProfile/UserStats/UserStatsClass.php on line 519
Issue
Relationship requests 时, 接受, 拒绝两个按钮都不起作用?
108行 报错: 缺少对象