node_save_action

Events happening in the community are now at Drupal community events on www.drupal.org.
drecute's picture

How to programmatically test if a rule has ran.

I have set up a rule that triggers when a new content of a certain type is created. How is it possible to programmatically test if this rule has ran?

I have the following code

<?php
function nupostmark_test() {
   
$node = node_load($node);
   
$ntypes = node_get_types('types', $node);
   
$nodesaverule = rule_function_to_call_here;
    if(
$nodesaverule !== NULL && $ntypes == 'plistings'){
               
drupal_set_message('you can set the variable now');
               
//set some variable to make available to template.php in phptemplate_preprocess_block
           
}
}
?>
Read more
Subscribe with RSS Syndicate content