Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Drupal content creation message?

Tags:

drupal

Whenever a content item is created, a message is displayed like this:

[Content Type] [Name] has been created.

Is there any way to disable this message for specific users? Or for all users would be fine too.

like image 440
coderama Avatar asked Dec 01 '22 10:12

coderama


1 Answers

I think the best practice would be to use hook_nodeapi() and drupal_get_messages('status'). The $op for hook_nodeapi() would be insert. Ex:

mymodule_nodeapi(&$node, $op) {
  if ($node->type == 'content_type_to_check_for' && $op == 'insert') {
    drupal_get_messages('status');
  }
}
like image 128
Charlie Schliesser Avatar answered Dec 11 '22 02:12

Charlie Schliesser