Only Unpublish Comment Option Available - No Publish?

mikestefff - August 25, 2009 - 16:43
Project:Views Bulk Operations (VBO)
Version:6.x-1.7
Component:Actions
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

As the title says, there is only the option to unpublish comments, not publish them, which could get annoying after unpublishing a bunch of comments. Content views have both options.

#1

kratib - August 25, 2009 - 23:29

Thanks for your suggestion. In general, I tend to focus more on enhancing the core VBO, rather than writing new actions. I'll keep this open if someone else wants to pick it up or when I have some time.

#2

mikestefff - August 26, 2009 - 04:46

Alright, thanks. I wouldn't really look at it as a new action. More like one that is missing which leads to poor usability.

#3

hefox - September 28, 2009 - 17:21

It's core drupal missing this action, not VBO. VBO does not provide (most of?) the actions I believe.

http://api.drupal.org/api/function/comment_action_info/6

(I was wondering the same).

It's easy enough to make an action, check out info about hook_action_info http://api.drupal.org/api/function/hook_action_info/6

#4

hefox - September 29, 2009 - 03:19

If you still need it attached is a really small module (NOT patch) that provides
1) the 'missing' publish action
2) view field publish comment link
3) view field unpublish comment link

Please note that I spent at most an hour making this from scratch and testing, so there may be a bug or three.
I haven't gotten the ...courage? to apply for a cvs account yet, so yeah no issue queue for this, but if there are bugs to the attached module, please private chat or otherwise contact me so not to litter this queue (on the topic of vbo issue.. any updates any allowing non numeric keys? /on the chance the maintainer reads this). Now if you'll excuse me, my cat is yelling at me.

AttachmentSize
commentextra.tgz 1.63 KB

#5

kratib - September 29, 2009 - 07:37

Thanks hefox for your contribution. I'll review the code and add the actions to the VBO package.

Also, you shamed me into fixing the non-numeric keys issue :-)

#6

kratib - September 29, 2009 - 07:37
Status:active» needs review

#7

mikestefff - September 29, 2009 - 16:37

Thanks for the contribution. I wish I had time to review and help, but I don't. Please update this thread once the code has been reviewed.

#8

kratib - October 3, 2009 - 20:21
Component:Code» Actions
 
 

Drupal is a registered trademark of Dries Buytaert.