private static string DisplayDataType(Entities.Profile.ProfilePropertyDefinition definition) { string CacheKey = string.Format("DisplayDataType:{0}", definition.DataType); string strDataType = Convert.ToString(DataCache.GetCache(CacheKey)) + ""; if (strDataType == string.Empty) { Common.Lists.ListController objListController = new Common.Lists.ListController(); strDataType = objListController.GetListEntryInfo(definition.DataType).Value; DataCache.SetCache(CacheKey, strDataType); } return(strDataType); }
private string ParseForm(string template) { bool hasOptions = false; template = "<%@ Register TagPrefix=\"am\" Namespace=\"DotNetNuke.Modules.ActiveForums.Controls\" Assembly=\"DotNetNuke.Modules.ActiveForums\" %>" + template; template = "<%@ register src=\"~/DesktopModules/ActiveForums/controls/af_posticonlist.ascx\" tagprefix=\"af\" tagname=\"posticons\" %>" + template; template = template.Replace("[AF:INPUT:SUBJECT]", "<asp:textbox id=\"txtSubject\" cssclass=\"aftextbox\" runat=\"server\" />"); template = template.Replace("[AF:REQ:SUBJECT]", "<asp:requiredfieldvalidator id=\"reqSubject\" validationgroup=\"afform\" ControlToValidate=\"txtSubject\" runat=\"server\" />"); template = template.Replace("[AF:REQ:BODY]", "<asp:label id=\"reqCustomBody\" visible=\"false\" runat=\"server\" />"); if (template.Contains("[AF:BODY:TEMPLATE]")) { BodyTemplate = TemplateUtils.GetTemplateSection(template, "[AF:BODY:TEMPLATE]", "[/AF:BODY:TEMPLATE]"); BodyTemplate = BodyTemplate.Replace("[AF:BODY:TEMPLATE]", string.Empty); BodyTemplate = BodyTemplate.Replace("[/AF:BODY:TEMPLATE]", string.Empty); template = TemplateUtils.ReplaceSubSection(template, string.Empty, "[AF:BODY:TEMPLATE]", "[/AF:BODY:TEMPLATE]"); } if (template.Contains("[TOOLBAR")) { var lit = new LiteralControl(); object sToolbar = DataCache.CacheRetrieve("aftb" + ModuleId); if (sToolbar == null) { sToolbar = Utilities.GetFileContent(SettingKeys.TemplatePath + "ToolBar.txt"); sToolbar = Utilities.ParseToolBar(sToolbar.ToString(), TabId, ModuleId, UserId, CurrentUserType); DataCache.CacheStore("aftb" + ModuleId, sToolbar); } lit.Text = sToolbar.ToString(); template = template.Replace("[TOOLBAR]", sToolbar.ToString()); } template = template.Replace("[AF:INPUT:SUMMARY]", "<asp:textbox id=\"txtSummary\" runat=\"server\" />"); template = template.Replace("[AF:INPUT:BODY]", "<asp:placeholder id=\"plhEditor\" runat=\"server\" />"); template = template.Replace("[AF:LABEL:SUBJECT]", "<asp:label id=\"lblSubject\" runat=\"server\" />"); if (!Request.IsAuthenticated & (canCreate || canReply)) { if (template.Contains("[AF:UI:ANON]")) { template = template.Replace("[AF:INPUT:USERNAME]", "<asp:textbox id=\"txtUsername\" cssclass=\"aftextbox\" runat=\"server\" />"); template = template.Replace("[AF:REQ:USERNAME]", "<asp:requiredfieldvalidator id=\"reqUsername\" validationgroup=\"afform\" ControlToValidate=\"txtUsername\" runat=\"server\" />"); template = "<%@ Register TagPrefix=\"dnn\" Assembly=\"DotNetNuke\" Namespace=\"DotNetNuke.UI.WebControls\"%>" + template; template = template.Replace("[AF:INPUT:CAPTCHA]", "<dnn:captchacontrol id=\"ctlCaptcha\" captchawidth=\"130\" captchaheight=\"40\" cssclass=\"Normal\" runat=\"server\" errorstyle-cssclass=\"NormalRed\" />"); if (!RequireCaptcha) { template = template.Replace("[RESX:SecurityCode]:[AF:REQ:SECURITYCODE]", string.Empty); } template = template.Replace("[AF:UI:ANON]", string.Empty); template = template.Replace("[/AF:UI:ANON]", string.Empty); } } else { template = TemplateUtils.ReplaceSubSection(template, string.Empty, "[AF:UI:ANON]", "[/AF:UI:ANON]"); } if (EditorMode != EditorModes.NewTopic || EditorMode != EditorModes.EditTopic) { template = template.Replace("[AF:UI:SECTION:TOPICREVIEW]", "<table class=\"afsection\" cellpadding=\"0\" cellspacing=\"0\"><tr><td class=\"afsectionhd\" style=\"border-left:solid 1px #b3b3b3;\">[RESX:TopicReview]</td><td class=\"afsectionhd\" align=\"right\" style=\"border-right:solid 1px #b3b3b3;\"><img id=\"imgSectionTopicReview\" src=\"" + ImagePath + "/images/arrows_left.png\" border=\"0\" class=\"afarrow\" onclick=\"aftoggleSection('TopicReview');\" /></td></tr><tr><td colspan=\"2\" class=\"afsectiondsp\" id=\"sectionTopicReview\" style=\"display:none;\"><div class=\"affieldsetnote\">[RESX:TopicReview:Note]</div>"); _topicReviewTemplate = TemplateUtils.GetTemplateSection(template, "[AF:CONTROL:TOPICREVIEW]", "[/AF:CONTROL:TOPICREVIEW]"); template = TemplateUtils.ReplaceSubSection(template, "<asp:placeholder id=\"plhTopicReview\" runat=\"server\" />", "[AF:CONTROL:TOPICREVIEW]", "[/AF:CONTROL:TOPICREVIEW]"); template = template.Replace("[/AF:UI:SECTION:TOPICREVIEW]", "</td></tr></table>"); } if (Permissions.HasPerm(ForumInfo.Security.Tag, ForumUser.UserRoles)) { template = template.Replace("[AF:UI:SECTION:TAGS]", "<table class=\"afsection\" cellpadding=\"0\" cellspacing=\"0\"><tr><td class=\"afsectionhd\" style=\"border-left:solid 1px #b3b3b3;\">[RESX:Tags]</td><td class=\"afsectionhd\" align=\"right\" style=\"border-right:solid 1px #b3b3b3;\"><img id=\"imgSectionTags\" src=\"" + ImagePath + "/images/arrows_left.png\" border=\"0\" class=\"afarrow\" onclick=\"aftoggleSection('Tags');\" /></td></tr><tr><td colspan=\"2\" class=\"afsectiondsp\" id=\"sectionTags\" style=\"display:none;\"><div class=\"affieldsetnote\">[RESX:Tags:Note]</div>"); template = template.Replace("[AF:UI:FIELDSET:TAGS]", "<fieldset class=\"affieldset\"><legend>[RESX:Tags]</legend><div class=\"affieldsetnote\">[RESX:Tags:Note]</div>"); var tc = new TokensController(); string sTagOut = tc.TokenGet("editor", "[AF:CONTROL:TAGS]"); if (string.IsNullOrEmpty(sTagOut)) { //sTagOut = "<am:textsuggest id=""tsTags"" runat=""server"" DataTextField=""TagName"" DataValueField=""TagName"" CssResults=""aftsresults"" CssResultItems=""aftsresultsitems"" CssResultItemsSelected=""aftsresultsel"" CssClass=""aftagstxt"" Width=""99%"" />" sTagOut = "<input type=\"text\" id=\"txtTags\" style=\"width:98%;\" class=\"NormalTextBox\" />"; //sTagOut &= "<script type=""text/javascript"">amaf_loadSuggest('txtTags', null, -1);</script>" } sTagOut = sTagOut.Replace("[TAGS]", Tags); template = template.Replace("[AF:CONTROL:TAGS]", sTagOut); template = template.Replace("[/AF:UI:FIELDSET:TAGS]", "</fieldset>"); template = template.Replace("[/AF:UI:SECTION:TAGS]", "</td></tr></table>"); } //Properties if ((EditorMode == EditorModes.EditTopic || EditorMode == EditorModes.NewTopic) & ForumInfo.Properties != null) { string pTemplate = TemplateUtils.GetTemplateSection(template, "[AF:PROPERTIES]", "[/AF:PROPERTIES]"); string propList = string.Empty; foreach (PropertiesInfo p in ForumInfo.Properties) { string pValue = string.Empty; if (TopicProperties != null && TopicProperties.Count > 0) { foreach (PropertiesInfo tp in TopicProperties) { if (tp.PropertyId == p.PropertyId) { pValue = tp.DefaultValue; } } } string tmp = pTemplate; if (p.IsRequired) { tmp = tmp.Replace("[AF:PROPERTY:LABEL]", "<span class=\"afprop-required\">[RESX:" + p.Name + "]</span>"); tmp = tmp.Replace("[AF:PROPERTY:REQUIRED]", "<span class=\"afrequired\"></span>"); } else { tmp = tmp.Replace("[AF:PROPERTY:LABEL]", "<span class=\"afprop-normal\">[RESX:" + p.Name + "]</span>"); tmp = tmp.Replace("[AF:PROPERTY:REQUIRED]", string.Empty); } if (p.DataType == "text") { tmp = tmp.Replace("[AF:PROPERTY:CONTROL]", "<input type=\"text\" id=\"afprop-" + p.PropertyId.ToString() + "\" class=\"NormalTextBox afprop-input\" name=\"afprop-" + p.PropertyId + "\" value=\"" + pValue + "\" />"); } else if (p.DataType == "yesno") { string sYesSelected = string.Empty; string sNoSelected = " checked=\"checked\""; if (pValue.ToLowerInvariant() == "yes") { sYesSelected = " checked=\"checked\""; sNoSelected = string.Empty; } tmp = tmp.Replace("[AF:PROPERTY:CONTROL]", "[RESX:Yes]:<input type=\"radio\" id=\"afprop-" + p.PropertyId.ToString() + "-yes\" groupname=\"afprop-" + p.PropertyId.ToString() + "\" class=\"NormalTextBox afprop-radio\" name=\"afprop-" + p.PropertyId + "\" value=\"Yes\" " + sYesSelected + " /> [RESX:No]:<input type=\"radio\" id=\"afprop-" + p.PropertyId.ToString() + "-no\" groupname=\"afprop-" + p.PropertyId.ToString() + "\" class=\"NormalTextBox afprop-radio\" name=\"afprop-" + p.PropertyId + "\" value=\"No\" " + sNoSelected + " />"); } else if (p.DataType.Contains("list")) { string sList = string.Empty; var lists = new Common.Lists.ListController(); if (p.DataType.Contains("list|")) { sList = "<select id=\"afprop-" + p.PropertyId.ToString() + "\" class=\"NormalTextBox afprop-select\" name=\"afprop-" + p.PropertyId.ToString() + "\">"; string lName = p.DataType.Substring(p.DataType.IndexOf("|") + 1); var lc = lists.GetListEntryInfoCollection(lName, string.Empty); foreach (Common.Lists.ListEntryInfo l in lc) { if (pValue == l.Value) { sList += "<option value=\"" + l.Value + "\" selected=\"selected\">" + l.Text + "</option>"; } else { sList += "<option value=\"" + l.Value + "\">" + l.Text + "</option>"; } } sList += "</select>"; } else if (p.DataType.Contains("list-multi|")) { sList = "<div class=\"afprop-chklist\">"; sList += "<ul>"; string lName = p.DataType.Substring(p.DataType.IndexOf("|") + 1); var lc = lists.GetListEntryInfoCollection(lName, string.Empty); string[] pValues = null; if (!(string.IsNullOrEmpty(pValue))) { pValues = pValue.Split(','); } foreach (Common.Lists.ListEntryInfo l in lc) { bool isSelected = false; if (pValues != null) { foreach (string pv in pValues) { if (pv == l.Value) { isSelected = true; } } } sList += "<li>"; if (isSelected) { sList += "<input type=\"checkbox\" name=\"afprop-" + p.PropertyId.ToString() + "\" value=\"" + l.Value + "\" checked=\"checked\" />"; } else { sList += "<input type=\"checkbox\" name=\"afprop-" + p.PropertyId.ToString() + "\" value=\"" + l.Value + "\" />"; } sList += "<span>" + l.Text + "</span></li>"; } sList += "</ul></div>"; } tmp = tmp.Replace("[AF:PROPERTY:CONTROL]", sList); } propList += tmp; } template = TemplateUtils.ReplaceSubSection(template, propList, "[AF:PROPERTIES]", "[/AF:PROPERTIES]"); } else { template = TemplateUtils.ReplaceSubSection(template, string.Empty, "[AF:PROPERTIES]", "[/AF:PROPERTIES]"); } if ((EditorMode == EditorModes.EditTopic || EditorMode == EditorModes.NewTopic) && Permissions.HasPerm(ForumInfo.Security.Categorize, ForumUser.UserRoles)) { template = template.Replace("[AF:UI:SECTION:CATEGORIES]", "<table class=\"afsection\" cellpadding=\"0\" cellspacing=\"0\"><tr><td class=\"afsectionhd\" style=\"border-left:solid 1px #b3b3b3;\">[RESX:Categories]</td><td class=\"afsectionhd\" align=\"right\" style=\"border-right:solid 1px #b3b3b3;\"><img id=\"imgSectionCategories\" src=\"" + ImagePath + "/images/arrows_left.png\" border=\"0\" class=\"afarrow\" onclick=\"aftoggleSection('Categories');\" /></td></tr><tr><td colspan=\"2\" class=\"afsectiondsp\" id=\"sectionCategories\" style=\"display:none;\"><div class=\"affieldsetnote\">[RESX:Categories:Note]</div>"); template = template.Replace("[AF:UI:FIELDSET:CATEGORIES]", "<fieldset class=\"affieldset\"><legend>[RESX:Categories]</legend><div class=\"affieldsetnote\">[RESX:Categories:Note]</div>"); string sCatOut; var cc = new CategoriesList(PortalId, ModuleId, ForumInfo.ForumID, ForumInfo.ForumGroupId); if (TopicId > 0) { cc.SelectedValues = Categories; } sCatOut = cc.RenderEdit(); template = template.Replace("[AF:CONTROL:CATEGORIES]", sCatOut); template = template.Replace("[/AF:UI:FIELDSET:CATEGORIES]", "</fieldset>"); template = template.Replace("[/AF:UI:SECTION:CATEGORIES]", "</td></tr></table>"); } if ((EditorMode == EditorModes.EditTopic || EditorMode == EditorModes.NewTopic) && Permissions.HasPerm(ForumInfo.Security.Poll, ForumUser.UserRoles)) { template = "<%@ register src=\"~/DesktopModules/ActiveForums/controls/af_polledit.ascx\" tagprefix=\"af\" tagname=\"polledit\" %>" + template; template = template.Replace("[AF:UI:SECTION:POLL]", "<table class=\"afsection\" cellpadding=\"0\" cellspacing=\"0\"><tr><td class=\"afsectionhd\" style=\"border-left:solid 1px #b3b3b3;\">[RESX:Polls]</td><td class=\"afsectionhd\" align=\"right\" style=\"border-right:solid 1px #b3b3b3;\"><img id=\"imgSectionPoll\" src=\"" + ImagePath + "/images/arrows_left.png\" border=\"0\" class=\"afarrow\" onclick=\"aftoggleSection('Poll');\" /></td></tr><tr><td colspan=\"2\" class=\"afsectiondsp\" id=\"sectionPoll\" style=\"display:none;\"><div class=\"affieldsetnote\">[RESX:Poll:Note]</div>"); template = template.Replace("[/AF:UI:SECTION:POLL]", "</td></tr></table>"); template = template.Replace("[AF:UI:FIELDSET:POLL]", "<fieldset class=\"affieldset\"><legend>[RESX:Polls]</legend><div class=\"affieldsetnote\">[RESX:Poll:Note]</div>"); template = template.Replace("[AF:CONTROL:POLL]", "<af:polledit id=\"afpolledit\" runat=\"server\" />"); template = template.Replace("[/AF:UI:FIELDSET:POLL]", "</fieldset>"); template = template.Replace("[AF:CONTROLS:SECTIONTOGGLE]", "<img id=\"imgSectionPoll\" src=\"" + ImagePath + "/images/arrows_left.png\" border=\"0\" class=\"afarrow\" onclick=\"aftoggleSection('Poll');\" />"); } else { template = TemplateUtils.ReplaceSubSection(template, string.Empty, "[AF:UI:FIELDSET:POLL]", "[/AF:UI:FIELDSET:POLL]"); template = template.Replace("[AF:CONTROL:POLL]", string.Empty); } if (EditorMode == EditorModes.ReplyWithBody) { template = template.Replace("[AF:UI:MESSAGEREPLY]", string.Empty); template = template.Replace("[/AF:UI:MESSAGEREPLY]", string.Empty); template = template.Replace("[AF:LABEL:BODYREPLY]", Body); } else { template = TemplateUtils.ReplaceSubSection(template, string.Empty, "[AF:UI:MESSAGEREPLY]", "[/AF:UI:MESSAGEREPLY]"); } if (template.Contains("[AF:UI:FIELDSET:OPTIONS]")) { template = template.Replace("[AF:UI:FIELDSET:OPTIONS]", "<fieldset class=\"affieldset\"><legend>[RESX:AdditionalOptions]</legend>"); template = template.Replace("[/AF:UI:FIELDSET:OPTIONS]", "</fieldset>"); } string sOptions = GetOptions(); template = template.Replace("[AF:CONTROL:OPTIONS]", sOptions); if (template.Contains("[AF:UI:SECTION:OPTIONS]")) { if (sOptions == string.Empty) { template = template.Replace("[AF:UI:SECTION:OPTIONS]", string.Empty); template = template.Replace("[/AF:UI:SECTION:OPTIONS]", string.Empty); } else { template = template.Replace("[AF:UI:SECTION:OPTIONS]", "<table class=\"afsection\" cellpadding=\"0\" cellspacing=\"0\"><tr><td class=\"afsectionhd\" style=\"border-left:solid 1px #b3b3b3;\">[RESX:AdditionalOptions]</td><td class=\"afsectionhd\" align=\"right\" style=\"border-right:solid 1px #b3b3b3;\"><img id=\"imgSectionOptions\" src=\"" + ImagePath + "/images/arrows_left.png\" border=\"0\" class=\"afarrow\" onclick=\"aftoggleSection('Options');\" /></td></tr><tr><td colspan=\"2\" class=\"afsectiondsp\" id=\"sectionOptions\" style=\"display:none;\"><div class=\"affieldsetnote\">[RESX:Options:Note]</div>"); template = template.Replace("[/AF:UI:SECTION:OPTIONS]", "</td></tr></table>"); } } if (template.Contains("[AF:CONTROL:STATUS]")) { if (EditorMode == EditorModes.EditTopic || EditorMode == EditorModes.NewTopic) { template = "<%@ register src=\"~/DesktopModules/ActiveForums/controls/af_topicstatus.ascx\" tagprefix=\"af\" tagname=\"topicstatus\" %>" + template; template = template.Replace("[AF:CONTROL:STATUS]", "<af:topicstatus id=\"aftopicstatus\" AutoPostBack=\"False\" ForumId=\"" + ForumInfo.ForumID + "\" runat=\"server\" />"); } } template = template.Replace("[AF:LINK:FORUMNAME]", "<a href=\"" + NavigateUrl(TabId, "", ParamKeys.ViewType + "=" + Views.Topics + "&" + ParamKeys.ForumId + "=" + ForumInfo.ForumID.ToString()) + "\">" + ForumInfo.ForumName + "</a>"); template = template.Replace("[AF:LINK:FORUMGROUP]", "<a href=\"" + NavigateUrl(TabId, "", ParamKeys.GroupId + "=" + ForumInfo.ForumGroupId.ToString()) + "\">" + ForumInfo.GroupName + "</a>"); template = template.Replace("[AF:LINK:FORUMMAIN]", "<a href=\"" + NavigateUrl(TabId) + "\">[RESX:FORUMS]</a>"); template = !(TopicId == -1) ? template.Replace("[AF:LINK:TOPICNAME]", "<a href=\"" + NavigateUrl(TabId, "", ParamKeys.TopicId + "=" + TopicId + "&" + ParamKeys.ViewType + "=" + Views.Topic + "&" + ParamKeys.ForumId + "=" + ForumInfo.ForumID.ToString()) + "\">" + TopicSubject + "</a>") : template.Replace("[AF:LINK:TOPICNAME]", string.Empty); template = template.Replace("[AF:UI:FIELDSET:ACTIONS]", "<fieldset class=\"affieldset\"><legend>[RESX:Actions]</legend>"); template = template.Replace("[/AF:UI:FIELDSET:ACTIONS]", "</fieldset>"); template = template.Replace("[AF:BUTTON:SUBMIT]", "<am:imagebutton id=\"btnPost\" Text=\"[RESX:Submit]\" runat=\"server\" />"); template = template.Replace("[AF:BUTTON:CANCEL]", "<am:imagebutton id=\"btnCancel\" Text=\"[RESX:Cancel]\" runat=\"server\" />"); template = template.Replace("[AF:BUTTON:PREVIEW]", Request.IsAuthenticated ? "<am:imagebutton id=\"btnPreview\" PostBack=\"False\" Text=\"[RESX:Preview]\" runat=\"server\" />" : string.Empty); if (template.Contains("[AF:CONTROL:POSTICONS]") && ForumInfo.AllowPostIcon) { template = template.Replace("[AF:UI:FIELDSET:POSTICONS]", "<fieldset class=\"affieldset\"><legend>[RESX:PostIcons]</legend><div class=\"affieldsetnote\">[RESX:PostIcons:Note]</div>"); template = template.Replace("[AF:CONTROL:POSTICONS]", "<af:posticons id=\"afposticons\" runat=\"server\" Theme=\"" + MainSettings.Theme + "\" />"); template = template.Replace("[/AF:UI:FIELDSET:POSTICONS]", "</fieldset>"); } else { template = template.Replace("[AF:UI:FIELDSET:POSTICONS]", string.Empty); template = template.Replace("[AF:CONTROL:POSTICONS]", string.Empty); template = template.Replace("[/AF:UI:FIELDSET:POSTICONS]", string.Empty); } if (template.Contains("[AF:CONTROL:EMOTICONS]") && ForumInfo.AllowEmoticons) { var objUtils = new emoticons(); //Dim obj As Object = DataCache.CacheRetrieve(ForumModuleId & "Emoticons" & EditorType.ToString) //If obj Is Nothing Then // DataCache.CacheStore(ForumModuleId & "Emoticons" & EditorType.ToString) = objUtils.LoadEmoticons(EditorType, ForumModuleId, ImagePath) //End If template = template.Replace("[AF:CONTROL:EMOTICONS]", "<fieldset class=\"affieldset\"><legend>[RESX:Smilies]</legend>" + objUtils.LoadEmoticons(EditorType, ModuleId, ImagePath) + "</fieldset>"); } else { template = template.Replace("[AF:CONTROL:EMOTICONS]", string.Empty); } if (template.Contains("[AF:CONTROL:UPLOAD]")) { if (canAttach && ForumInfo.AllowAttach) { template = "<%@ register src=\"~/DesktopModules/ActiveForums/controls/af_attach.ascx\" tagprefix=\"af\" tagname=\"attach\" %>" + template; template = template.Replace("[AF:UI:FIELDSET:ATTACH]", "<fieldset class=\"affieldset\"><legend>[RESX:Attachments]</legend><div class=\"affieldsetnote\">[RESX:Attacments:Note]</div>"); template = template.Replace("[AF:UI:SECTION:ATTACH]", "<table class=\"afsection\" cellpadding=\"0\" cellspacing=\"0\"><tr><td class=\"afsectionhd\" style=\"border-left:solid 1px #b3b3b3;\">[RESX:Attachments]</td><td class=\"afsectionhd\" align=\"right\" style=\"border-right:solid 1px #b3b3b3;\"><img id=\"imgSectionAttach\" src=\"" + ImagePath + "/images/arrows_left.png\" border=\"0\" class=\"afarrow\" onclick=\"aftoggleSection('Attach');\" /></td></tr><tr><td colspan=\"2\" class=\"afsectiondsp\" id=\"sectionAttach\" style=\"display:none;\"><div class=\"affieldsetnote\">[RESX:Attachments:Note]</div>"); template = template.Replace("[AF:CONTROL:UPLOAD]", "<af:attach id=\"ctlAttach\" runat=\"server\" />"); template = template.Replace("[/AF:UI:FIELDSET:ATTACH]", "</fieldset>"); template = template.Replace("[/AF:UI:SECTION:ATTACH]", "</td></tr></table>"); } else { template = template.Replace("[AF:UI:FIELDSET:ATTACH]", string.Empty); template = template.Replace("[AF:CONTROL:UPLOAD]", string.Empty); template = template.Replace("[/AF:UI:FIELDSET:ATTACH]", string.Empty); template = template.Replace("[AF:UI:SECTION:ATTACH]", string.Empty); template = template.Replace("[/AF:UI:SECTION:ATTACH]", string.Empty); } } //If str.Contains("[AF:CONTROL:FORUMTREE]") Then // str = str.Replace("[AF:CONTROL:FORUMTREE]", "<af:forumtree id=""ctlForumTree"" runat=""server"" showcheckboxes=""true"" ModuleId=""" & ModuleId & """ />") // sHeader &= "<%@ register src=""~/DesktopModules/ActiveForums/controls/af_forumtree.ascx"" tagprefix=""af"" tagname=""forumtree"" %>" //End If template = Utilities.LocalizeControl(template); template = Utilities.StripTokens(template); return template; }
private static string DisplayDataType(Entities.Profile.ProfilePropertyDefinition definition) { string CacheKey = string.Format("DisplayDataType:{0}", definition.DataType); string strDataType = Convert.ToString(DataCache.GetCache(CacheKey)) + ""; if (strDataType == string.Empty) { Common.Lists.ListController objListController = new Common.Lists.ListController(); strDataType = objListController.GetListEntryInfo(definition.DataType).Value; DataCache.SetCache(CacheKey, strDataType); } return strDataType; }