I have application like forum, registered users can post questions to this forum, and registered users can reply to any questions. The states of question are – Open- post a question
Active- Get a reply for posted question
Closed-
if any user posted answer to a particular question, send a mail to the user who posted that question.
I have no experience in this field. but if searching on http://www.yiiframework.com/extensions/ with ‘mybb’ an ‘phpbb’ words maybe found a few extension for it.
Your question suggests the ‘work-flow.’ This sounds like the blog demo with a slight modification.
Question Active: In ‘comment’ model ‘insert’ check the status in actionCreate(). If active, insert into model and send email (see ContactForm in standard skeleton app).
Question Closed: Don’t show the reply form.
I would do the closed check in actionCreate, and notify user that question is closed via setFlash incase they somehow got there without the form.