WIKI使用導航
站長百科導航
站長專題
- 網(wǎng)站推廣
- 網(wǎng)站程序
- 網(wǎng)站賺錢
- 虛擬主機
- cPanel
- 網(wǎng)址導航專題
- 云計算
- 微博營銷
- 虛擬主機管理系統(tǒng)
- 開放平臺
- WIKI程序與應用
- 美國十大主機
SPB-可配置服務-積分
來自站長百科
導航: 上一頁
積分是指Application的哪些操作會影響到用戶的積分,在積分項目及積分規(guī)則中進行相應設置。
積分類別分為:基礎積分、聲譽積分、信譽積分、交易積分。只有交易積分可以減少,其他類別的積分只能不斷增加(處罰時除外)。
- 基礎積分用于體現(xiàn)用戶在站點的參與程度;
- 聲譽積分用于體現(xiàn)用戶在站點的知名度;
- 信譽積分用于體現(xiàn)用戶在站點的真實及誠信指數(shù);
- 交易積分是用于在站點內(nèi)流通的虛擬貨幣。
一、積分項目(PointItems)
示例:
注意:ItemKey必須唯一
二、積分項目積分規(guī)則(UserPointItemRules)
示例:
三、綜合積分規(guī)則
為了保證客觀性經(jīng)常需要從多個角度對積分主體進行評價,因此需要設置綜合積分規(guī)則。
例如:用戶等級是根據(jù)用戶的綜合積分來進行計算的,用戶的綜合積分默認設置為:
- 用戶綜合積分=基礎積分/2 + 聲譽積分 + 信譽積分
- 活動積分=活動參與人數(shù)*1+活動照片*0.5+活動留言*0.2+活動瀏覽量*0.01
- 圈子積分=成員數(shù)量*1+圈子內(nèi)容數(shù)量*0.1+瀏覽量*0.01+SUM(活動積分)*0.1
- 博客積分=文章數(shù)*4+評論數(shù)*1+瀏覽量*0.1
- 相冊積分=圖片數(shù)*4+評論數(shù)*1+瀏覽量*0.1
四、積分記錄 記錄積分收入、支出記錄。
五、如何使用積分?
- 關于積分項目的分析以及配置,參見“如何使用權限”;
- 如何增減積分并自動積分記錄
采用ExtensionModule進行積分處理,例如:SpaceBuilder.Forum.Modules.DisposePointForForum
/// <summary> /// 處理與論壇相關的積分 /// </summary> public class DisposePointForForum : IForumModule { #region IForumModule 成員 public void Init(ForumEventManager eventManager, System.Xml.XmlNode node) { eventManager.AfterForumThreadChange += new ForumThreadEventHandler(eventManager_AfterForumThreadChange); eventManager.AfterForumPostChange += new ForumPostEventHandler(eventManager_AfterForumPostChange); eventManager.SetForumThreadSpecial += new ForumThreadSpecialEventHandler(eventManager_SetForumThreadSpecial); } void eventManager_AfterForumThreadChange(ForumThread forumThread, GlobalEventArgs e) { if (e.State == ObjectState.Create || e.State == ObjectState.Delete) { List<UserPointRecord> records = new List<UserPointRecord>(); UserPointItemRole role = null; string userPointRecordDescription = string.Empty; if (e.State == ObjectState.Create) { role = SpaceBuilder.Common.Points.GetUserPointItemRole(UserPointItemKeys.Instance().CreateForumThread()); userPointRecordDescription = "發(fā)布論壇主題:" + forumThread.Subject; } else if (e.State == ObjectState.Delete) { role = SpaceBuilder.Common.Points.GetUserPointItemRole(UserPointItemKeys.Instance().DeleteForumThread()); userPointRecordDescription = "刪除論壇主題:" + forumThread.Subject; } PopulateUserPointRecords(records, role, forumThread.UserID, userPointRecordDescription); if (role != null) { SpaceBuilder.Common.Points.CreateUserPointRecords(records); } } } …… }