Update Drupal 6 CCK fields via another tool

Asked

Viewed 31 times

0

I’m looking to update the Drupal 6 CCK fields through a mini panel where certain users can change only their information.

I’m choosing to upgrade outside because it’s an area that customers already know and don’t have to change environments, in this case Drupal, which is used internally by the team to register some things.

I found a solution updating directly in the database, but, they are not advising me, some suggestion in a more correct way?

1 answer

0

I’m not absolutely sure if you want to allow some users to change only some specific nodes or fields in all nodes of a certain type.

If the idea is to allow them to edit only certain nodes the module ACL can solve your problem.

If the idea is to allow them to edit some CCK fields in a content type, the simplest option is to use the module Field Permissions which allows you to create permissions for each field. It takes work to set all permissions, but you will gain more control over your forms.

If none of these options meet your need, you may think about creating a new type of content (say, "altera_data") containing only the fields that these new users can use. Then create rules using the module Rules that change the relevant fields of the original Node when an "altera_data" content is saved. Consider using the function args() to retrieve required parameters from the URL.

Finally, the most robust form is create a custom module. In this module, create a custom form which changes only the desired fields of the nodes in question. In this case you will need to use the hook_menu to create the form page and use the drupal_get_form as "page callback" and the name of the function that builds the form as "page Arguments". In the function defined as 'Submit' of your form use the hook_node_save to change the fields from the values provided in the form.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.