Discuz.Web/space/modules/builtin/forum/ShowTopicModule.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Text;
using Discuz.Common;
using Discuz.Forum;
using Discuz.Space.Entities;

using Discuz.Space.Utilities;
using Discuz.Config;
using Discuz.Entity;
using Discuz.Space.Provider;

namespace Discuz.Space.Modules.Forum
{
    /// <summary>
    /// ShowTopicModule 的摘要说明。
    /// </summary>
    public class ShowTopicModule : ModuleBase
    {
        private string jsFile = Utils.GetMapPath(BaseConfigs.GetForumPath + "/space/Modules/builtin/forum/showtopicmodule.config");
        public ShowTopicModule()
        {
        }

        public override string GetModulePost(System.Web.HttpContext httpContext)
        {
            return base.GetModulePost(httpContext);
        }

        public override string OnEditBoxLoad(string editbox)
        {
            this.Editable = true;
            UserPrefsSaved userprefs = new UserPrefsSaved(this.Module.UserPref);
            editbox = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\" align=\"center\">";

            //显示主题条数
            string value = userprefs.GetValueByName("topiccount");
            value = value == "" ? "10" : value;
            string options = string.Empty;
            for (int i = 10; i <= 50; i += 10)
            {
                if (value == i.ToString())
                    options += string.Format("<option value=\"{0}\" selected>{0} 条 </option>", i);
                else
                    options += string.Format("<option value=\"{0}\">{0} 条 </option>", i);
            }
            editbox += string.Format("<tr><td colspan=\"1\" align=\"right\" width=\"35%\"><nobr>{0}{3}</nobr></td><td colspan=\"2\" align=\"left\" nowrap=\"nowrap\" width=\"65%\">&nbsp;<select id=\"m___MODULE_ID___0\" name=\"m___MODULE_ID___up_{1}\">{2}</select></td></tr>", "显示主题数: ", "topiccount", options, "");

            //是否是精华
            value = userprefs.GetValueByName("iselite");
            value = value == "" ? "0" : value;
            string checkedvalue = "";
            if (value == "1")
                checkedvalue = "checked";
            editbox += string.Format("<tr><td colspan=\"1\" align=\"right\" width=\"35%\"><nobr>{0}{4}</nobr></td><td colspan=\"2\" align=\"left\" nowrap=\"nowrap\" width=\"65%\">&nbsp;<input id=\"m___MODULE_ID___1\" name=\"m___MODULE_ID___up_{3}\" value=\"{1}\" type=\"hidden\" /><input type=\"checkbox\" {2} onclick=\"_gel('m___MODULE_ID___1').value = this.checked ? '1' : '0';\" /></td></tr>", "仅显示精华帖: ", value, checkedvalue, "iselite", "");

            //			//是否仅显示自己的
            //			value = userprefs.GetValueByName("ismine");
            //			value = value == "" ? "0" : value;
            //			checkedvalue = "";
后面还有 37 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。