This project is read-only.

Removing "Comments are closed"

Topics: ASP.NET 2.0, Business Logic Layer
Aug 5, 2008 at 3:05 PM
Hi.  I am new to blogengine (as well as ASP really) and am wanting to use it for something other than a typical blog - I'm planning on using it for an easy way for people who aren't html literate to post announcements and happenings at my church.  As such, I am going to disable all comments.  Is there a way to not have the text "Comments are closed" at the end of each post whose comments are disabled?  I've looked through the XML files and various screens, but can't find anything.  Google isn't of any help because there are a gazillion webpages that contain the text Comments are Closed.  TIA
Aug 5, 2008 at 10:11 PM
Edited Aug 5, 2008 at 10:13 PM
Remove the following lines:

From User Controls/CommentView.ascx:
<asp:label runat="server" id="lbCommentsDisabled" visible="false"><%=Resources.labels.commentsAreClosed %></asp:label>

From User Controls/CommentView.ascx.cs:

      if (BlogSettings.Instance.IsCommentsEnabled)
if (!Post.IsCommentsEnabled || (BlogSettings.Instance.DaysCommentsAreEnabled > 0 &&
Post.DateCreated.AddDays(BlogSettings.Instance.DaysCommentsAreEnabled) < DateTime.Now.Date))
phAddComment.Visible = false;
lbCommentsDisabled.Visible = true;

hfCaptcha.Value = Guid.NewGuid().ToString();
phAddComment.Visible = false;
Aug 6, 2008 at 2:44 PM