Ejemplo n.º 1
0
 public static int GetTopicPostInvisible(IXForum forum, int useradminid, int uid, UserGroup userGroup, Post postinfo)
 {
     if (useradminid == 1 || Moderators.IsModer(useradminid, uid, forum.Fid))
     {
         return(0);
     }
     if (!ForumUtils.HasAuditWord(postinfo.Message) && forum.Modnewtopics == 0 && userGroup.ModNewTopics == 0 && !Scoresets.BetweenTime(GeneralConfigInfo.Current.Postmodperiods))
     {
         return(0);
     }
     return(1);
 }
Ejemplo n.º 2
0
        //public static string GetTopicCountCondition(out string type, string gettype, Int32 getnewtopic)
        //{
        //    return BBX.Data.Topics.GetTopicCountCondition(out type, gettype, getnewtopic);
        //}

        //public static Int32 GetTopicListCount(string postName, Int32 forumId, string posterList, string keyList, string startDate, string endDate)
        //{
        //    return BBX.Data.Topics.GetTopicListCount(postName, forumId, posterList, keyList, startDate, endDate);
        //}

        //public static Int32 GetHotTopicsCount(Int32 fid, Int32 timeBetween)
        //{
        //    return BBX.Data.Topics.GetHotTopicsCount(fid, timeBetween);
        //}

        //public static DataTable GetTopicList(string postName, Int32 forumId, string posterList, string keyList, string startDate, string endDate, Int32 pageSize, Int32 currentPage)
        //{
        //    return BBX.Data.Topics.GetTopicList(postName, forumId, posterList, keyList, startDate, endDate, pageSize, currentPage);
        //}

        //public static DataTable GetHotTopicsList(Int32 pageSize, Int32 pageIndex, Int32 fid, string showType, Int32 timeBetween)
        //{
        //    return BBX.Data.Topics.GetHotTopicsList(pageSize, pageIndex, fid, showType, timeBetween);
        //}

        //public static void PassAuditNewTopic(string tidList)
        //{
        //    string[] array = tidList.Split(',');
        //    for (Int32 i = 0; i < array.Length; i++)
        //    {
        //        string s = array[i];
        //        TopicInfo topicInfo = Topics.GetTopicInfo(Int32.Parse(s));
        //        CreditsFacade.PostTopic(topicInfo.Posterid, Forums.GetForumInfo(topicInfo.Fid));
        //    }
        //    BBX.Data.Topics.PassAuditNewTopic(TableList.GetPostTableId(), tidList);
        //}

        //public static void UpdateMyTopic()
        //{
        //    BBX.Data.Topics.UpdateMyTopic();
        //}

        //public static Int32 GetTitleDisplayOrder(UserGroup usergroupinfo, Int32 useradminid, IXForum forum, TopicInfo tp, string message, Boolean disablepost)
        //{
        //    if (useradminid == 1 || Moderators.IsModer(useradminid, tp.Posterid, forum.Fid))
        //    {
        //        return tp.Displayorder;
        //    }
        //    if (forum.Modnewtopics == 1 || usergroupinfo.ModNewTopics == 1 || (Scoresets.BetweenTime(GeneralConfigInfo.Current.Postmodperiods) && !disablepost) || ForumUtils.HasAuditWord(tp.Title) || ForumUtils.HasAuditWord(message))
        //    {
        //        return -2;
        //    }
        //    return tp.Displayorder;
        //}

        public static Int32 GetTitleDisplayOrder(UserGroup usergroupinfo, Int32 useradminid, IXForum forum, Topic tp, string message, Boolean disablepost)
        {
            if (useradminid == 1 || Moderators.IsModer(useradminid, tp.PosterID, forum.Fid))
            {
                return(tp.DisplayOrder);
            }
            if (forum.Modnewtopics == 1 || usergroupinfo.ModNewTopics == 1 || (Scoresets.BetweenTime(GeneralConfigInfo.Current.Postmodperiods) && !disablepost) || ForumUtils.HasAuditWord(tp.Title) || ForumUtils.HasAuditWord(message))
            {
                return(-2);
            }
            return(tp.DisplayOrder);
        }