public UploadForm(Core core, PPage page) { this.core = core; this.page = page; this.db = core.Db; this.template = core.Template; this.Owner = page.Owner; this.LoggedInMember = core.Session.LoggedInMember; }
public ShowPPageEventArgs(PPage page) : base(page) { }
public ShowPPageEventArgs(PPage page, string slug) : base(page) { this.itemSlug = slug; }
public ShowPPageEventArgs(PPage page, long itemId) : base(page) { this.itemId = itemId; }
public PostForm(Core core, PPage page) { this.core = core; this.page = page; }
public static void Show(Core core, PPage page) { page.Template.SetTemplate("Musician", "viewtours"); if (!(page is MPage)) { core.Functions.Generate404(); return; } List<Tour> tours = Tour.GetAll(core, (Musician)page.Owner); foreach (Tour tour in tours) { VariableCollection tourVariableCollection = core.Template.CreateChild("tour_list"); tourVariableCollection.Parse("ID", tour.Id.ToString()); tourVariableCollection.Parse("TITLE", tour.Title); tourVariableCollection.Parse("YEAR", tour.StartYear.ToString()); tourVariableCollection.Parse("U_TOUR", tour.Uri); } List<string[]> tourPath = new List<string[]>(); tourPath.Add(new string[] { "tours", "Tours" }); page.Owner.ParseBreadCrumbs(tourPath); }
public static void Show(Core core, PPage page, long tourId) { page.Template.SetTemplate("Musician", "viewtour"); Tour tour = null; try { tour = new Tour(core, (Musician)page.Owner, tourId); } catch (InvalidTourException) { core.Functions.Generate404(); return; } core.Template.Parse("TOUR_TITLE", tour.Title); core.Template.Parse("TOUR_YEAR", tour.StartYear.ToString()); core.Template.Parse("U_TOUR", tour.Uri); core.Display.ParseBbcode("TOUR_ABSTRACT", tour.TourAbstract); List<Gig> gigs = tour.GetGigs(); foreach (Gig gig in gigs) { VariableCollection gigVariableCollection = core.Template.CreateChild("gig_list"); gigVariableCollection.Parse("ID", gig.Id.ToString()); gigVariableCollection.Parse("U_GIG", gig.Uri); gigVariableCollection.Parse("DESCRIPTION", gig.Abstract); gigVariableCollection.Parse("CITY", gig.City); gigVariableCollection.Parse("VENUE", gig.Venue); gigVariableCollection.Parse("DATE", core.Tz.DateTimeToDateString(gig.GetTime(core.Tz))); gigVariableCollection.Parse("COMMENTS", core.Functions.LargeIntegerToString(gig.Comments)); } List<string[]> tourPath = new List<string[]>(); tourPath.Add(new string[] { "tours", "Tours" }); tourPath.Add(new string[] { tour.Id.ToString(), tour.Title }); page.Owner.ParseBreadCrumbs(tourPath); }
public ShowBlogEventArgs(PPage page, long itemId) : base(page, itemId) { this.display = BlogDisplayType.Post; }
public static void ShowForumHeader(Core core, PPage page) { core.Template.Parse("U_FORUM_INDEX", core.Hyperlink.AppendSid(string.Format("{0}forum", page.Owner.UriStub))); core.Template.Parse("U_UCP", core.Hyperlink.AppendSid(string.Format("{0}forum/ucp", page.Owner.UriStub))); core.Template.Parse("U_MEMBERS", core.Hyperlink.AppendSid(string.Format("{0}forum/memberlist", page.Owner.UriStub))); if (page is GPage) { if (core.Session.IsLoggedIn && ((GPage)page).Group.IsGroupMember(core.Session.LoggedInMember.ItemKey)) { core.Template.Parse("IS_FORUM_MEMBER", "TRUE"); } else { core.Template.Parse("IS_FORUM_MEMBER", "FALSE"); } } core.Template.Parse("U_FAQ", core.Hyperlink.AppendSid(string.Format("{0}forum/help", page.Owner.UriStub))); }
public ShowBlogEventArgs(PPage page, short year, short month) : base(page) { this.year = year; this.month = month; this.display = BlogDisplayType.Month; }
public ShowBlogEventArgs(PPage page, short year) : base(page) { this.year = year; this.display = BlogDisplayType.Year; }
public ShowBlogEventArgs(PPage page, BlogDisplayType display, string key) : base(page) { if (display == BlogDisplayType.Category) { this.category = key; } else if (display == BlogDisplayType.Tag) { this.tag = key; } this.display = display; }
public ShowBlogEventArgs(PPage page) : base(page) { this.display = BlogDisplayType.All; }
private static void Save(Core core, PPage page) { AccountSubModule.AuthoriseRequestSid(core); if (core.Session.IsLoggedIn && core.Session.LoggedInMember != null) { ForumMember member = null; try { member = new ForumMember(core, page.Owner, core.Session.LoggedInMember); } catch (InvalidForumMemberException) { member = ForumMember.Create(core, page.Owner, core.Session.LoggedInMember, false); } member.ForumSignature = core.Http.Form["signature"]; member.Update(typeof(ForumMember)); core.Display.ShowMessage("Profile Updated", "Your forum profile has been saved in the database."); core.Template.Parse("REDIRECT_URI", core.Hyperlink.AppendSid(string.Format("{0}forum/ucp", page.Owner.UriStub))); } }