Example #1
0
File: Section.cs Project: pcstx/OA
        int totalThreads = -1; // Total threads in the forum

        #endregion Fields

        #region Constructors

        public Section()
        {
            try {
                threadDateFilter = CSContext.Current.SiteSettings.DefaultThreadDateFilter;
            } catch {
                threadDateFilter = ThreadDateFilterMode.TwoMonths;
            }
        }
Example #2
0
        public ForumUserOptions(string settings)
        {
            if ((settings == null) || (settings == string.Empty))
                return;

            HasSettings = true;

            try {
                // Serialized format is: [SortBy]:[SortOrder]:[DateFilter]:[HideReadPosts]:[UserFilter]
                string[] s = settings.Split(':');

                SortBy = (SortThreadsBy) int.Parse(s[0]);
                SortOrder = (SortOrder) int.Parse(s[1]);
                DateFilter = (ThreadDateFilterMode) int.Parse(s[2]);

                if (s[3] == "T")
                    HideReadPosts = true;
                else
                    HideReadPosts = false;

                UserFilter = (ThreadUsersFilter) int.Parse(s[4]);
            } catch {}
        }