Make status message admin-configurable
jbchristy - December 5, 2007 - 20:51
| Project: | User Comment |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
We would like the admin to be able to configure the status message that users see when they post a comment that requires approval prior to being published. It would be great if the admin had the option to enter PHP code to generate the status message, so we can, for example, generate different status messages for comments on different node types.

#1
A patch has been committed that allows the admin to configure the status messages displayed, both when a message is queued for approval, and when a message has been approved. Both messages allows either straight text (with a few variables) or PHP code.
The patch also included adding a couple of new API functions:
usercomment_requires_approval($nodetype, $u = -1)andusercomment_count_unapproved($nid).Finally,
usercomment_approve()now callscomment_save()instead of updating the DB directly. This means that hooks that may care about the change of state of a comment get called.#2
#3
Automatically closed -- issue fixed for two weeks with no activity.