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

(开头部分) 5KB

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

using System;
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;
using System.Text.RegularExpressions;

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

		public UserInfoModule()
		{			
		}

		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);
			string value = userprefs.GetValueByName("showaddons");
			value = value == "" ? "0" : value;
			string checkedvalue = "";
			if (value == "1")
				checkedvalue = "checked";
			editbox = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"95%\" align=\"center\">";
			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___0\" name=\"m___MODULE_ID___up_{3}\" value=\"{1}\" type=\"hidden\" /><input type=\"checkbox\" {2} onclick=\"_gel('m___MODULE_ID___0').value = this.checked ? '1' : '0';\" /></td></tr>", "显示附加信息", value, checkedvalue, "showaddons", "");
            value = userprefs.GetValueByName("isvertical");
            value = value == "" ? "0" : value;
            if (value == "1")
                checkedvalue = "checked";
            else
                checkedvalue = "";

            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, "isvertical", "");
			editbox += "</table>";
			return base.OnEditBoxLoad (editbox);
		}

		public override string OnMouduleLoad(string content)
		{
			UserPrefsSaved userprefs = new UserPrefsSaved(this.Module.UserPref);
			string value = userprefs.GetValueByName("showaddons");
            string vertical = userprefs.GetValueByName("isvertical");
			string[] score = Scoresets.GetValidScoreName();
			UserInfo ui = Users.GetUserInfo(this.Module.Uid);
后面还有 59 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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