private static CommentStub CreateCommentStub(Comment comment, ThreadUsr threadUsr, GroupUsr groupUsr) { CommentStub c = new CommentStub() { k = comment.K, html = comment.GetHtml(null), script = comment.Script, usrName = comment.Usr.Name, usrPicSrc = comment.Usr.AnyPicPath, usrRollover = comment.Usr.RolloverMouseOverTextNoPic, usrUrl = comment.Usr.Url(), usrK = comment.Usr.K, isNew = comment.GetIsNew(threadUsr), friendlyTimeNoCaps = comment.FriendlyTimeNoCaps, editLinkVisible = Usr.Current != null && (comment.UsrK == Usr.Current.K || Usr.Current.IsAdmin), editedHtml = comment.EditedHtml, deleteLinkVisible = Usr.Current != null && Usr.Current.CanDelete(comment), deleteLinkOnClickConfirmText = Usr.Current == null ? "" : (groupUsr != null && groupUsr.Moderator) ? "You are using your group moderator power to delete this comment.\n\nAre you sure?" : (comment.UsrK != Usr.Current.K) ? "You are using your moderator power to delete this comment.\n\nAre you sure?" : "Are you sure?", threadK = comment.ThreadK }; c.lolHtml = comment.LolUsrListHtml(out c.haveAlreadyLold, Usr.Current != null ? Usr.Current.K : -1); return c; }
public string LolAtComment(int commentK) { if (Usr.Current != null) { Comment c = new Comment(commentK); Lol.CreateLol(c); bool me; return c.LolUsrListHtml(out me, Usr.Current.K); } // if nothing, don't change return ""; }