views:

191

answers:

2

I want to add a custom message once someone saves a specific content-type telling them that it is going through an approval process. This will let them know as well as prevent them from re-submitting.

+2  A: 

Your best bet is a small custom module that does something like this (completely untested):

<?php
function MODULENAME_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  if ($node['type'] == 'custom_node_type' && $op == 'insert') {
    drupal_set_message(t('Put your custom message here.'));
  }
}

For more info, see the docs for hook_nodeapi and drupal_set_message

Edited to reflect the below comments.

Mike Crittenden
Chris Ridenour
...and if your message needs to be translated in different languages, wrap it in the t() function: drupal_set_message(t('Put your custom message here.'));
marcvangend
Both of the above are good points.
Mike Crittenden
A: 

This is difficult to do without a custom module.

One way I would try and do this is to overwrite the post-submit URL.

Then in the new page, use a PHP filter and do the following:

drupal_set_message('The submitted content is being approved');
drupal_goto('');
Chris Ridenour

related questions