Pour toutes questions sur nos formations Drupal, n'hésitez pas à nous contacter.
This module augments Views by allowing bulk operations to be executed on the nodes displayed by a view. It does so by showing a checkbox in front of each node, and adding a select box containing operations that can be applied on the selected nodes.
Thank you all for your generous support.
If you feel this module is useful to your business, please consider the following:
Thanks!
The module works by exposing a new Views 2 Style plugin called "Bulk Operations". The settings for this plugin allow to choose the operations that should appear on the view. Operations are gathered from two sources: 1) Action API 2) hook_node_operations and hook_user_operations. The module also allows to use Batch API or the Job queue module to process the selected nodes, in order to avoid timeouts.
VBO can support all object types supported by Views. Natively, VBO comes with support for nodes, users and comments. Through the new VBO-defined hook_views_bulk_operations_object_info(), other modules can help VBO handle arbitrary object types. Refer to function views_bulk_operations_views_bulk_operations_object_info() for information.
As an example, the module comes with a re-implementation of the Content admin page. To access it, just go to the URL admin/content/node2. You can modify the path to admin/content/node to override the default Content admin page.
The module comes with a new action to manipulate nodes' taxonomy terms. Unlike Taxonomy Node Operations, which creates a new action for each single term, this module exposes a single configurable action that allows the user to choose which term(s) should be added to the selected nodes. The user can also choose to keep existing terms or to erase them.
Actions to delete these objects.
Detect rulesets created with the Rules module and expose them as actions that VBO can invoke.
Write PHP code that is applied to each node in VBO. This action requires the 'administer site configuration' permission - even if actions_permissions.module says otherwise.
Bulk-modify CCK and other node fields.
Bulk-modify user profile fields.
Assign and unassign roles to users.
The Views Block module (part of Views Hacks) exposes block data to Views, allowing VBO to manage blocks just as nodes or users. Try it out!
A module called actions_permissions is included in the package. This module generates a permission for each action, and VBO honors those permissions before showing or executing the corresponding actions. This is useful if you want to provide your VBO to several groups of users with different privileges: the same view will accommodate those different groups, showing to each the actions that they are permitted to see.
Given the high usage of VBO, I am moving to a more structured release process. I will make a new release every 1 or 2 months, where the major bugs get scheduled as well as the most voted for features. Of course, critical bugs and security fixes will generate new releases any time they are fixed.
To turn this into a roadmap, I tag bugs and feature requests with the iteration where they are scheduled.
Actions in D6 use a flag called 'changes_node_property' to give a hint to Drupal whether this action modifies node contents or performs a read-only operation on the node. VBO uses that flag to determine whether node_save() should be called or not after executing the action. Actions that modify node contents but don't expose this flag in hook_action_info() will not be properly handled by VBO! Checkout node.module's node_action_info() implementation for an example.
You need to write a node operation instead of an action. Whereas actions get called *once for every selected node*, node operations are called once only, and they are passed an array of selected nodes. Check out sirkitree's article for the same concept applied to user operations.
Note: If you use Batch API to execute your actions, VBO will revert to calling the action once per node instead. This is because it doesn't make sense to batch one single action.
VBO is designed to handle large numbers of nodes, without causing memory errors or timeouts. When you select thousands of nodes, you can choose to execute the operations using Batch API, which provides visual feedback on VBO's progress. To select Batch API, edit your view, open the "Bulk Operation" style settings and in the section "To execute operations:", select "Use Batch API". You can also choose to execute the operations during cron runs via the Job queue module if you have it enabled.
You will need to write simple PHP code.
'field_contact' => array(
0 => array('value' => 'Some value'),
);/admin/content/node2 and filter the nodes by the desired type. Then choose the action "Modify node fields" and press "Execute".
$node. E.g.return array(
0 => array('value' => $node->field_contact[0]['value']),
);VBO gives a lot of power to admins, so it's important that security measures be enforced. There are currently 3 different ways to restrict access to VBO:
node_access on each node that is about to be acted upon. Nodes for which the user does not have appropriate permissions are discarded from the execution list. The action flag changes_node_property is mapped to node_access('update'). There are other mappings as well described in the VBO development guide.
hook_action_info under the attribute 'permissions' => array(perm1, perm2, ...).
These pairs are functionally equivalent. Technically, they differ in that the node_mass_update function is a core node operation used in the original content administration screen, whereas the node_xxx_action functions are core actions. As a site administrator, feel free to choose either for your VBO content administration screen.
Create a Node view and filter by the content types that are attached to Content Profile. Then use the "Modify node fields" action to edit those fields.