Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string currentForumPost = "";

        string[] post = QueryHelper.GetString("postid", "").Split(';');
        postId = ValidationHelper.GetInteger(post[0], 0);
        ForumContext.CheckSite(0, 0, postId);

        if (post.Length >= 2)
        {
            forumId = ValidationHelper.GetInteger(post[1], 0);
            this.postListing.ForumId = forumId;
        }

        // Show current post
        postInfo = ForumPostInfoProvider.GetForumPostInfo(postId);
        if (postInfo != null)
        {
            currentForumPost          = HTMLHelper.HTMLEncode(postInfo.PostSubject);
            this.postListing.PostInfo = postInfo;
        }
        // If not post, show current forum
        else if (forumId > 0)
        {
            ForumInfo fi = ForumInfoProvider.GetForumInfo(forumId);
            if (fi != null)
            {
                currentForumPost = fi.ForumDisplayName;
            }
        }

        this.postListing.IsLiveSite = false;

        this.InitializeMasterPage(currentForumPost);
    }
Exemple #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int forumId = QueryHelper.GetInteger("forumid", 0);

        ForumContext.CheckSite(0, forumId, 0);

        if (QueryHelper.GetInteger("saved", 0) > 0)
        {
            postsTreeUrl += forumId.ToString() + "&saved=1";
            postsEditUrl += forumId.ToString() + "&saved=1";
        }
        else
        {
            postsTreeUrl += forumId.ToString();
            postsEditUrl += forumId.ToString();
        }

        frameTree.Attributes["name"] = postFrameTree;
        frameTree.Attributes["src"]  = postsTreeUrl;

        frameEdit.Attributes["name"] = postFrameEdit;
        frameEdit.Attributes["src"]  = postsEditUrl;

        if (CultureHelper.IsUICultureRTL())
        {
            ControlsHelper.ReverseFrames(colsFrameset);
        }

        ScriptHelper.HideVerticalTabs(this);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        int forumId = ValidationHelper.GetInteger(Request.QueryString["forumid"], 0);

        ForumContext.CheckSite(0, forumId, 0);

        if (ValidationHelper.GetInteger(Request.QueryString["saved"], 0) > 0)
        {
            postsTreeUrl += forumId.ToString() + "&saved=1";
            postsEditUrl += forumId.ToString() + "&saved=1";
        }
        else
        {
            postsTreeUrl += forumId.ToString();
            postsEditUrl += forumId.ToString();
        }

        frameTree.Attributes["name"] = postFrameTree;
        frameTree.Attributes["src"]  = postsTreeUrl;

        frameEdit.Attributes["name"] = postFrameEdit;
        frameEdit.Attributes["src"]  = postsEditUrl;

        if (CultureHelper.IsUICultureRTL())
        {
            ControlsHelper.ReverseFrames(colsFrameset);
        }
    }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string currentForumPost = "";

        postId = QueryHelper.GetInteger("postid", 0);
        ForumContext.CheckSite(0, 0, postId);
        CurrentMaster.PanelContent.CssClass = String.Empty;

        ForumPostInfo forumPostObj = ForumPostInfoProvider.GetForumPostInfo(postId);

        if (forumPostObj != null)
        {
            currentForumPost = HTMLHelper.HTMLEncode(forumPostObj.PostSubject);
        }

        string listingPost = QueryHelper.GetString("listingpost", null);

        if (!String.IsNullOrEmpty(listingPost))
        {
            listingParameter = "&listingpost=" + HTMLHelper.HTMLEncode(listingPost);
        }

        this.postEdit.EditPostID = postId;

        this.postEdit.OnSaved   += new EventHandler(postEdit_OnSaved);
        this.postEdit.IsLiveSite = false;
        this.InitializeMasterPage(currentForumPost);
    }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        forumId = ValidationHelper.GetInteger(Request.QueryString["forumid"], 0);
        ForumContext.CheckSite(0, forumId, 0);

        ForumFlatView1.ForumID    = forumId;
        ForumFlatView1.IsLiveSite = false;
        InitializeMasterPage();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        forumId = QueryHelper.GetInteger("forumid", 0);
        ForumContext.CheckSite(0, forumId, 0);

        ForumFlatView1.ForumID    = forumId;
        ForumFlatView1.IsLiveSite = false;
        InitializeMasterPage();
    }
Exemple #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int forumID = QueryHelper.GetInteger("forumid", 0);

        ForumContext.CheckSite(0, forumID, 0);

        forumModerators.ForumID    = forumID;
        forumModerators.IsLiveSite = false;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        int groupID = QueryHelper.GetInteger("objectid", 0);

        ForumContext.CheckSite(groupID, 0, 0);

        groupEdit.GroupID    = groupID;
        groupEdit.IsLiveSite = false;
    }
Exemple #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int forumID = QueryHelper.GetInteger("forumid", 0);

        ForumContext.CheckSite(0, forumID, 0);

        forumEdit.ForumID    = forumID;
        mForumId             = forumID;
        forumEdit.OnSaved   += new EventHandler(forumEdit_OnSaved);
        forumEdit.IsLiveSite = false;
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        groupId = QueryHelper.GetInteger("parentobjectid", 0);

        ForumContext.CheckSite(groupId, 0, 0);

        forumNew.GroupID    = groupId;
        forumNew.OnSaved   += new EventHandler(forumNew_OnSaved);
        forumNew.IsLiveSite = false;

        InitializeMasterPage();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Title = "Forums - Edit subscription";

        subscriptionId = QueryHelper.GetInteger("subscriptionid", 0);
        subscriptionEdit.SubscriptionID = subscriptionId;
        subscriptionEdit.OnSaved       += new EventHandler(subscriptionEdit_OnSaved);
        subscriptionEdit.IsLiveSite     = false;

        string currentForumSubscription            = "";
        ForumSubscriptionInfo forumSubscriptionObj = ForumSubscriptionInfoProvider.GetForumSubscriptionInfo(subscriptionId);

        // get forumSubscription id from querystring
        if (forumSubscriptionObj != null)
        {
            currentForumSubscription = HTMLHelper.HTMLEncode(forumSubscriptionObj.SubscriptionEmail);

            // Initialize breadcrumbs
            PageBreadcrumbs.Items.Add(new BreadcrumbItem()
            {
                Text        = GetString("ForumSubscription_Edit.ItemListLink"),
                RedirectUrl = ResolveUrl("~/CMSModules/Forums/Tools/Subscriptions/ForumSubscription_List.aspx?forumid=" + forumSubscriptionObj.SubscriptionForumID),
            });
            PageBreadcrumbs.Items.Add(new BreadcrumbItem()
            {
                Text = currentForumSubscription,
            });
        }
        else
        {
            forumId = QueryHelper.GetInteger("forumid", 0);
            if (forumId == 0)
            {
                return;
            }
            subscriptionEdit.ForumID = forumId;
            isNewItem = true;

            // Initialize breadcrumbs
            PageBreadcrumbs.Items.Add(new BreadcrumbItem()
            {
                Text        = GetString("ForumSubscription_Edit.ItemListLink"),
                RedirectUrl = ResolveUrl("~/CMSModules/Forums/Tools/Subscriptions/ForumSubscription_List.aspx?forumid=" + forumId),
            });
            PageBreadcrumbs.Items.Add(new BreadcrumbItem()
            {
                Text = GetString("ForumSubscription_Edit.NewItemCaption"),
            });
        }

        ForumContext.CheckSite(0, forumId, 0);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Title = "Forums - Edit subscription";

        subscriptionId = QueryHelper.GetInteger("subscriptionid", 0);
        this.subscriptionEdit.SubscriptionID = subscriptionId;
        this.subscriptionEdit.OnSaved       += new EventHandler(subscriptionEdit_OnSaved);
        this.subscriptionEdit.IsLiveSite     = false;

        string currentForumSubscription            = "";
        ForumSubscriptionInfo forumSubscriptionObj = ForumSubscriptionInfoProvider.GetForumSubscriptionInfo(subscriptionId);

        // get forumSubscription id from querystring
        if (forumSubscriptionObj != null)
        {
            currentForumSubscription = HTMLHelper.HTMLEncode(forumSubscriptionObj.SubscriptionEmail);

            // initializes page title control
            string[,] tabs = new string[2, 3];
            tabs[0, 0]     = GetString("ForumSubscription_Edit.ItemListLink");
            tabs[0, 1]     = "~/CMSModules/Forums/Tools/Subscriptions/ForumSubscription_List.aspx?forumid=" + forumSubscriptionObj.SubscriptionForumID;
            tabs[0, 2]     = "";
            tabs[1, 0]     = currentForumSubscription;
            tabs[1, 1]     = "";
            tabs[1, 2]     = "";

            this.CurrentMaster.Title.Breadcrumbs = tabs;
        }
        else
        {
            forumId = QueryHelper.GetInteger("forumid", 0);
            if (forumId == 0)
            {
                return;
            }
            this.subscriptionEdit.ForumID = forumId;
            this.isNewItem = true;

            // Initializes page title control
            string[,] tabs = new string[2, 3];
            tabs[0, 0]     = GetString("ForumSubscription_Edit.ItemListLink");
            tabs[0, 1]     = "~/CMSModules/Forums/Tools/Subscriptions/ForumSubscription_List.aspx?forumid=" + forumId.ToString();
            tabs[0, 2]     = "";
            tabs[1, 0]     = GetString("ForumSubscription_Edit.NewItemCaption");
            tabs[1, 1]     = "";
            tabs[1, 2]     = "";
            this.CurrentMaster.Title.Breadcrumbs = tabs;
        }

        ForumContext.CheckSite(0, forumId, 0);
    }
Exemple #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int forumID = QueryHelper.GetInteger("forumid", 0);

        ForumContext.CheckSite(0, forumID, 0);

        this.forumSecurity.ForumID      = forumID;
        this.forumSecurity.IsGroupForum = false;
        forumSecurity.IsLiveSite        = false;

        this.forumSecurity.OnCheckPermissions += new CMSAdminControl.CheckPermissionsEventHandler(forumSecurity_OnCheckPermissions);

        this.InitializeMasterPage();
    }
Exemple #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Title = "Forum - Group view";

        groupId = QueryHelper.GetInteger("objectid", 0);
        ForumContext.CheckSite(groupId, 0, 0);

        ForumGroupInfo group = ForumGroupInfoProvider.GetForumGroupInfo(groupId);

        if (group != null)
        {
            Forum1.GroupName = group.GroupName;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        int postId  = QueryHelper.GetInteger("postid", 0);
        int forumId = QueryHelper.GetInteger("forumid", 0);

        ForumContext.CheckSite(0, forumId, postId);

        if (postId > 0)
        {
            treeElem.Selected = postId;
        }

        ltlScript.Text  = "var selectedPostId = " + postId + ";";
        ltlScript.Text += "function ShowPost(showId){ selectedPostId = showId; \n if(showId==-1) {parent.frames['posts_edit'].location.href = 'ForumPost_View.aspx?forumid=' + " + forumId + ";} else {parent.frames['posts_edit'].location.href = 'ForumPost_View.aspx?postid=' + showId;}} \n";
        ltlScript.Text += "var currentNode = document.getElementById('treeSelectedNode');\n function SelectForumNode(nodeElem){\n if(currentNode != null)  { currentNode.className = 'ContentTreeItem'; } \n if ( nodeElem != null )\n { currentNode = nodeElem;  currentNode.className = 'ContentTreeSelectedItem'; } \n}";

        ltlScript.Text += @"
        // Display listing
        function Listing(postId) {
            if (postId == null) {
                parent.frames['posts_edit'].location.href = 'ForumPost_Listing.aspx?postid=0;" + forumId + @"';
            } else {
                parent.frames['posts_edit'].location.href = 'ForumPost_Listing.aspx?postid=' + postId;
            }
        }";


        ltlScript.Text += @"
        // Refresh tree and select post
        function RefreshTree(postId) {
            location.replace('ForumPost_Tree.aspx?postid=' + postId + '&forumid=" + forumId + @"');
        }";

        // Wrap with script tag
        ltlScript.Text = ScriptHelper.GetScript(ltlScript.Text);

        // "Click here for more" template
        treeElem.MaxTreeNodeText = "<span class=\"ContentTreeItem\" onclick=\"Listing(##PARENTNODEID##); return false;\"><span class=\"Name\">" + GetString("general.seelisting") + "</span></span>";

        treeElem.ForumID = forumId;

        // Setup the treeview
        treeElem.AdministrationMode = true;
        treeElem.SelectOnlyApproved = false;
        treeElem.UseMaxPostNodes    = true;
        treeElem.IsLiveSite         = false;

        treeElem.OnGetStatusIcons += treeElem_OnGetStatusIcons;
    }
Exemple #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int groupId = ValidationHelper.GetInteger(Request.QueryString["groupid"], 0);

        ForumContext.CheckSite(groupId, 0, 0);

        if (ValidationHelper.GetInteger(Request.QueryString["saved"], 0) > 0)
        {
            groupsContentUrl += groupId.ToString() + "&saved=1";
            groupsHeaderUrl  += groupId.ToString() + "&saved=1";
        }
        else
        {
            groupsContentUrl += groupId.ToString();
            groupsHeaderUrl  += groupId.ToString();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        postId = QueryHelper.GetInteger("postid", 0);
        ForumContext.CheckSite(0, 0, postId);
        CurrentMaster.PanelContent.CssClass = String.Empty;

        string listingPost = QueryHelper.GetString("listingpost", null);

        if (!String.IsNullOrEmpty(listingPost))
        {
            listingParameter = "&listingpost=" + HTMLHelper.HTMLEncode(listingPost);
        }

        postEdit.EditPostID = postId;

        postEdit.OnSaved   += postEdit_OnSaved;
        postEdit.IsLiveSite = false;
        InitializeMasterPage();
    }
Exemple #18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int forumId = ValidationHelper.GetInteger(Request.QueryString["forumid"], 0);

        ForumContext.CheckSite(0, forumId, 0);

        if (QueryHelper.GetInteger("saved", 0) > 0)
        {
            forumsContentUrl += forumId.ToString() + "&saved=1";
            forumsHeaderUrl  += forumId.ToString() + "&saved=1";
        }
        else
        {
            forumsContentUrl += forumId.ToString();
            forumsHeaderUrl  += forumId.ToString();
        }

        string changeMasterStr = "&changemaster=" + QueryHelper.GetInteger("changemaster", 0).ToString();

        forumsHeaderUrl  += changeMasterStr;
        forumsContentUrl += changeMasterStr;
    }
Exemple #19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int postID  = QueryHelper.GetInteger("postid", 0);
        int forumID = QueryHelper.GetInteger("forumId", 0);

        ForumContext.CheckSite(0, forumID, postID);

        this.postView.PostID      = postID;
        this.postView.Reply       = QueryHelper.GetInteger("reply", 0);
        this.postView.ForumID     = forumID;
        this.postView.ListingPost = QueryHelper.GetString("listingpost", String.Empty);
        this.postView.IsLiveSite  = false;

        // Register back to listing script
        if (!String.IsNullOrEmpty(this.postView.ListingPost))
        {
            ScriptHelper.RegisterClientScriptBlock(this, typeof(string), "BackToListing", ScriptHelper.GetScript(
                                                       "function BackToListing() { location.href = '" + ResolveUrl("~/CMSModules/Forums/Tools/Posts/ForumPost_Listing.aspx?postid=" + ScriptHelper.GetString(this.postView.ListingPost, false)) + "'; }\n"));
        }

        // Intialize master page
        InitializeMasterPage();
    }