Ejemplo n.º 1
0
        private void LoadSettings()
        {
            timeZoneOffset = SiteUtils.GetUserTimeOffset();
            timeZone       = SiteUtils.GetUserTimeZone();

            try
            {
                // this keeps the action from changing during ajax postback in folder based sites
                SiteUtils.SetFormAction(Page, Request.RawUrl);
            }
            catch (MissingMethodException)
            {
                //this method was introduced in .NET 3.5 SP1
            }

            if (ModuleId == -1)
            {
                return;
            }

            module         = new Module(ModuleId, CurrentPage.PageId);
            moduleSettings = ModuleSettings.GetModuleSettings(ModuleId);
            if (moduleSettings == null)
            {
                return;
            }
            config = new FeedManagerConfiguration(moduleSettings);

            ConfirmImage = this.ImageSiteRoot + "/Data/SiteImages/confirmed";

            if (config.AllowExternalImages)
            {
                allowedImageUrlRegexPattern = SecurityHelper.RegexAnyImageUrlPatern;
            }

            heading.Text = string.Format(CultureInfo.InvariantCulture,
                                         FeedResources.PublishingHeaderFormat, module.ModuleTitle);

            lnkBackToPage.Text = string.Format(CultureInfo.InvariantCulture,
                                               FeedResources.BackToPageLinkFormat, CurrentPage.PageName);

            lnkBackToPage.NavigateUrl = SiteUtils.GetCurrentPageUrl();

            lnkEditFeeds.Text        = FeedResources.AddButton;
            lnkEditFeeds.NavigateUrl = SiteRoot + "/FeedManager/FeedEdit.aspx?pageid="
                                       + PageId.ToInvariantString()
                                       + "&mid=" + ModuleId.ToInvariantString();

            AddClassToBody("feedmanagerpage");
        }
Ejemplo n.º 2
0
        private void LoadSettings()
        {
            lnkCancel.NavigateUrl = SiteUtils.GetCurrentPageUrl();

            if (ModuleId == -1)
            {
                return;
            }

            module         = new Module(ModuleId, CurrentPage.PageId);
            moduleSettings = ModuleSettings.GetModuleSettings(ModuleId);
            if (moduleSettings == null)
            {
                return;
            }

            config = new FeedManagerConfiguration(moduleSettings);

            divPublish.Visible = config.EnableSelectivePublishing;

            AddClassToBody("feededit");
        }
Ejemplo n.º 3
0
        private void LoadSettings()
        {
            timeZoneOffset = SiteUtils.GetUserTimeOffset();
            timeZone       = SiteUtils.GetUserTimeZone();
#if NET35
            if (WebConfigSettings.DisablePageViewStateByDefault)
            {
                Page.EnableViewState = true;
            }
#endif
            try
            {
                // this keeps the action from changing during ajax postback in folder based sites
                SiteUtils.SetFormAction(Page, Request.RawUrl);
            }
            catch (MissingMethodException)
            {
                //this method was introduced in .NET 3.5 SP1
            }

            //pnlContainer.ModuleId = ModuleId;

            lnkAggregateRSS.Attributes.Add("rel", "nofollow");

            config = new FeedManagerConfiguration(Settings);

            dateFormat = config.DateFormat;
            if (displaySettings.DateFormat.Length > 0) //allow theme override for mobile
            {
                dateFormat = displaySettings.DateFormat;
            }

            useNeatHtml = config.UseNeatHtml;
            // when using excerpt mode we don't need the protection of neathtml because we are already removing the markup
            // using it in addition was preventing opening the read more link in a new window
            if (displaySettings.ForceExcerptMode)
            {
                useNeatHtml = false;
            }
            if (config.UseExcerpt)
            {
                useNeatHtml = false;
            }

            ConfirmImage = this.ImageSiteRoot + "/Data/SiteImages/confirmed";

            if (config.AllowExternalImages)
            {
                allowedImageUrlRegexPattern = SecurityHelper.RegexAnyImageUrlPatern;
            }

            if (RenderInWebPartMode)
            {
                ShowItemDetail = false;
            }

            if (config.ShowErrorMessageOnInvalidPosts)
            {
                ErrorMessage = FeedResources.MalformedMarkupWarning;
            }

            LinkToAuthorSite = !config.UseFeedListAsFilter || displaySettings.DisableUseFeedListAsFilter;



            if (config.ListLabel.Length > 0)
            {
                lblFeedListName.Text       = config.ListLabel;
                lblFeedListNameBottom.Text = config.ListLabel;
            }
            else
            {
                lblFeedListName.Visible       = false;
                lblFeedListNameBottom.Visible = false;
            }


            if (config.InstanceCssClass.Length > 0)
            {
                pnlOuterWrap.SetOrAppendCss(config.InstanceCssClass);
            }

            if ((config.UseScroller) && (!displaySettings.DisableScroller))
            {
                mojoBasePage basePage = Page as mojoBasePage;
                if (basePage != null)
                {
                    basePage.ScriptConfig.IncludeJqueryScroller = true;
                }
            }

            //if (!config.EnableInPlacePublishing)
            //{
            //    rptEntries.EnableViewState = false;
            //}

            //if (!config.UseFeedListAsFilter)
            //{
            //    dlstFeedList.EnableViewState = false;
            //}
        }