protected override void PageLoad() { Guid?userId = null; if (!String.IsNullOrEmpty(UserID)) { userId = Guid.NewGuid(); try { userId = new Guid(UserID); } catch { } } var postsQuery = new PostsQuery(); mainContainer.BreadCrumbs.Add(new BreadCrumb { Caption = BlogsResource.AddonName, NavigationUrl = VirtualPathUtility.ToAbsolute(ASC.Blogs.Core.Constants.BaseVirtualPath) }); if (userId.HasValue) { mainContainer.BreadCrumbs.Add(new BreadCrumb { Caption = DisplayUserSettings.GetFullUserName(userId.Value, false) }); postsQuery.SetUser(userId.Value); } else if (!String.IsNullOrEmpty(TagName)) { mainContainer.BreadCrumbs.Add(new BreadCrumb { Caption = HeaderStringHelper.GetHTMLSearchHeader(TagName) }); postsQuery.SetTag(TagName); } else if (!String.IsNullOrEmpty(Search)) { mainContainer.BreadCrumbs.Add(new BreadCrumb { Caption = HeaderStringHelper.GetHTMLSearchHeader(Search) }); postsQuery.SetSearch(Search); } if (!IsPostBack) { var engine = BasePage.GetEngine(); FillPosts(postsQuery, engine); InitSidePanel(engine, TagCloud); sideRecentActivity.TenantId = TenantProvider.CurrentTenantID; sideRecentActivity.ProductId = Product.CommunityProduct.ID; sideRecentActivity.ModuleId = ASC.Blogs.Core.Constants.ModuleID; base.InitSubscribers(actions); } this.Title = HeaderStringHelper.GetPageTitle(BlogsResource.AddonName, mainContainer.BreadCrumbs); }
protected override void PageLoad() { PostsAndCommentsCount = new List <Tuple <Post, int> >(); BlogsPageSize = string.IsNullOrEmpty(Request["size"]) ? 20 : Convert.ToInt32(Request["size"]); Guid?userId = null; if (!String.IsNullOrEmpty(UserID)) { userId = Guid.NewGuid(); try { userId = new Guid(UserID); } catch { } } var postsQuery = new PostsQuery(); if (userId.HasValue) { postsQuery.SetUser(userId.Value); } else if (!String.IsNullOrEmpty(TagName)) { postsQuery.SetTag(TagName); } else if (!String.IsNullOrEmpty(Search)) { postsQuery.SetSearch(Search); } if (!IsPostBack) { var engine = GetEngine(); FillPosts(postsQuery, engine); } Title = HeaderStringHelper.GetPageTitle(BlogsResource.AddonName); var jsResource = new StringBuilder(); jsResource.Append(String.Format("ASC.Community.BlogsJSResource = {{}};ASC.Community.BlogsJSResource.ReadMoreLink = \"{0}\";", BlogsResource.ReadMoreLink)); jsResource.Append("jq('#tableForNavigation select').val(" + BlogsPageSize + ").change(function(evt) {changeBlogsCountOfRows(this.value);}).tlCombobox();"); Page.RegisterInlineScript(jsResource.ToString(), true); }
protected override void PageLoad() { BlogsPageSize = string.IsNullOrEmpty(Request["size"]) ? 20 : Convert.ToInt32(Request["size"]); Guid? userId = null; if (!String.IsNullOrEmpty(UserID)) { userId = Guid.NewGuid(); try { userId = new Guid(UserID); } catch { } } var postsQuery = new PostsQuery(); if (userId.HasValue) { postsQuery.SetUser(userId.Value); } else if (!String.IsNullOrEmpty(TagName)) { postsQuery.SetTag(TagName); } else if (!String.IsNullOrEmpty(Search)) { postsQuery.SetSearch(Search); } if (!IsPostBack) { var engine = GetEngine(); FillPosts(postsQuery, engine); } Title = HeaderStringHelper.GetPageTitle(mainContainer.CurrentPageCaption ?? BlogsResource.AddonName); var jsResource = new StringBuilder(); jsResource.Append(String.Format("ASC.Community.BlogsJSResource = {{}};ASC.Community.BlogsJSResource.ReadMoreLink = \"{0}\";", BlogsResource.ReadMoreLink)); jsResource.Append("jq('#tableForNavigation select').val(" + BlogsPageSize + ").change(function(evt) {changeBlogsCountOfRows(this.value);}).tlCombobox();"); Page.RegisterInlineScript(jsResource.ToString(), true); }
protected override void PageLoad() { Guid? userId = null; if (!String.IsNullOrEmpty(UserID)) { userId = Guid.NewGuid(); try { userId = new Guid(UserID); } catch { } } var postsQuery = new PostsQuery(); mainContainer.BreadCrumbs.Add(new BreadCrumb {Caption = BlogsResource.AddonName, NavigationUrl = VirtualPathUtility.ToAbsolute(ASC.Blogs.Core.Constants.BaseVirtualPath)}); if (userId.HasValue) { mainContainer.BreadCrumbs.Add(new BreadCrumb {Caption = DisplayUserSettings.GetFullUserName(userId.Value, false)}); postsQuery.SetUser(userId.Value); } else if (!String.IsNullOrEmpty(TagName)) { mainContainer.BreadCrumbs.Add(new BreadCrumb { Caption = HeaderStringHelper.GetHTMLSearchHeader(TagName) }); postsQuery.SetTag(TagName); } else if (!String.IsNullOrEmpty(Search)) { mainContainer.BreadCrumbs.Add(new BreadCrumb {Caption = HeaderStringHelper.GetHTMLSearchHeader(Search)}); postsQuery.SetSearch(Search); } if (!IsPostBack) { var engine = BasePage.GetEngine(); FillPosts(postsQuery, engine); InitSidePanel(engine, TagCloud); sideRecentActivity.TenantId = TenantProvider.CurrentTenantID; sideRecentActivity.ProductId = Product.CommunityProduct.ID; sideRecentActivity.ModuleId = ASC.Blogs.Core.Constants.ModuleID; base.InitSubscribers(actions); } this.Title = HeaderStringHelper.GetPageTitle(BlogsResource.AddonName, mainContainer.BreadCrumbs); }