[drupal-devel] [feature] Comment approval queue a pain to use

moshe weitzman drupal-devel at drupal.org
Thu Sep 15 03:28:52 UTC 2005


Issue status update for 
http://drupal.org/node/28595
Post a follow up: 
http://drupal.org/project/comments/add/28595

 Project:      Drupal
 Version:      cvs
 Component:    comment.module
 Category:     feature requests
 Priority:     normal
 Assigned to:  mrowe
 Reported by:  robertDouglass
 Updated by:   moshe weitzman
 Status:       patch (code needs review)

minor nits: 


we use an extra line in our else clauses. this should be two lines:
 } else {


also, you can almost always avoid using db_escape_string() directly.
you will need to do a str_repeat('%d, ', count($unpublish)) in the
SQL(for unpublish query) and then pass a an array as the last argument
to db_query. This is the seldom used 'pass all values in an array'
feature of db_query: http://drupaldocs.org/api/head/function/db_query




moshe weitzman



Previous comments:
------------------------------------------------------------------------

Wed, 10 Aug 2005 08:29:14 +0000 : robertDouglass

When using the comment approval queue the workflow for approving
comments is awful. You have to click administer->comments->approval
queue to get a list of comments awaiting approval. Then you have to
click edit on one of the comments, click the collabsible field-set for
the publishing controls, click to published and save the comment. Then
repeat the process for the next comment. 


I'd say that this workflow is a significant deterrent to anyone using
this functionality.


To make it better, there would be checkboxes next to each comment in
the table on the approval queue page, and a set of operators analogous
to the content overview page. Better yet would be if each comment in
the table was an AJAX link to the comment's body and info which would
expand right there in the table itself, since it is usually impossible
just from the comment title to know whether to publish or not. If one
could click the various comments open, right there in the table, then
mass publish or delete, we'd have a real approval queue. Perhaps the
spam module could tie into the actions that can be taken on comments so
a mass "mark as spam" could be done too.




------------------------------------------------------------------------

Wed, 14 Sep 2005 13:32:47 +0000 : mrowe

Attachment: http://drupal.org/files/issues/comment_bulk_approval.patch (2.24 KB)

Here's a patch (against HEAD) that gives you the cheap-and-dirty
approach (checkboxes that allow bulk approval/unapproval of comments).


I'll leave the gold-plated AJAX solution to someone with more time. :)




------------------------------------------------------------------------

Wed, 14 Sep 2005 21:17:21 +0000 : Dries

- Don't use tabs.
- SQL queries might be vularnable to SQL injection attacks.  Use
db_query()'s %s and %d directives.




------------------------------------------------------------------------

Thu, 15 Sep 2005 02:24:17 +0000 : mrowe

Attachment: http://drupal.org/files/issues/comment_bulk_approval_0.patch (2.38 KB)

Ok, I think I got rid of all the tabs this time...


I've had to use db_escape_string, rather than the sprintf params to
db_query, but it should have the same effect.







More information about the drupal-devel mailing list