久久精品水蜜桃av综合天堂,久久精品丝袜高跟鞋,精品国产肉丝袜久久,国产一区二区三区色噜噜,黑人video粗暴亚裔

SPB-可配置服務-積分

來自站長百科
跳轉(zhuǎn)至: 導航、? 搜索

導航: 上一頁

積分是指Application的哪些操作會影響到用戶的積分,在積分項目及積分規(guī)則中進行相應設置。

積分類別分為:基礎積分、聲譽積分、信譽積分、交易積分。只有交易積分可以減少,其他類別的積分只能不斷增加(處罰時除外)。

  1. 基礎積分用于體現(xiàn)用戶在站點的參與程度;
  2. 聲譽積分用于體現(xiàn)用戶在站點的知名度;
  3. 信譽積分用于體現(xiàn)用戶在站點的真實及誠信指數(shù);
  4. 交易積分是用于在站點內(nèi)流通的虛擬貨幣。

一、積分項目(PointItems)

示例:

Spacebuilder0107.jpg


注意:ItemKey必須唯一

二、積分項目積分規(guī)則(UserPointItemRules)

示例:

Spacebuilder0108.jpg

三、綜合積分規(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

四、積分記錄 記錄積分收入、支出記錄。

五、如何使用積分?

  1. 關于積分項目的分析以及配置,參見“如何使用權限”;
  2. 如何增減積分并自動積分記錄

采用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);
                }
            }
        }
……
}

參考資料[ ]