View Bulk Operations rocks my world

People have been talking about John Van Dyke's Actions module ever since I started up with Drupal, back in the 4.6 days. It is now baked into Drupal 6, and all this time I have been kind of wondering what the fuss was about. Now, with my discovery of "Views Bulk Operations": I finally have a reason to get excited about actions.

This fantastic module allows you to transform any view into a set of checkboxes which you can then perform actions on. Combine a couple exposed filters and some custom actions, and the possibilities are endless. The use case that got me going was moving a subset of taxonomy tags from an obsolete vocabulary to new one. In the past I would have written a custom script, but View Bulk Op did it out of the box. Later I decided I really wanted Node Reference instead of taxonomy tags, which finally gave me an excuse to write my first action. Node Reference Action was easy enough to throw together, and now I am moving node meta data back and forth at my whim :)

I haven't released the action yet as it still has some rough edges. If you are clamoring for such a thing, be sure to leave a comment.

There’s a VBO issue

There's a VBO issue that's waiting on something like this. Perhaps it could fold into Field Actions , as it already has a user reference action as well. What do you think Tao?

@Mitchell – I took a look

@Mitchell - I took a look at the issue, but I think that person wanted to be able to set each node to a different value. Thanks for pointing out Field Actions, that might be the right place for this...although I might start by putting an issue directly on VBO and see if kratib wants it. I have trouble imagining anyone using this action in any other context than VBO.

My imagination is limited at

My imagination is limited at the moment, but Rules is the first place I'd send it to come up with new use cases. It already has the ability to fill in CCK fields, but this might serve well in another scenario.

This would certainly be a

This would certainly be a good action to have available. I have a site that I want to upgrade to D6 when time permits and probably move some taxonomy terms to nodes.

Guidance or how for using VBO and actions

I am also trying to learn how to use actions with VBO.
And I also wanted to update a Node Reference for a set of nodes using VBO.

I read the 3rd chapter of "Pro Drupal Development 2nd ed" by John K. VanDyk and was using his article on "writing an action for Drupal 6" as another reference.

But I haven’t been able to put the pieces together.

I can't get any of the old examples from John K. VanDyk to work with VBO, I am not sure if the issue is with my VBO setting for my view or if I am missing something basic with actions when they are applied in mass node updates.

Since you have had some success, can you expand on this post, put a how-to, or point to additional code and articles on this topic.

Any help would be great.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.