5 Days of Mura Plugins: Day 5 - Threaded Comments
It's our final day, and admittedly a bit off-topic. Instead of strictly building a plugin, we are going to tackle Comments directly on the Mura core. We're going to add threading to the comments, an inline comment editor, and a few other tweaks. We're also going to work on a 'companion' plugin for comments, but that will probably stretch out past today.
Goals
Originally I wanted to develop threaded comments as a separate plugin, but after examining what what was already in the Mura base and chatting with Matt at Blue River Interactive, I realized that would just be way too much duplication of work. Instead, we'll be modifying the display templates and perhaps a bit of the core API to add the functionality, as well as seeing how much work there will be rounding out the general top-level functionality (Class Extensions, Feeds, etc.) The primary goals, however, are:
- Threaded Comments: comments can be directly responded to, and will visually nest below their parents
- Inline Comment Editor: instead of having to scroll to the bottom, clicking 'respond' on a comment will put the comment form directly below the comment being replied to
Comments Plus
A companion plugin we'll be developing (though probably not releasing until the actual Mura core is updated) called Comments Plus will include a couple of handy commenting features:
- Comment Browser: this will be a filterable/sortable/paged comment browser. For instance, "display all comments between dates X and Y by user 'Smith', ordered by the date they were added". It will also be possible to moderate a comment directly from the browser.
- Subscribe: this will let people subscribe to any page without having to comment upon it
- Flag Abuse: this will add a 'mark as abuse' box to all comments, with the appropriate email notification and notice in the comment browser
[update: 4:29 PM 14/02/2011]
Well, nested comments and an inline comment form are complete. In fact, it's been done about three times now in various ways (the hardest part of working with somebody else's code is trying to do things they way you think they would do them). The great things is there was only the smallest change to the core API (which technically wasn't even necessary, but should boost the performance of the change). I've passed the code over to BRI so they can see just how badly I've broken things and hopefully it (or a variation of) will get pushed into the core sometime soon.
I'll be doing a follow-up blog tomorrow, discussing things we encountered over our 5-day session, and a bit of a roadmap on where some of the plugins it produced will likely lead.
Comments
- Malcolm O'Keeffe
-
Grant, this is great. Your first 4 plugins were great, but this one takes the cake!
Looking forward to seeing this in action. Thanks for your awesome support of Mura CMS - we owe you a beer (or two)!
- February 14, 2011, 12:09 PM
- Seb Duggan
-
Great stuff, Grant! I look forward to seeing the result.
Should make Mura a more attractive solution for blogs as well as general CMS...
- February 14, 2011, 12:37 PM
- Jonas Eriksson
-
Many thanks Greg & MURA team - sounds like a great addition to MURA for community sites!
- March 16, 2011, 4:24 AM