/// <summary> /// Loads the Blog. /// </summary> /// <param name="f_id">The f_id.</param> /// <param name="f_categoryName">Name of the f_category.</param> /// <param name="f_publicCategory">if set to <c>true</c> [f_public category].</param> /// <param name="f_author">The f_author.</param> /// <param name="f_showInTicker">if set to <c>true</c> [f_show in ticker].</param> /// <param name="f_blogPage">The f_blog page.</param> /// <param name="site">The site.</param> private void LoadBlog(Guid f_id, string f_categoryName, bool f_publicCategory, int f_author, bool f_showInTicker, string f_blogPage, Site site) { Id = f_id; CategoryName = f_categoryName; PublicCategory = f_publicCategory; AuthorId = f_author; Author = Commerce.User.All.Find(delegate(Commerce.User u) { return u.UserId == f_author; }); if(Author == null) { Author = site.NullUser; } ShowInTicker = f_showInTicker; BlogPage = f_blogPage; }
/// <summary> /// Initializes a new instance of the <see cref="BlogEntry"/> class. /// </summary> /// <param name="f_id">The f_id.</param> /// <param name="f_subject">The f_subject.</param> /// <param name="f_message">The f_message.</param> /// <param name="f_comments">The f_comments.</param> /// <param name="f_tags">The f_tags.</param> /// <param name="f_editor">The f_editor.</param> /// <param name="f_author">The f_author.</param> /// <param name="f_addDate">The f_add date.</param> /// <param name="f_dateChanged">The f_date changed.</param> /// <param name="f_lastEditor">The f_last editor.</param> /// <param name="f_annotations">The f_annotations.</param> /// <param name="f_enabled">if set to <c>true</c> [f_enabled].</param> /// <param name="f_auditComments">if set to <c>true</c> [f_audit comments].</param> /// <param name="f_allowComments">if set to <c>true</c> [f_allow comments].</param> /// <param name="f_emailUpdates">if set to <c>true</c> [f_email updates].</param> /// <param name="f_blogImage">The f_blog image.</param> /// <param name="f_publicBlog">if set to <c>true</c> [f_public Blog].</param> /// <param name="f_listOrder">The f_list order.</param> /// <param name="f_archive">if set to <c>true</c> [f_archive].</param> /// <param name="f_galleryId">The f_gallery id.</param> /// <param name="_blog">The _blog.</param> /// <param name="site">The site.</param> public BlogEntry(Guid f_id, string f_subject, string f_message, string f_comments, string f_tags, int f_editor, int f_author, DateTime f_addDate, DateTime f_dateChanged, int f_lastEditor, string f_annotations, bool f_enabled, bool f_auditComments, bool f_allowComments, bool f_emailUpdates, string f_blogImage, bool f_publicBlog, int f_listOrder, bool f_archive, Guid f_galleryId, Blog _blog, Site site) { Id = f_id; Subject = f_subject.Trim(); Message = f_message; Comments = f_comments; Tags = f_tags.Trim(); EditorId = f_editor; AuthorId = f_author; AddDate = f_addDate; DateChanged = f_dateChanged; LastEditor = f_lastEditor; Annotations = f_annotations; Enabled = f_enabled; AuditComments = f_auditComments; AllowComments = f_allowComments; EmailUpdates = f_emailUpdates; BlogImage = f_blogImage; PublicBlog = f_publicBlog; ListOrder = f_listOrder; Archive = f_archive; Blog = _blog; GalleryId = f_galleryId; Gallery = BlogPlugin.Galleries.List.Find(delegate(Gallery gal) { return gal.Id == GalleryId; }); Replies = Commerce.Reply.All.FindAll(delegate(Rendition.Commerce.Reply reply) { return (reply.ParentId == f_id) && ((reply.FlaggedInappropriate < site.inappropriateHideThreshold) || reply.FlaggedOk); }); Author = Commerce.User.All.Find(delegate(Commerce.User u) { return u.UserId == f_author; }); Editor = Commerce.User.All.Find(delegate(Commerce.User u) { return u.UserId == f_editor; }); Introduction = Message; if(Message.Contains("<h6")) { HasIntroduction = true; string i = Message.Substring(0, Message.IndexOf("<h6") - 4); i = Regex.Replace(i, "(<h6>)|(</h6>)", "", RegexOptions.IgnoreCase); Introduction = i; Message = Regex.Replace(Message, "(<h6>)|(</h6>)", "", RegexOptions.IgnoreCase); } }
/// <summary> /// Initializes a new instance of the <see cref="ConversationMessage"/> class. /// </summary> /// <param name="_message">The _message.</param> /// <param name="_user">The _user.</param> public ConversationMessage( string _message, Commerce.User _user ) { Message = _message; User = _user; }