I don't know about everyone else, but with ongoing comment and trackback spam I'm pretty sick of manually ticking all checkboxes when publishing/unpublishing/deleting/marking as spam a series of comment and trackback posts. There are days when I get hundreds of spam comments and I then have to manually tick each one in the listing and select 'unpublish all'/'delete all' etc.

So, here's a quick'n'dirty implementation of a 'select all' checkbox at the bottom of each listing (comments/trackbacks/approval queue/spam); when ticked, the checkbox executes a quick javascript that selects/unselects all the checkboxes above. I'm sure there's a much better coded way of implementing this in Drupal, but perhaps someone else would like to improve on what I have here.

Please note that this javascript is based on a similar script by Shawn Olson at http://www.shawnolson.net, updating the script to work with a wider range of HTML forms. The original script is located at http://www.shawnolson.net/scripts/public_smo_scripts.js.

I'm attaching modified versions of comments.module, trackback.module, and spam.module here (the latter two in separate comments), to implement a 'select all' checkbox in all three listings. Note that they also include the patch which adds multiselect capability to some of the listings in the first place.

Hope this is useful for people.

Axel Bruns (snurb.info)

CommentFileSizeAuthor
#2 spam.module85.47 KBSnurb
#1 trackback_0.module47.58 KBSnurb
comment_0.module77.37 KBSnurb

Comments

Snurb’s picture

StatusFileSize
new47.58 KB

Here's the 'select all' function for trackback.module...

Axel Bruns (snurb.info)

Snurb’s picture

StatusFileSize
new85.47 KB

...and for spam.module.

Axel Bruns (snurb.info)

magico’s picture

Status: Active » Closed (fixed)