[eluser]Jelmer[/eluser]
I've been following this topic with great intrest since I've been thinking about a forum myself and also about writing a comments module for my blog. I've finally come to the conclusion that it should be very easy to write a comments library that can both handle the blog and be the basis for a forum. I intend to create something very generic and I'll announce it in its own once I've got somethig decent put together.
For now, my notes might add something to the discussion:
Functionality
Generic auth intergration through config file
IP Logging for guests
Bans for users & IP's
Setting for minimal time between comments by usergroup (default: guests & logged_in)
Captcha for guests (reCaptcha optional)
Intergrated caching (MP_Cache)
Thumbs up/down
Email confirmation for guest posts
Comments config
Settings for: cache, allowing guests, bans, minimal time between comments, thumbs up/down, allowing title
Protection settings (Captcha, CSRF, CSS)
Function that wraps the logged_in() function of any auth lib
Allowed tags
Comments library
Wraps all the important functions from model(s), which shouldn't be accessed directly
Autoloads any necessary files
CSRF & CSS protection
Both front-end & administrative functions
Comments model
Functions for CRUD
Specific listing functions
Validation rules & additional validational functions
Comments views
Minimal views to illustrate the functionality
Comments database table
id (int, auto_increment)
belongs_to (varchar(255), not null)
free field for linking your own pages to comments
published (set('yes', 'moderate', 'spam', 'no'), not null)
user (varchar(255), null)
null = guest
emailaddress (varchar(255), null)
required for guests
website (varchar(255), null)
optional for guests
date (varchar(25), not null)
UNIX timestamp
last_edit (varchar(25), null)
UNIX timestamp
title (varchar(255), null)
optional
contents (text, not null)
free text
email_notification (boolean, false)
smileys (boolean, false)