Namespace.register("U.MD.D.PB"); //初始化pb区域 //#region 初始化pb数据 //版块窗体化 U.MD.D.PB.CTBK = function () { var _UDOD = $("#UD_SYSXZBYP")[0], _UDE = U.UF.UI.Form({ s: U.MD.D.PB.CTGDCL, resize: U.UF.M.apply(this, [[U.MD.D.PB.NSYPBL, [$("#UD_SYSXZBYPR")[0], 0]]]), style: { overflow: "hidden", width: "90%", height: "85%" }, id: "UD_PB", content: _UDOD, title: "
云端版块
", hst: { style: { "padding": "0"} } }); _UDOD.style.display = "block"; U.MD.D.PB.RMZXSX(1); return _UDE.be; } //初始化板块内容分页 U.MD.D.PB.RMZXSX = function (UP) { if (UP <= 5 || !U.MD.U.L.isLogin(3)) {//未登录的用户只允许查看5页信息 var _UTF, _UDID, _UDBD, _UDOD = $("#UD_SYSXZBYP"), _UDSD = $("#UD_SYSXZBYPL"), _UDTD = $("#UD_SYSXZBYPO"), _UGE = U.MD.D.H.ET["NT"]["PB"], _UDE = _UGE["DBK"], _USID = _UGE["USID"]; //数据已加载 if (_UGE["RM"]) { (!_UDSD.Child().length) && (_UDBD = U.MD.D.PB.PBCKMU(_UDSD[0], _$(_UGE["BK"]).Select({ "PublishedParentID": US.FORUMROOTID }))); //初始化导航数据 //指定的板块查看 if ((_UDID = _UGE["UHID"])) { if (_UDID) { U.MD.D.PB.YMHBK(_UDID); } else if (_UDBD) { _UDBD.onclick(); } } //查看本人 搜索的帖子 else if (((_USID && (_USID.length == 36 || (_USID[1] && _USID[1].length == 36))) || _UDE) && !(_UTF = U.MD.D.PB.FYYMHBK(UP))) { return _UTF; } //打印版块发布 else { U.MD.D.PB.NRMZXSX(UP); } } //数据未加载 else { U.MD.D.PB.PBload(U.UF.M.apply(this, [[U.MD.D.PB.RMZXSX, [UP]]])); //数据请求加载 } } } //初始化板块页面 U.MD.D.PB.PBload = function (UCB) { U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UB_P_S_PBload"], U.MD.D.PB.AsynPBload, [[$("#UD_SYSXZBYPO")[0], true], UCB]); } //初始化板块异步 U.MD.D.PB.AsynPBload = function (r) { var context = r.context, _UCB = context[1]; r = r.value; if (r) { //加载数据 U.MD.D.PB.AsynGHBK({ context: "", value: r[0] }); //板块信息加载 U.MD.D.PB.AsynTD({ context: "", value: [r[1], [], r[2], [], r[3], [], []] }); //论坛信息 } (_UCB) && (_UCB()); } //异步获取版块信息 U.MD.D.PB.AsynGHBK = function (r) { var context = r.context || [, US.FORUMROOTID, , true], _UDID = context[1], _UCB = context[2], _UTF = context[3], _UGE = U.MD.D.H.ET["NT"]["PB"], _UDE = _UGE["BK"]; r = r.value; (_UTF) && (r[r.length - 1].PublishedParentID = US.FORUMROOTID, _UDE.unshift(_UGE["DBK"] = r.splice(r.length - 1, 1)[0])); _UGE["BK"] = _UDE.concat(r); r = U.MD.D.PB.CGHBK(r, _UDID, _UTF) || r; (_UCB) && (_UCB(r)); //回调使用 } //异步获取最新讨论 U.MD.D.PB.AsynTD = function (r) { var _UDE = U.MD.D.H.ET["NT"]["PB"]; r = r.value; if (r) { _UDE["RM"] = [r[0].slice(0, 50), r[0].slice(50, 100)]; _UDE["TJ"] = r[1]; //_UDE["DBK"]["IF"] = r[2]; _UDE["FC"] = r[3]; _UDE["BC"] = r[4]; _UDE["KC"] = [r[5], r[6]]; //初始化数据 } } //生成目录 上下级目录形成 U.MD.D.PB.CGHBK = function (UDE, UDID, UTF) { var i, _UGE = U.MD.D.H.ET["NT"]["PB"]["BK"], _UKE = _$(_UGE).Select({ UserDirectoryID: UDID }); (!_UKE.length) && (_UKE = [{ UserDirectoryID: UDID}]); for (i = 0; (i < _UKE.length && UDE.length); i++) { _UKE[i].Next = _$(UDE).Delete({ PublishedParentID: _UKE[i].UserDirectoryID }); _UKE = _UKE.concat(_UKE[i].Next); } return _UKE[0].Next; } //窗体滚动处理 U.MD.D.PB.CTGDCL = function () { var _USE = { "position": "" }, UDOD = $("#UD_SYSXZBYPLT"), _UDPD = UDOD.Parent({ "usbody": "true" }), _UH = _UDPD.offsetHeight, _USH = UDOD.height(), _UT = UDOD.top(), _UGT = _UDPD.scrollTop; if ((_UGT + _USH > _UH) && (_UT < 0 ? 0 : _UT) + _USH < _UDPD.scrollTop + _UH - 20) { _USE["position"] = "absolute"; _USE[_UH > _USH ? "top" : "bottom"] = "5px"; } UDOD.css(_USE); } //#endregion //#region 导航处理区域 //初始化导航 U.MD.D.PB.PBCKMU = function (UDOD, UDE, userid, UTF) { var i, _UDRD, _UDTD, _UDSD, _UDE = U.MD.D.H.ET["NT"]["PB"]["DBK"], _UDID = _UDE ? _UDE["UserDirectoryID"] : "", _UDFD = $$("frag"); (UTF !== true) && (UDOD.innerText = ""); for (i = 0; i < UDE.length; i++) { _UDTD = $$("div", { "className": "UD_SYSXZBYPLA UTDF" + ((_UDID == UDE[i].UserDirectoryID) ? " UD_SYSXZBYPLOO" : ""), "onclick": userid ? [[U.MD.D.PB.CKWDFB, [1, UDE[i], userid]]] : [[U.MD.D.PB.DJPBCKMU, [UDE[i], null, "this"]]] }, _UDFD); // _UDSD = $$("div", { "className": "UD_SYSXZBYPLAI" }, _UDTD); (UDE[i].UserDirectoryUrl) && ($$("img", { "src": "http://" + UDE[i].UserDirectoryUrl }, _UDSD)); $$("div", { "className": "UD_SYSXZBYPLO UTDF", "title": UDE[i].UserDirectoryName, "innerHTML": UDE[i].UserDirectoryName }, _UDTD); ((_UDID == UDE[i].UserDirectoryID)) && (_UDRD = _UDTD); } UDOD.appendChild(_UDFD); $(UDOD).Parent().style.display = UDE.length ? "block" : "none"; return (_UDRD || _UDTD); } //查看我的发布 U.MD.D.PB.CKWDFB = function (UP, UDE, userid) { if (!U.MD.U.L.isLogin(3) && UP) {//用户必须登录查看 var _UKE, _UPE = US.userInfo.PB, _UGE = U.MD.D.H.ET["NT"]["PB"], _UDOD = $("#UD_SYSXZBY"), _UDPD = _UDOD.Parent(3), _UDAD = _UDOD.Child(), _UDTD = $("#UD_SYSXZBYPL")[0]; userid = userid || US.userInfo.userid; $("#UD_SYSXZBYT")[0].innerHTML = ""; (!_UPE || !_UPE[0] || !_UPE[0].length) && ($(_UDTD).Parent().style.display = "none"); _UGE["DBK"] = UDE; _UGE["USID"] = userid; _UDID = UDE ? UDE["UserDirectoryID"] : US.EMPTYGUID; _UKE = U.MD.D.D.FYGBL(_UPE ? _UPE[1][_UDID] : null, UP, [10, 100]); (UP == 1) && (U.MD.D.PB.CKBKTZCL(_UDOD, UDE)); //初始化数据和按钮 _UDAD[1].innerText = "" if (_UKE[0]) { //打印我的发布 if (UP == 1) { _UDAD[1].innerHTML = ""; _UDAD[1].scrollTop = 0; U.MD.D.PB.NSYPBL(_UDAD[1], _UKE[0], UDE || _UPE[1][_UDID][_UKE[1]]); if (!_UKE[0].length) { //暂无帖子查看 U.MD.D.PB.PMHBKK(_UDAD[1], UDE ? null : { "onclick": [[U.UF.Ut.AddObj, [_UGE, { "USID": ""}]], , [U.MD.D.PB.PBCKZXR, [$("#UD_SYSXZBTOC").Child()[1]]]] }); } U.MD.D.PB.PBCKMU(_UDTD, _UPE[0], userid); } } else { //请求数据 if (!$("div#loadImg", _UDPD)[0]) { U.UF.A.Request(US.AUTH, ["GetMeA", userid, _UDID, (_UKE[1] - 1) * 100, _UKE[1] * 100, _UPE ? false : true], U.MD.D.PB.AsynCKWDFB, [[UP == 1 ? _UDPD : _UDAD[2], true], _UDID, UP, _UKE[1], UDE, userid]); } } return true; } } //首页目录点击 U.MD.D.PB.YMHBK = U.MD.D.PB.DJPBCKMU = function (UDE, UFN, UDOD, userid) { (typeof UDE == "string") && (UDE = { "UserDirectoryID": UDE }); var _UAE, _UBE, _UDTD = $("#UD_SYSXZBY"), _UGE = U.MD.D.H.ET["NT"]["PB"]; (!(_UBE = _$(_UGE["BK"]).Select({ "UserDirectoryID": UDE["UserDirectoryID"] })[0])) && (_UGE["BK"].push(UDE)); UDE = _UBE || UDE; _UAE = UDE["IF"]; $("#UD_SYSXZBYPLT").css("position", "", 0); _UGE["DBK"] = UDE; _UGE["USID"] = userid || ""; (UDOD) && (U.UF.MR.DHQH(UDOD, "UD_SYSXZBYPLOO")); U.MD.D.PB.Pa.XSYCBK(_UDTD.Parent()); _UGE["UHID"] = ""; //切换展示 if (_UAE) { (!US.userInfo.userid) && (U.MD.D.H.ET.DLHD = [U.UF.M.apply(this, [[U.MD.D.PB.DJPBCKMU, [UDE, UFN, UDOD, userid]]])]); //点击查看目录信息 if (_UAE[2] == 2 && userid) { //获取是否收藏了本模块 U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UB_P_S_IFPBCollect", UDE.UserDirectoryID, US.userInfo.userid || US.EMPTYGUID]), U.MD.D.PB.CMHBK, ["", U.UF.M.apply(this, [[U.MD.D.PB.DJPBCKMU, [UDE, UFN, UDOD, userid]]])]; // U.UF.A.Request(US.AUTH,"pb.IFCollect", [UDE.UserDirectoryID, US.userInfo.userid || US.EMPTYGUID]), U.MD.D.PB.CMHBK, ["", U.UF.M.apply(this, [[U.MD.D.PB.DJPBCKMU, [UDE, UFN, UDOD, userid]]])]; } else { //打印目录信息 U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UB_B_S_GetNexDiretory", UDE.UserDirectoryID || UDE.PublishedDirectoryID, US.EMPTYGUID]), U.MD.D.PB.AsynGetND, ["", UDE]; // U.UF.A.Request(US.AUTH,"pb.GetND", [UDE.UserDirectoryID || UDE.PublishedDirectoryID, US.EMPTYGUID]), U.MD.D.PB.AsynGetND, ["", UDE]; U.MD.D.PB.FYYMHBK(1); //获取下级目录 _UDTD = U.MD.D.PB.CKBKTZCL(_UDTD, UDE); U.MD.D.PB.XJBKMU(_UDTD[0], UDE["Child"], UDE); U.MD.N.UrlWrite(["pb", UDE.UserDirectoryID], UDE.UserDirectoryName + "板块"); (U.UF.Ut.isFunction(UFN)) && (UFN()) //信息输出 //打印目录信息 //URL地址重写 } } else { (_UDTD = $("#UD_SYSXZBYPR"))[0].innerText = ""; UDE["IF"] = []; U.UF.A.Request(US.AUTH, ["GBKSJ", UDE.UserDirectoryID || UDE.PublishedDirectoryID, userid || US.EMPTYGUID]), U.MD.D.PB.AsynYMHBK, [[_UDTD[0], true], UDE, null, userid, U.UF.M.apply(this, [[U.MD.D.PB.DJPBCKMU, [UDE, UFN, UDOD, userid]]]), UDOD]; } //获取版块信息 } //判断用户是否添加 U.MD.D.PB.CMHBK = function (r) { var context = r.context, UDE = context[1]; context[1]["IF"][2] = r.value[0]; U.MD.D.PB.YMHBK(UDE); } //异步获取板块数据 U.MD.D.PB.AsynYMHBK = function (r) { var context = r.context, _UGE = U.MD.D.H.ET["NT"]["PB"], _UDE = context[1], _UFN = context[2], _userid = context[3], _UCB = context[4]; r = r.value; U.MD.D.PB.CLYMHBK(_UGE["BK"], _UDE, r, _UDE.PublishedParentID); (_UGE["DBK"] == _UDE && ((_UCB || U.MD.D.PB.YMHBK)(_UDE, _UFN, null, _userid))); //获取后打印版块信息 } //获取目录的处理 U.MD.D.PB.CLYMHBK = function (UGE, UDE, UKE, UDID) { UDE = UDE || {}; U.UF.Ut.AddObj(UDE, UKE[3]); UDE["IF"] = UKE; UDE["IF"][0] = [, UKE[0][0]]; UDE.PublishedParentID = UDID || UDE.UserDirectoryID; UDE["Child"] = UKE[4]; UDE["IF"].splice(3, 2); (UGE && !_$(UGE).Select({ "UserDirectoryID": UDE.UserDirectoryID })[0]) && (UGE.push(UDE)); _$(UGE).Delete({ "PublishedParentID": UDE.UserDirectoryID }); UGE = UGE.concat(UDE["Child"]) } //下级版块目录展示 U.MD.D.PB.XJBKMU = function (UDOD, UDE, UBE) { var _UCE, i = 0, _UGE = U.MD.D.H.ET["NT"]["PB"]["BK"], _USID = _UGE["USID"], _userid = US.userInfo.userid, _UDFD = $$("div", { "className": "UD_SYSXZBYTC" }); UDOD.innerText = ""; (!UDE) && (UDE = []); (UBE.PublishedParentID != US.FORUMROOTID) && (i--); for (i; i < UDE.length; i++) { _UCE = i < 0 ? _$(_UGE).Select({ "UserDirectoryID": UBE.PublishedParentID })[0] : UDE[i]; $$("div", { "className": "UD_SYSXZBYTO", "innerHTML": i < 0 ? "< 返回上一层" : UDE[i].UserDirectoryName, "onclick": (_userid && _USID == _userid) ? [[U.MD.D.PB.CKWDFB, [1, _UCE, _userid]]] : [[U.MD.D.PB.DJPBCKMU, [_UCE]]] }, _UDFD); } (i || UBE.PublishedParentID != US.FORUMROOTID) ? (UDOD.style.display = "block", UDOD.appendChild(_UDFD)) : UDOD.style.display = "none"; } //版块初始加载处理 U.MD.D.PB.CKBKTZCL = function (UDOD, UDE) { var _UDPD, _UDAD = UDOD.Child(); _UDAD[0].style.display = UDE ? "block" : "none"; $(UDOD.Parent(5)).addAttrArray({ "UH": "", "UPL": "" }); //是否显示发帖和版块切换 if ((_UDPD = $(UDOD).Parent(3)).id == "UD_SYSXZBYP") { _UDPD.UPL = 1; }; _UDAD = $(_UDAD[0]).Child(); //设置取消分页记录 U.MD.D.PB.CSYMHBK(_UDAD[1], UDE); return _UDAD; //设置切换和发帖 //(_UDBD = $("#UD_SYSXZBFCTA")[0]).onclick = U.UF.M.apply(_UDBD, [[U.UF.M.StopBubble], [U.MD.D.PB.A.FBTZMU, [UDE, _UDBD]]]); } //设置版块功能切换 U.MD.D.PB.CSYMHBK = function (UDOD, UDE) { var i, _userid = US.userInfo.userid, _UDAD = $(UDOD).Child(), _UKE = ["GX", "Img", "Rm", "Me", "Disk"]; for (i = 0; i < 5; i++) { (_UDAD[i]) && (_UDAD[i].onclick = U.UF.M.apply(_UDAD[i], [[U.MD.D.PB.GNXZCK, [_UKE[i], _UDAD[i], UDE]]])); } //切换效果 } //下级目录获取更新 U.MD.D.PB.AsynGetND = function (reuqest) { var i, j, _UFE, _UCE, _UGE = U.MD.D.H.ET["NT"]["PB"], context = reuqest.context, _UDE = context[1], _UAE = _UDE.Child; reuqest = reuqest.value; if (reuqest) { if (_UAE.length) { _UFE: for (i = 0; i < _UAE.length; i++) { for (j = 0; j < reuqest.length; j++) { if (_UAE[i].UserDirectoryID == reuqest[j].UserDirectoryID) { U.UF.Ut.AddObj(_UAE[i], reuqest.splice(j, 1)[0]); continue _UFE; } if (i == _UAE.length - 1 && j == reuqest.length - 1) { _UAE = _UAE.concat(reuqest); } } _UAE.splice(i, 1); i--; } } else { _UAE = _UAE.concat(reuqest); } _UDE["Child"] = _UAE; (_UGE["DBK"] == _UDE) && (U.MD.D.PB.XJBKMU($("#UD_SYSXZBYT")[0], _UAE, _UDE)); } } //#endregion //#region 帖子处理区域 //点击我的发布 U.MD.D.PB.CKWDFBDJ = function (UDOD) { if (U.MD.D.PB.CKWDFB(1)) { U.MD.D.PB.PBCKZXR(UDOD); } } //帖子分页 U.MD.D.PB.FYYMHBK = function (UP, UCB) { UP = UP || ""; var _UTF, _UPE, _userid = US.userInfo.userid, _UGE = U.MD.D.H.ET["NT"]["PB"], _USID = _UGE["USID"], _UDE = _UGE["DBK"]; (UP == 1) && ($("#UD_SYSXZBYP").Parent().onscroll = U.UF.M.SSCH({ "AF": U.UF.M.apply(null, function () { U.MD.D.PB.FYYMHBK(this.P + 2, UCB); }) }).SCH()); //滚动加载函数加载 if (_userid && _USID && (_USID == _userid || _USID[1] == _userid)) { //查看本人帖子 U.MD.D.PB.PBCKZXR($("#UD_SYSXZBTOC").Child()[0], true); U.MD.D.PB.CKWDFB(UP, _UDE); } else if (_USID && (_USID[1] && _USID[1].length == 36 && _USID[1] != _userid)) { //搜索分页查看搜索 U.MD.D.PB.A.FTZSS(_USID[0], UP, _USID[1], _USID[2]); } else { //普通帖子察看 U.MD.D.PB.PBCK(UP, _UDE); } } //最新发布和最热门切换样式 U.MD.D.PB.PBCKZXR = function (UDOD, UTF) { var _UIE, _UDAD = $($(UDOD).Parent()).Child(), _UDPD = $(UDOD).Parent(3), _UAE = ["O", "O", "T"]; for (i = 0; i < _UDAD.length; i++) { $(_UDAD[i])[(UDOD == _UDAD[i]) ? (_UIE = i, "addClass") : "removeClass"]("UD_SYSXZBTN" + _UAE[i]); } //添加className if (!UTF) { $(_UDPD).Parent(3).UH = _UDPD.UPL = ""; (_UIE) && (U.MD.D.PB.NRMZXSX(1, _UIE)); } //切换同时查看最新最热 } //初始化查看 U.MD.D.PB.PBCK = function (UP, UDE) { if (UDE) { var _UTF, _UGE = U.MD.D.H.ET["NT"]["PB"], _USID = _UGE["USID"]; if (UP == 1) { //促使化导航 U.MD.D.PB.PBCKMU($("#UD_SYSXZBYPL")[0], _$(_UGE["BK"]).Select({ "PublishedParentID": US.FORUMROOTID })); } if (UDE["IF"]) { _UTF = U.MD.D.PB.GNXZCK(_USID, null, UDE, UP); } else { U.MD.D.PB.YMHBK(UDE); } return _UTF; } } //查看帖子 U.MD.D.PB.GNXZCK = function (UTF, UDOD, UDE, UP) { var _UCE, _UKE, _UPE, _UFT, _UAID = US.EMPTYGUID, _UBE = US.userInfo.PB, _userid = US.userInfo.userid, _UDID = UDE.UserDirectoryID, _UDTD = $("#UD_SYSXZBYPR")[0], _UVT = (UDOD && UDOD.className == "UD_SYSXZBECTC UD_SYSXZBECTO"), _UGE = U.MD.D.H.ET["NT"]["PB"]; UP = UP || 1; UTF = UTF || "GX"; switch (UTF) { case "GX": _UCE = ["Publicpage", 0, 0]; break; case "Img": _UCE = ["GetPATImg", 4, 1]; break; case "Rm": _UCE = ["RPHotPost", 3, 2]; break; case "Disk": U.MD.D.I.YYDK("PDisk", [0]); return; break; case "Me": if (U.MD.U.L.isLogin(3)) { return; } _UCE = ["GetMeA", 5, 3]; break; } //获取数据的形式 (_UCE && _UCE[2] != null) && U.MD.D.PB.SPMHBK(UDOD || $("#UD_SYSXZBALCB").Child()[_UCE[2]]); _UGE["USID"] = (_userid && (_UGE["USID"] == _userid || _UGE["USID"][1] == _userid)) ? (_UFT = true, [UTF, _userid]) : UTF; _UKE = (_UFT ? (UTF == "GX" ? _UBE[1][_UDID] : (_UBE[1][UTF] ? _UBE[1][UTF][_UDID] : null)) : (UDE["IF"] && UDE["IF"][_UCE[1]])); if (_UKE || UP == 1) { //加载数据 _UPE = U.MD.D.D.FYGBL(_UKE, UP, [20, 100]); //分页获取值 if (!_UPE[0] || _UVT) {//更新数据 或者获取数据 _UCE[2] = [_UDID, (_UPE[1] - 1) * 100, _UPE[1] * 100]; if (_UCE[0] == "Publicpage") { _UCE[2].push(1); } else if (_UCE[0] == "GetMeA") { _UCE[2].unshift(US.userInfo.userid); }; //获取数据前处理 (_UVT && _UKE && _UKE[1] && _UKE[1][0]) && (_UAID = _UKE[1][0].ArticleID); _UCE[2].push(_UAID); _UCE[2].push(_UFT ? _userid : US.EMPTYGUID); //是否更新数据 _UCE[2].unshift(_UCE[0]); U.UF.A.Request(US.AUTH, (_UCE[2]), U.MD.D.PB.AsynTMTZ, [!_UVT ? [UP == 1 ? _UDTD : $("#UD_SYSXZBYPD")[0], true] : "", UDE, _UCE[1], UP, UTF, _UPE[1], _UDTD, _UDID, _UFT, _UFT ? _UBE[1] : null]); //请求数据 } else { (UP == 1) && (_UDTD.innerText = ""); if (UP == 1 && !_UPE[0].length) { U.MD.D.PB.PMHBKK(_UDTD); } else if (_UPE[0].length) { U.MD.D.PB.NSYPBL(_UDTD, _UPE[0], UDE); } } //切换数据查看 } else { U.Alert("数据加载中,请稍候"); return false; } } //帖子更新 U.MD.D.PB.AsynTMTZ = function (r) { var _UDE, context = r.context, _UDE = context[1], _ITF = context[2], _UP = context[3], _UTF = context[4], _UIP = context[5], _UDOD = context[6], _UDID = context[7], _UFT = context[8], _UBE = context[9], _UTP = _ITF, _UPE = _UFT ? _UBE : _UDE; r = r.value; if (_UFT) { (_UTF != "GX") && (_UPE = _UPE[_UTF] = _UPE[_UTF] || {}); _UTP = _UDID } else { _UPE = _UPE["IF"]; }; //选择添加区域 if (!_UPE[_UTP]) { _UPE[_UTP] = [null, r]; } else if (_UIP > 1) { _UPE[_UTP][_UIP] = r; } else { _UPE[_UTP][1] = r.concat(_UPE[_UTP][1]); } //添加信息 if (_UTF == "GX" && r.length && _UPE["IF"]) { _UPE["ACF"] = r[0].AllCount || _UPE["ACF"]; } U.MD.D.PB.GNXZCK(_UTF, null, _UDE, _UP); //打印帖子信息 } //空帖子打印 U.MD.D.PB.PMHBKK = function (UDOD, UDE) { var _UDTD, _UDSD, _UDCD = $("#UD_SYSXZBFCAC")[0]; _UDTD = $$("div", { "className": "UD_SYSXZBECCT" }, UDOD); $$("div", { "className": "UD_SYSXZBECCTS", "innerHTML": "这里暂时没有任何内容哦! !" }, _UDTD); _UDSD = $$("div", { "className": "UD_SYSXZBECCTX", "innerHTML": "赶紧抢先: " }, _UDTD); $$("span", { "innerHTML": "发布分享", "onclick": (UDE && UDE.onclick) ? UDE.onclick : [[U.UF.M.StopBubble], [U.UF.M.IEVENT, [_UDCD, "mousedown"]], [U.UF.M.IEVENT, [_UDCD, "focus"]]] }, _UDSD); } //切换版块信息 U.MD.D.PB.SPMHBK = function (UDOD) { var i, _TF, _UDAD = $($(UDOD).Parent()).Child(); for (i = 0; i < _UDAD.length - 3; i++) { _UDAD[i].className = "UD_SYSXZBALCO" + (_UDAD[i] == UDOD ? " UD_SYSXZBALCOO" : ""); } } //查看本人信息异步 U.MD.D.PB.AsynCKWDFB = function (r) { var _UGE, context = r.context, _UDID = context[1], _UP = context[2], _UTP = context[3], _UDE = context[4], _userid = context[5]; r = r.value; if (r[1]) { //目录和文章同时设置 US.userInfo.PB = [r[0], {}]; US.userInfo.PB[1][_UDID] = [null, r[1]] } else { //设置文章 _UGE = US.userInfo.PB[1]; (!_UGE[_UDID]) && (_UGE[_UDID] = []); _UGE[_UDID][_UTP] = r[0]; }; U.MD.D.PB.CKWDFB(_UP, _UDE, _userid); //打印我的发布 } //版块文章信息输出 U.MD.D.PB.NSYPBL = function (UDOD, UDE, UBE, UTF) { UDOD = $(UDOD); var _ULT, i = 0, _UDFD = $$("frag"), _UME = U.MD.D.H.ET["NT"]["PB"]["DBK"], _UDPD = UDOD.Parent(2), _UDMD = UDOD.Parent({ usform: "true" }), _UDAD = UDOD.Child(), _UW = _UDMD.offsetWidth - 150, _UH = _UDMD.offsetHeight, _UIE = Math.floor(_UW / 366) || 1, _UL = ((UTF || U.UF.Ut.isNumber(UDE)) ? (UTF ? 0 : UDE) : _UDAD.length); if ((UDE && UDE.length)) {//添加 for (; i < UDE.length; i++) { U.MD.D.PB.PBSYWZ(UDE[i], _UDFD, UBE); } UDOD.append(_UDFD, 0, UTF ? UDOD[0].firstChild : null); _UDAD = UDOD.Child(); } for (i = _UL; i < _UDAD.length; i++) { //位置定位 $(_UDAD[i]).addAttrArray({ "style": { "marginRight": ((i + 1) % _UIE) ? "" : "0px", "marginTop": (!_UME && (i < _UIE)) ? "0px" : ""} }); } ((_UH = _UH - 250) > 0) && (_ULT = 366 + (_UIE < 2 ? 200 : 0), UDOD.css({ "marginTop": _UME ? "" : "0px", "width": _UDPD.style.width = ($(UDOD).Parent().style.width = ((_UW = _ULT * _UIE - 20)) + "px") }), $(_UDPD).Parent().style.width = _UW + 170 + "px"); //大小位置排位 } //文章打印 U.MD.D.PB.PBSYWZ = function (UDE, UDOD, UBE) { var _UTF, _UDTD, _UDPD, _UDSD, _UDID, _UDQD, _UDVD, _UDHD, _UDLD, _UDBD, _UDKD, _UDRD, _UDCD, _UDMD, _UDGD, _UDED, _UIMG, _userid = US.userInfo.userid, _UN = UDE.UserNickName || UDE.UserName; _UDTD = $$("div", { "onclick": [[U.MD.D.PB.A.WAPMHBK, [UDE, UBE, null, "this"]]], "className": "UD_SYSXZBPO" }, UDOD); _UDPD = $$("div", { "className": "UD_SYSXZBMCOS" }, _UDTD); _UDSD = $$("div", { "className": "UD_SYSXZBMCOT UD_SYSXZBMCOTB" }, _UDPD); _UDID = $$("div", { "className": "UD_SYSXZBMCOTL" }, _UDSD); $$("img", { "onerror": U.UF.M.ImgError, "alt": _UN, "title": _UN, "onclick": [[U.UF.M.StopBubble], [U.MD.U.I.ViewOtherUserInfo, [UDE.UserID]]], "src": U.UF.M.GetImgU(UDE.UserThumbnailImageHead) }, _UDID); _UDQD = $$("div", { "className": "UD_SYSXZBMCOCA" }, _UDSD); _UDVD = $$("div", { "className": "UD_SYSXZBMCOCAO UD_SYSXZBMCOCAT" }, _UDQD); _UDHD = $$("div", { "className": "UD_SYSXZBPOCLS UTDF", "innerHTML": UDE.ArticleTitle }, _UDVD); _UDHD.innerText = _UDHD.innerText; $$("div", { "className": "UD_SYSXZBPOTM UTDF", "innerHTML": (UDE.UserDirectoryName || (UBE ? UBE.UserDirectoryName : "学习系统")), "onclick": [[U.UF.M.StopBubble], [U.MD.D.PB.PBSYWZML, [UDE, UBE]]] }, _UDPD); (_userid && UDE.UserID == _userid) && ($$("div", { "className": "UD_SYSXZLRSRDTRZTI UD_SYSXZLRSRDTRZTIS UD_SYSXZLRSRDTRZTIO UD_SYI", "onclick": [[U.UF.M.StopBubble], [U.UF.UI.Confirm, ["是否删除该消息", [U.MD.D.Blog.F.SCPGBL, [UDE, _UDTD, UBE]]]]], "title": "移除消息" }, _UDSD)); _UDVD = $$("div", { "className": "UD_SYSXZBMCOCB" }, _UDQD); $$("div", { "className": "UD_SYSXZBMCOTZ UTDF", "innerHTML": _UN }, _UDVD); $$("div", { "className": "UD_SYSXZBMCOTR", "innerHTML": U.UF.D.getDateInterval(UDE.ArticleAddTime) }, _UDVD); _UDHD = $$("div", { "className": "UD_SYSXZBPOC" }, _UDTD); _UDLD = $$("div", { "className": "UD_SYSXZBPOCL" }, _UDHD); _UDBD = $$("div", { "className": "UD_SYSXZBPOCLX", "innerHTML": UDE.ArticleContentBrief }, _UDLD); _UIMG = $("img", _UDBD)[0]; _UDBD.innerText = _UDBD.innerText.trim(); if (_UIMG) { if ((_UDBD.innerText = _UDBD.innerText.addEllipsis(200)) == "") { _UDBD.style.display = "none"; _UTF = true; }; _UDKD = $$("div", { "className": "UD_SYSXZBPOCR", "style": { "marginTop": _UTF ? "0px" : "", "height": (222 - Math.ceil(_UDBD.innerText.count() / 52) * 20) + "px"} }, _UDHD); _UDRD = $$("div", { "onclick": U.UF.M.apply() }, _UDKD); U.MD.D.H.JZTPJS(_UIMG.src, _UDRD, UDE); } else { $(_UDBD).addAttrArray({ "innerText": _UDBD.innerText, "style": { "height": (_UDLD.style.maxHeight = "100%")} }); } _UDCD = $$("div", { "className": "UD_SYSXZBPOD" }, _UDTD); _UDMD = $$("div", { "className": "UD_SYSXZBPODL" }, _UDCD); _UDGD = $$("div", { "className": "UD_SYSXZBPODR" }, _UDCD); _UDED = $$("div", { "className": "UD_SYSXZZXRCDO" }, _UDGD); $$("div", { "className": "UD_SYSXZZXRCDOI UD_SYI" }, _UDED); $$("div", { "innerHTML": "查看(" + UDE.AricitleReadNumber + ")" }, _UDED); _UDED = $$("div", { "className": "UD_SYSXZZXRCDT" }, _UDGD); $$("div", { "className": "UD_SYSXZZXRCDTI UD_SYI" }, _UDED); $$("div", { "innerHTML": "评论(" + (UDE.ArticleReplayNumber < 0 ? 0 : UDE.ArticleReplayNumber) + ")" }, _UDED); return _UDTD; } //目录文章点击 U.MD.D.PB.PBSYWZML = function (UDE, UBE) { var _UGE = U.MD.D.H.ET["NT"]["PB"], _UDID = UDE["PublishedDirectoryID"] || UDE["UserDirectoryID"]; UBE = UBE || _$(_UGE["BK"]).Select({ "UserDirectoryID": _UDID })[0]; U.MD.D.PB.DJPBCKMU(UBE || { "UserDirectoryID": _UDID, "UserDirectoryName": UDE["UserDirectoryName"] }, null, null, _UGE["USID"] == US.userInfo.userid ? _UGE["USID"] : null); //查看目录信息 } //#endregion //#region 查看最新和热门 //版块内容热门分页 U.MD.D.PB.NRMZXSX = function (UP, UTF) { var i, _UE = UP * 10, _UDOD, _UGE = U.MD.D.H.ET["NT"]["PB"], _UDE = _UGE["RM"]; _UGE["DBK"] = null; if (!UTF) { _UDOD = $("#UD_SYSXZBTOC").Child(); for (i = 0; i < _UDOD.length; i++) { if ($(_UDOD[i]).hasClass("UD_SYSXZBTNO") || $(_UDOD[i]).hasClass("UD_SYSXZBTC")) { break; } }; UTF = i; } //点亮图标 if (UTF) { _UDOD = $("#UD_SYSXZBY").Child(); _UDOD[0].style.display = "none"; if ((_UDE = _UDE[UTF - 1]).length >= _UE) { (UP == 1) && (_UDOD[1].innerText = ""); U.MD.D.PB.NSYPBL(_UDOD[1], _UDE.slice(_UE - 10, _UE), null); } //打印热门或者最新发布 else { U.MD.D.PB.HRMZXSX(Math.ceil(_UDE.length / 50) + 1, UTF - 1, UP); } //获取最新数据 (UP == 1) && (U.MD.D.PB.PBCKMU($("#UD_SYSXZBYPL")[0], _$(_UGE["BK"]).Select({ "PublishedParentID": US.FORUMROOTID }))); //目录查看 } else { _UDCD[0].onclick(); } //查看我的发布 } //获取最新和最热消息 U.MD.D.PB.HRMZXSX = function (UIE, UTF, UP) { var _UE = UIE * 50; U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UB_P_S_NewAndHpPost", _UE - 50, _UE, UTF], U.MD.D.PB.AsynHRMZXSX, [[$("#UD_SYSXZBYPD")[0], true], UIE, UTF, UP]); //U.UF.A.Request(US.AUTH,"pb.UB_P_S_NewAndHpPost", [_UE - 50, _UE, UTF], U.MD.D.PB.AsynHRMZXSX, [[$("#UD_SYSXZBYPD")[0], true], UIE, UTF, UP]); //获取更新数据 } //获取消息异步 U.MD.D.PB.AsynHRMZXSX = function (r) { var context = r.context, _UIE = context[1], UTF = context[2], _UP = context[3], _UCE = U.MD.D.H.ET["NT"]["PB"]["RM"]; r = r.value; _UCE[UTF] = _UCE[UTF].concat(r); U.MD.D.PB.RMZXSX(_UP, UTF + 1); //热门或者最新查看 } //#endregion //#region 功能区域 //意见反馈点击 U.MD.D.PB.YJYMHBK = function (UDID, UFN) { try { U.MD.D.H.ET["NT"]["PB"]["UHID"] = UDID; U.MD.D.I.YYDK("PB"); } catch (e) { U.Alert("未加载完..请等待"); } } //#endregion