protected void Display_CustomProperties() { string strHtml = ""; strHtml = m_refUserApi.EditUserCustomProperties(uId, true); StringBuilder sBuilder = new StringBuilder(); Ektron.Cms.Community.MessageBoardAPI messageboardapi = new Ektron.Cms.Community.MessageBoardAPI(); sBuilder.Append(strHtml); sBuilder.Append("<tr></tr><tr><td><div id=\"ek_MsgBoardModerationLabel\"><label class=\"label\">" + m_refMsg.GetMessage("lbl perm moderate") + ":" + "</label></div></td>\n"); if (messageboardapi.IsModerated(uId, EkEnumeration.MessageBoardObjectType.User)) { sBuilder.Append("<td><div id=\"ek_MsgBoardModeration\"><input disabled=\"true\" type=\"checkbox\" id=\"ek_MsgBoardModerate\" name = \"ek_MsgBoardModerate\" checked=\"checked\"/>" + m_refMsg.GetMessage("lbl msgboard") + "<br/><span>" + m_refMsg.GetMessage("lbl usermsgboardnotify") + "</span></div></td></tr> \n"); } else { sBuilder.Append("<td><div id=\"ek_MsgBoardModeration\"><input disabled=\"true\" type=\"checkbox\" id=\"ek_MsgBoardModerate\" name = \"ek_MsgBoardModerate\"/>" + m_refMsg.GetMessage("lbl msgboard") + "<br/><span>" + m_refMsg.GetMessage("lbl usermsgboardnotify") + "</span></div></td></tr> \n"); } ltr_CustomProperty.Text = sBuilder.ToString(); }
private void Display_UserCustomProperties() { Page.ClientScript.GetPostBackEventReference(litUCPUI, ""); string strHtml = string.Empty; strHtml = m_refUserApi.EditUserCustomProperties(uId, false); StringBuilder sBuilder = new StringBuilder(); Ektron.Cms.Community.MessageBoardAPI messageboardapi = new Ektron.Cms.Community.MessageBoardAPI(); sBuilder.Append(strHtml); sBuilder.Append("<tr></tr><tr><td><div id=\"ek_MsgBoardModerationLabel\"><label class=\"label\">" + m_refMsg.GetMessage("lbl perm moderate") + ":" + "</label></div></td>\n"); if (messageboardapi.IsModerated(uId, EkEnumeration.MessageBoardObjectType.User)) { sBuilder.Append("<td><div id=\"ek_MsgBoardModeration\"><input type=\"checkbox\" id=\"ek_MsgBoardModerate\" name = \"ek_MsgBoardModerate\" checked=\"checked\"/>" + m_refMsg.GetMessage("lbl msgboard") + "<br/><span>" + m_refMsg.GetMessage("lbl usermsgboardnotify") + "</span></div></td></tr> \n"); } else { sBuilder.Append("<td><div id=\"ek_MsgBoardModeration\"><input type=\"checkbox\" id=\"ek_MsgBoardModerate\" name = \"ek_MsgBoardModerate\"/>" + m_refMsg.GetMessage("lbl msgboard") + "<br/><span>" + m_refMsg.GetMessage("lbl usermsgboardnotify") + "</span></div></td></tr> \n"); } litUCPUI.Text = sBuilder.ToString(); }
private void ProcessUserMessageBoardModeration(long userId) { Ektron.Cms.Community.MessageBoardAPI messageboardapi = new Ektron.Cms.Community.MessageBoardAPI(); if (Page.Request.Form["ek_MsgBoardModerate"] != null || messageboardapi.IsModerated(userId, EkEnumeration.MessageBoardObjectType.User) != false) { string moderateStatus = Page.Request.Form["ek_MsgBoardModerate"]; if (moderateStatus == "on") { messageboardapi.EnableModeration(userId, EkEnumeration.MessageBoardObjectType.User, messageboardapi.RequestInformationRef.UserId); } else { messageboardapi.DisableModeration(userId, EkEnumeration.MessageBoardObjectType.User, messageboardapi.RequestInformationRef.UserId); } } }