protected virtual void Page_Load(System.Object sender, System.EventArgs e) { try { Ektron.Cms.UserAPI refUserAPI = new Ektron.Cms.UserAPI(); Ektron.Cms.SiteAPI refSiteApi = new Ektron.Cms.SiteAPI(); Ektron.Cms.UserData user_info = new Ektron.Cms.UserData(); Ektron.Cms.Common.EkRequestInformation RequestInfo; settings_data = refSiteApi.GetSiteVariables(-1); RequestInfo = refUserAPI.RequestInformationRef; if ((RequestInfo == null) && 0 == RequestInfo.IsMembershipUser) { bCanModifyImg = true; } if (!string.IsNullOrEmpty(Request.QueryString["CanModifyImg"])) { bCanModifyImg = Convert.ToBoolean(Request.QueryString["CanModifyImg"]); } } catch (Exception) { // Mostly likely not logged and file is being browsed directly settings_data = null; } Response.ContentType = "text/xml"; }
private void Page_Load(System.Object sender, System.EventArgs e) { Ektron.Cms.ContentAPI refContApi = new Ektron.Cms.ContentAPI(); Ektron.Cms.SiteAPI refSiteApi = new Ektron.Cms.SiteAPI(); Ektron.Cms.Site.EkSite refSite = new Ektron.Cms.Site.EkSite(refContApi.RequestInformationRef); long folder = 0; @internal.Text = refSite.GetEditorInternal(); if (LCaseQueryString("mode") == "forum") { strButtons = Request.QueryString["toolButtons"]; string[] arTools = strButtons.ToLower().Split(",".ToCharArray()); foreach (string Item in arTools) { if (!(options.ContainsKey(Item))) { options.Add(Item, Item); } } } Response.ContentType = "text/xml"; m_refMsg = refSiteApi.EkMsgRef; settings_data = refSiteApi.GetSiteVariables(-1); refSite = refContApi.EkSiteRef; FontList = refContApi.GetFontConfigList(); EKSLK = refSite.GetInternal(); AppeWebPath = refContApi.AppPath + refContApi.AppeWebPath; if (LCaseQueryString("FormToolbarVisible") == "true") { FormToolbarVisible = "true"; FormToolbarEnabled = "true"; } else { FormToolbarVisible = "false"; FormToolbarEnabled = "true"; } if ("0" == LCaseQueryString("wiki")) { bWikiButton = bool.Parse("false"); } else { bWikiButton = bool.Parse("true"); } //Set the state for word styles if (settings_data.PreserveWordStyles == true) { PresWrdStyl = "true"; } else { PresWrdStyl = "false"; } if (settings_data.PreserveWordClasses == true) { PresWrdCls = "true"; } else { PresWrdCls = "false"; } switch (settings_data.Accessibility) { case "1": sAccess = "loose"; bAccessEval = "true"; break; case "2": sAccess = "strict"; bAccessEval = "true"; break; default: sAccess = "none"; bAccessEval = "false"; break; } NoSrcView = LCaseQueryString("nosrc"); mode = LCaseQueryString("mode"); if (mode == "") { mode = "wysiwyg"; } if (mode == "forum") { mode = "wysiwyg"; IsForum = true; } if ("datadesign" == mode || "dataentry" == mode) { DefaultGetContentType = "datadesignpackage"; } else if ("formdesign" == mode) { DefaultGetContentType = "designpage"; } ExtUI = LCaseQueryString("extui"); InterfaceName = LCaseQueryString("InterfaceName"); if ("" == InterfaceName) { if ("datadesign" == mode || "formdesign" == mode || "dataentry" == mode) { InterfaceName = mode; FormToolbarEnabled = "false"; } else { InterfaceName = "standard"; } } else if ("none" == InterfaceName) { MinimalFeatureSet = false; FormToolbarEnabled = "false"; } else if ("minimal" == InterfaceName || "calendar" == InterfaceName || "task" == InterfaceName) { if (strButtons.Length > 0 && true == options.ContainsKey("wmv")) { MinimalFeatureSet = false; } else { MinimalFeatureSet = true; } FormToolbarEnabled = "false"; } if (settings_data.EnableFontButtons || true == options.ContainsKey("fontmenu")) { bEnableFontButtons = true; } string strFolder; strFolder = Request.QueryString["folder"]; if (strFolder != null) { if (Information.IsNumeric(strFolder)) { folder = Convert.ToInt64(strFolder); } } Ektron.Cms.LibraryConfigData lib_settings; extensions = ""; try { // Only make this call if we are logged in Ektron.Cms.ContentAPI refContentApi = new Ektron.Cms.ContentAPI(); Ektron.Cms.Content.EkContent refContent; refContent = refContentApi.EkContentRef; if (refContent.IsAllowed(0, 0, "users", "IsLoggedIn", 0)) { // An exception will be thrown if the user is not authenticated. lib_settings = refContApi.GetLibrarySettings(folder); if (lib_settings != null) { extensions = lib_settings.ImageExtensions + "," + lib_settings.FileExtensions; } } } catch (Exception) { // ignore error } ContentLanguage = refContApi.RequestInformationRef.ContentLanguage; PopulateDataLists(refContApi); }
private void SetLabels() { ltr_adf_name.Text = base.GetMessage("lbl DiscussionForumName"); ltr_adf_title.Text = base.GetMessage("lbl DiscussionForumTitle"); ltr_adf_category.Text = base.GetMessage("lbl DiscussionForumSubject"); ltr_adf_sortorder.Text = base.GetMessage("lbl discussionforumsortorder"); ltr_forumid.Text = base.GetMessage("id label"); _DiscussionCategory = _EkContentRef.GetCategoriesforBoard(_DiscussionForum.ParentId); if (!(_DiscussionCategory == null) && (_DiscussionCategory.Length > 0)) { drp_adf_category.DataSource = _DiscussionCategory; drp_adf_category.DataTextField = "Name"; drp_adf_category.DataValueField = "categoryID"; drp_adf_category.SelectedValue = _DiscussionForum.CategoryID.ToString(); drp_adf_category.DataBind(); } else { throw (new Exception(m_refMsg.GetMessage("err NoBoardCategories"))); } Ektron.Cms.SiteAPI refSiteApi = new Ektron.Cms.SiteAPI(); if (refSiteApi.EnableReplication) { ltr_adf_dynreplication.Text = "<input type=\"hidden\" name=\"EnableReplication\" value=\"" + _DiscussionForum.ReplicationMethod.ToString() + "\" />"; } }