This week I've been working on revising the Midgard discussion forum component to a usable shape. While the old version was OK when dynamically loaded as a comment system for blog postings or photos, it lacked the functionalities needed to make it a real forum.
Main work with this new version was to port the forum to utilize datamanager, MidCOM's data abstraction layer. This enables usage of the communityhtml data type for bbCode support, and makes it possible for the site administrators to add new data fields for comments and threads using a simple configuration format. The complete output of the component can be modified using MidCOM's templating model. The default output templates now provide many hooks for styling via CSS.
In addition to datamanager support, several other features were added:
- Moderators and administrators can now delete posts
- Threads are now shown together with posts in the "latest" view
- Threads have nicer, title-based URL names
- Thread list is now split to subpages, with configurable number of threads per page
- Threads are not listed in site navigation by default
- Subthread support has been removed for better clarity, performance and phpBB compatibility
This new and more usable version of the net.nemein.discussion component is available in MidCOM CVS. However, many more improvements are being worked on.
Tier 1: Better discussion board
- "Notify me of new messages in this thread" subscription system instead of sending new comments to thread author
- Native anonymous posting support similar to the Midgard Wiki
- Datamanager-based configuration UI
Tier 2: External interfaces
- RSS 2.0 output (both all latest comments and per-thread)
- wfw:comments API support
- Gravatar support
- phpBB import and migration tool
- Easier addition of comments support for blogs powered by de.linkm.newsticker
- Skipping MidCOM cache engine in midcom-template when a comment is submitted
Tier 3: Better user experience
- User registration and avatar handling with the net.nemein.personnel component
- Caching number of posts per username
- IP, domain and username blacklisting support
- Providing thread moderation tools
- Allowing thread editing and deleting only for the poster, not all owners
Most of this work will be financed by two of our clients, an ISP and a radio station. I will implement tier 1 and some tier 2 features soon myself, and the rest will wait until Torben gets enough time from his work on Midgard's new integrated search engine.
Now the discussion forum is only 1843 lines of code including layout templates. The reason why it was rewritten only now is that I was unnecessarily intimidated by datamanager's creation mode. However, after a bit of thought it proved to be a surprisingly simple API to work with.
This blog post has been written in Pullman Bar powered by Velkopopovický Kozel and Cohiba Siglo III. Next on the agenda is the radio technology lecture of the PPL(A) course.