Comment feature

One of the first features I envisioned when reconstructing The Dec Online in PHP/MySQL was the ability to comment on an article. For quite some time (at least since my tenure on the Dec staff, which only dates me to December 2006), there has been a “Comment on this article at www.millikin.edu/decaturian” tagline to each article in the print version, and it has not (in my tenure) been truly possible until now. (On the old system, even a broad comment form did not work because of a very funky [read: inefficient and inconvenient] form process.) So, with that goal, here’s what the comment feature consists of:

  • On article page:
    • A login system that allows readers to register (actually, this is a related feature integrated with comments)
    • Links at the bottom of each new article; comment screen opens in a Javascript pop-up window
    • Comment preview at the bottom of each article: if an article has no comments, only a link to comment; if 1-2 comments, anyone can view these comments at the bottom of the article and click on the link to comment; if more than 3, only the first 2 comments are visible, and all comments can be read on the comment screen
  • Comment display:
    • Comments display by earliest date first with any formatting specified in code
    • Comment shows username of poster and date/time of posting
    • If username is registered, the comment links to user’s info page
    • Comment time/date is a permalink to the comment for reference
    • Ability to edit comments up to an hour after submission (an “Edit comment” link appears if so)
    • If comment has been edited, an additional line appears displaying the edited date/time
  • Comment submission form:
    • If logged in, comment screen displays username
    • If not logged in, form includes additional fields for username (which cannot be the same as a registered user), E-mail (which is validated), and verification of number contained in image (to prevent spammers, which we did get before this verification step was implemented); also a link to login if desired
      [I should note that only registered users could initially comment because I wanted people to register so I could track usage. In retrospect, that was unnecessarily restrictive, which is why comments are open now.]
    • Limit of comment length to 500 characters; this option is aided by a Javascript counter that counts down the number of characters remaining
    • Ability to use certain HTML tags for formatting (all others are filtered out when the comment is submitted)
  • Comment submission:
    • All unregistered comments must be approved by admins
    • Admins and editors do not require any approval
    • Registered comments by “readers” (default user) must be approved unless two or more comments have already been approved
    • Comments are filtered for profanity; comments that do not pass the filter will not even be sent for moderation by admins
  • On main index (updated 12/8/07):
    • Display most commented articles from current issue
    • Display most recent comments on any article, regardless of issue date
  • Possible improvement:
    • Displaying portion of recent comments on main page with link to article

Any suggestions for improvements or additional options can be left in the comments or sent to webmaster@thedeconline.com.

4 comments ↓

#1 Daniel R. on 12.14.07 at 1:17 am

Love the comments feature, but I don’t love that the HTML code is included in your character count. Any way to fix this? Probably not, but I thought I’d bug you.

DTR

#2 Galen Broaddus on 12.14.07 at 9:24 am

Doubtful; I don’t know of any way to get JS to ignore HTML tags. I could always boost the character count from 500 to 750 or something like that, but I haven’t seen a need thus far.

#3 Galen Broaddus on 12.14.07 at 2:59 pm

Actually, after reviewing the JS, there’s pretty much no way I can do that without entirely rewriting the script (and then it might not serve its original purpose). The script functions by keystrokes, not by characters, so there’s no way for it to discriminate between HTML tags (or any strings, really) and regular characters. But if it becomes a problem, I’ll bump up the allotment - just for you, DTR.

#4 Daniel R. on 12.19.07 at 2:45 am

Sad day, but understandable.

Good to know that I have friends in high places. That allotment request may come sooner than you expect.

^_^

DTR

Leave a Comment