Exemplo n.º 1
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);


            if (SocialGroupId > 0)
            {
                ShowToolbar = false;
            }
            if (Request.QueryString["dnnprintmode"] == null & Request.QueryString["asg"] == null)
            {
                bool show = true;
                if (currView == "grid" && Request.Params["asg"] != null)
                {
                    show = false;
                }
                if (HttpContext.Current.Items["ShowToolbar"] != null)
                {
                    ShowToolbar = bool.Parse(HttpContext.Current.Items["ShowToolbar"].ToString());
                }
                if (show && ShowToolbar == true)
                {
                    LiteralControl lit      = new LiteralControl();
                    object         sToolbar = DataCache.CacheRetrieve("aftb" + ForumModuleId);
                    if (sToolbar == null)
                    {
                        sToolbar = Utilities.GetFileContent(SettingKeys.TemplatePath + "ToolBar.txt");
                        DataCache.CacheStore("aftb" + ForumModuleId, sToolbar);
                    }
                    lit.Text = sToolbar.ToString();
                    plhToolbar.Controls.Clear();
                    plhToolbar.Controls.Add(lit);
                }
            }
            if (ForumId > 0 && UserIsMod)
            {
                Controls.HtmlControlLoader ctl = new Controls.HtmlControlLoader();
                ctl.ControlId = "aftopicedit";
                ctl.Height    = "350px";
                ctl.Width     = "400px";
                ctl.Name      = Utilities.GetSharedResource("[RESX:TopicQuickEdit]");
                ctl.FilePath  = "~/desktopmodules/activeforums/controls/htmlcontrols/quickedit.ascx";
                this.Controls.Add(ctl);

                ctl           = new Controls.HtmlControlLoader();
                ctl.ControlId = "aftopicmove";
                ctl.Height    = "350px";
                ctl.Width     = "500px";
                ctl.Name      = Utilities.GetSharedResource("[RESX:MoveTopicTitle]");
                ctl.FilePath  = "~/desktopmodules/activeforums/controls/htmlcontrols/movetopic.ascx";
                this.Controls.Add(ctl);
            }
        }
Exemplo n.º 2
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            if (SocialGroupId > 0)
            {
                ShowToolbar = false;
            }
            if (Request.QueryString["dnnprintmode"] == null & Request.QueryString["asg"] == null)
            {
                bool show = true;
                if (currView == "grid" && Request.Params["asg"] != null)
                {
                    show = false;
                }
                if (HttpContext.Current.Items["ShowToolbar"] != null)
                {
                    ShowToolbar = bool.Parse(HttpContext.Current.Items["ShowToolbar"].ToString());
                }
                if (show && ShowToolbar == true)
                {
                    LiteralControl lit = new LiteralControl();
                    object sToolbar = DataCache.CacheRetrieve("aftb" + ForumModuleId);
                    if (sToolbar == null)
                    {
                        sToolbar = Utilities.GetFileContent(SettingKeys.TemplatePath + "ToolBar.txt");
                        DataCache.CacheStore("aftb" + ForumModuleId, sToolbar);
                    }
                    lit.Text = sToolbar.ToString();
                    plhToolbar.Controls.Clear();
                    plhToolbar.Controls.Add(lit);
                }

            }
            if (ForumId > 0 & TopicId < 1 && UserIsMod)
            {
                Controls.HtmlControlLoader ctl = new Controls.HtmlControlLoader();
                ctl.ControlId = "aftopicedit";
                ctl.Height = "350px";
                ctl.Width = "400px";
                ctl.Name = Utilities.GetSharedResource("[RESX:TopicQuickEdit]");
                ctl.FilePath = "~/desktopmodules/activeforums/controls/htmlcontrols/quickedit.ascx";
                this.Controls.Add(ctl);

                ctl = new Controls.HtmlControlLoader();
                ctl.ControlId = "aftopicmove";
                ctl.Height = "350px";
                ctl.Width = "500px";
                ctl.Name = Utilities.GetSharedResource("[RESX:MoveTopicTitle]");
                ctl.FilePath = "~/desktopmodules/activeforums/controls/htmlcontrols/movetopic.ascx";
                this.Controls.Add(ctl);
            }
        }