I’m trying to create a comment widget unified with an application component to handle receiving comments posted and storing these in the database. The idea is to make a completely modular comment system, one that can be added with minimal site changes.
My basic idea is to extend CListView, adding a renderForm function, and to implement IApplicationComponent. I’d need to change the init function of CListView to change its behavior depending on if it’s called as a component or as a widget, but I think it’s doable.
My question is, is there a better way to do this? I have a number of tasks I was thinking about creating these for, newsletter signup, contact forms, and so on.