Closed (won't fix)
Project:
Views Bulk Operations (VBO)
Version:
6.x-1.9
Component:
Actions
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
25 Aug 2009 at 16:43 UTC
Updated:
26 Oct 2010 at 14:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
infojunkieThanks 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.
Comment #2
mstef commentedAlright, thanks. I wouldn't really look at it as a new action. More like one that is missing which leads to poor usability.
Comment #3
hefox commentedIt'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
Comment #4
hefox commentedIf 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.
Comment #5
infojunkieThanks 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 :-)
Comment #6
infojunkieComment #7
mstef commentedThanks 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.
Comment #8
infojunkieComment #9
msoltan commentedThanks hefox for your contribution But I have a question where cai i add this Attachment? in module folder or or where?
Comment #10
slybud commentedHi everyone,
I think we all stumbled upon the same problem when creating a comment-VBO : drupal core only provides one poor action for comments !!!
As a real VBO fan, I've been using it on production sites for 1 year and it really rocks. So we ended writing our own comment (un-)publishing actions in a module.
So below is pasted the code used for this. I can make a patch but I don't know what to patch : not the code for sure, nor VBO for I don't want to mess this wonderful toy up ! So I'll let the maintainers decide where this piece of code belongs (if it does belong to some usefal place).
Let's say this code is included in mymodule.module
What this code does :
Let me know if you have any remarks/comments
Oh yes : this will not have been written without the huge help from @DeFr
Comment #11
Nick Robillard commented@slybud - Just tried your code. So far so good - works as expected. Thanks!
Comment #12
hefox commentedThe publish comment action is now in core d6 http://drupalcode.org/viewvc/drupal/drupal/modules/comment/comment.modul...
Comment #13
infojunkieWon't fix since the action is now in core. Thanks hefox for the heads up. Sorry slybud for the wasted effort!
Comment #14
slybud commented@hefox @hefox : no problem, no effort is wasted as long as it is for drupal's benefit.
Maybe I miss something but the diff tou mention in #12 is ok, but beware, both actions still don't update comment_statistics, which is uses in many cases to display the number of (published) comments for a node.
My sample code does that, that's why I pasted it
Regards
Comment #15
slybud commented@nick_robillard : u're welcome, if you find any bug let me know, as I use this code on heavy production sites ;-)