array ( 'rules' => array ( 'rules_14' => array ( '#type' => 'rule', '#set' => 'event_node_update', '#label' => 'Republish Published Content after Moderator Editing', '#active' => 1, '#weight' => '5', '#categories' => array ( 0 => 'Moderation', ), '#status' => 'custom', '#conditions' => array ( 0 => array ( '#type' => 'condition', '#settings' => array ( 'boolean' => '[node_unchanged:workflow-current-state-name] = \'live - viewable to all, authors and moderators can make new revisions\'', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'boolean' => array ( 0 => 'node_unchanged', ), ), ), ), '#name' => 'rules_condition_check_boolean', '#info' => array ( 'label' => 'Check a truth value', 'arguments' => array ( 'boolean' => array ( 'type' => 'boolean', 'label' => 'Truth value', ), ), 'module' => 'Rules', ), '#weight' => 0, ), ), '#actions' => array ( 0 => array ( '#info' => array ( 'module' => 'Node', 'arguments' => array ( 'node' => array ( 'label' => 'Content', 'type' => 'node', ), ), 'label' => 'Publish the most recent pending revision', 'base' => 'rules_core_action_execute', 'action_name' => 'revisioning_publish_latest_revision_action', 'configurable' => false, ), '#name' => 'rules_core_revisioning_publish_latest_revision_action', '#settings' => array ( 'auto_save' => 0, '#argument map' => array ( 'node' => 'node', ), ), '#type' => 'action', '#weight' => 0, ), ), ), 'rules_20' => array ( '#type' => 'rule', '#set' => 'event_node_presave', '#label' => 'Promote To Front Page - New Creation', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'Moderation', ), '#status' => 'custom', '#conditions' => array ( 0 => array ( '#weight' => 0, '#negate' => 1, '#type' => 'condition', '#settings' => array ( 'boolean' => '[node:nid]', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'boolean' => array ( 0 => 'node', ), ), ), ), '#name' => 'rules_condition_check_boolean', '#info' => array ( 'label' => 'Check a truth value - Node ID Does Exists', 'label callback' => false, 'arguments' => array ( 'boolean' => array ( 'type' => 'boolean', 'label' => 'Truth value', ), ), 'module' => 'Rules', ), ), 1 => array ( '#type' => 'condition', '#settings' => array ( 'field_name' => 'field_promote_to_front_page', '#argument map' => array ( 'node' => 'node_unchanged', ), 'value' => array ( 0 => array ( 'value' => 'Promote to front page', ), ), 'code' => '', 'vars' => array ( ), ), '#name' => 'content_rules_field_has_value', '#info' => array ( 'label' => 'Unchanged content\'s field \'field_promote_to_front_page\' is checked', 'label callback' => false, 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'eval input' => array ( 0 => 'code', 1 => 'value|0|value', ), 'module' => 'CCK', ), '#weight' => 0, ), ), '#actions' => array ( 0 => array ( '#weight' => 0, '#type' => 'action', '#settings' => array ( 'auto_save' => 0, '#argument map' => array ( 'node' => 'node', ), ), '#name' => 'rules_core_node_promote_action', '#info' => array ( 'label' => 'Promote saved content to front page', 'label callback' => false, 'module' => 'Node', 'arguments' => array ( 'node' => array ( 'label' => 'Content', 'type' => 'node', ), ), 'base' => 'rules_core_action_execute', 'action_name' => 'node_promote_action', 'configurable' => false, ), ), ), ), 'rules_21' => array ( '#type' => 'rule', '#set' => 'event_node_update', '#label' => 'Demote From Front Page - Existing Content', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'Moderation', ), '#status' => 'custom', '#conditions' => array ( 0 => array ( '#weight' => 0, '#type' => 'condition', '#settings' => array ( 'boolean' => '[node:nid]', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'boolean' => array ( 0 => 'node', ), ), ), ), '#name' => 'rules_condition_check_boolean', '#info' => array ( 'label' => 'Check a truth value - Node ID Exists', 'label callback' => false, 'arguments' => array ( 'boolean' => array ( 'type' => 'boolean', 'label' => 'Truth value', ), ), 'module' => 'Rules', ), ), 1 => array ( '#weight' => 0, '#type' => 'condition', '#settings' => array ( 'field_name' => 'field_promote_to_front_page', '#argument map' => array ( 'node' => 'node', ), 'value' => array ( 0 => array ( 'value' => 'off', ), ), 'code' => '', 'vars' => array ( ), ), '#name' => 'content_rules_field_has_value', '#info' => array ( 'label' => 'Updated content\'s field \'field_promote_to_front_page\' is not checked', 'label callback' => false, 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'eval input' => array ( 0 => 'code', 1 => 'value|0|value', ), 'module' => 'CCK', ), ), ), '#actions' => array ( 1 => array ( '#weight' => 0, '#info' => array ( 'label' => 'Execute custom PHP code', 'module' => 'PHP', 'eval input' => array ( 0 => 'code', ), ), '#name' => 'rules_action_custom_php', '#settings' => array ( 'code' => 'promote\'", \'status\'); $node->promote = 0; // drupal_set_message("node promote: \'$node->promote\'", \'status\'); db_query("UPDATE {node} SET promote = \'%d\' WHERE nid = \'%d\'", $node->promote, $node->nid); ?>', 'vars' => array ( 0 => 'node', ), '#eval input' => array ( 'rules_input_evaluator_php' => array ( 'code' => array ( 0 => 'node', ), ), ), ), '#type' => 'action', ), ), ), 'rules_25' => array ( '#type' => 'rule', '#set' => 'event_node_update', '#label' => 'Promote To Front Page - Existing Content', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'Moderation', ), '#status' => 'custom', '#conditions' => array ( 0 => array ( '#weight' => 0, '#type' => 'condition', '#settings' => array ( 'boolean' => '[node:nid]', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'boolean' => array ( 0 => 'node', ), ), ), ), '#name' => 'rules_condition_check_boolean', '#info' => array ( 'label' => 'Check a truth value - Node ID Exists', 'label callback' => false, 'arguments' => array ( 'boolean' => array ( 'type' => 'boolean', 'label' => 'Truth value', ), ), 'module' => 'Rules', ), ), 1 => array ( '#type' => 'condition', '#settings' => array ( 'field_name' => 'field_promote_to_front_page', '#argument map' => array ( 'node' => 'node', ), 'value' => array ( 0 => array ( 'value' => 'Promote to front page', ), ), 'code' => '', 'vars' => array ( ), ), '#name' => 'content_rules_field_has_value', '#info' => array ( 'label' => 'Updated content\'s field \'field_promote_to_front_page\' is checked', 'label callback' => false, 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'eval input' => array ( 0 => 'code', 1 => 'value|0|value', ), 'module' => 'CCK', ), '#weight' => 0, ), ), '#actions' => array ( 0 => array ( '#weight' => 0, '#info' => array ( 'label' => 'Execute custom PHP code', 'module' => 'PHP', 'eval input' => array ( 0 => 'code', ), ), '#name' => 'rules_action_custom_php', '#settings' => array ( 'code' => 'promote\'", \'status\'); $node->promote = 1; // drupal_set_message("node promote: \'$node->promote\'", \'status\'); db_query("UPDATE {node} SET promote = \'%d\' WHERE nid = \'%d\'", $node->promote, $node->nid); ?>', 'vars' => array ( 0 => 'node', ), '#eval input' => array ( 'rules_input_evaluator_php' => array ( 'code' => array ( 0 => 'node', ), ), ), ), '#type' => 'action', ), ), ), 'rules_26' => array ( '#type' => 'rule', '#set' => 'event_node_presave', '#label' => 'Make Sticky - New Creation', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'Moderation', ), '#status' => 'custom', '#conditions' => array ( 0 => array ( '#weight' => 0, '#negate' => 1, '#type' => 'condition', '#settings' => array ( 'boolean' => '[node:nid]', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'boolean' => array ( 0 => 'node', ), ), ), ), '#name' => 'rules_condition_check_boolean', '#info' => array ( 'label' => 'Check a truth value - Node ID Does Exists', 'label callback' => false, 'arguments' => array ( 'boolean' => array ( 'type' => 'boolean', 'label' => 'Truth value', ), ), 'module' => 'Rules', ), ), 1 => array ( '#info' => array ( 'label' => 'Unchanged content\'s field \'field_sticky\' is checked', 'label callback' => false, 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'eval input' => array ( 0 => 'code', 1 => 'value|0|value', ), 'module' => 'CCK', ), '#name' => 'content_rules_field_has_value', '#settings' => array ( 'field_name' => 'field_sticky', '#argument map' => array ( 'node' => 'node_unchanged', ), 'value' => array ( 0 => array ( 'value' => 'Sticky at top of lists', ), ), 'code' => '', 'vars' => array ( ), ), '#type' => 'condition', '#weight' => 0, ), ), '#actions' => array ( 0 => array ( '#type' => 'action', '#settings' => array ( 'auto_save' => 0, '#argument map' => array ( 'node' => 'node', ), ), '#name' => 'rules_core_node_make_sticky_action', '#info' => array ( 'label' => 'Make saved content sticky', 'module' => 'Node', 'arguments' => array ( 'node' => array ( 'label' => 'Content', 'type' => 'node', ), ), 'base' => 'rules_core_action_execute', 'action_name' => 'node_make_sticky_action', 'configurable' => false, 'label callback' => 'rules_core_node_label_callback', ), '#weight' => 0, ), ), ), 'rules_27' => array ( '#type' => 'rule', '#set' => 'event_node_update', '#label' => 'Make Unsticky - Existing Content', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'Moderation', ), '#status' => 'custom', '#conditions' => array ( 0 => array ( '#info' => array ( 'label' => 'Check a truth value - Node ID Exists', 'label callback' => false, 'arguments' => array ( 'boolean' => array ( 'type' => 'boolean', 'label' => 'Truth value', ), ), 'module' => 'Rules', ), '#name' => 'rules_condition_check_boolean', '#settings' => array ( 'boolean' => '[node:nid]', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'boolean' => array ( 0 => 'node', ), ), ), ), '#type' => 'condition', '#weight' => 0, ), 1 => array ( '#info' => array ( 'label' => 'Updated content\'s field \'field_sticky\' is not checked', 'label callback' => false, 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'eval input' => array ( 0 => 'code', 1 => 'value|0|value', ), 'module' => 'CCK', ), '#name' => 'content_rules_field_has_value', '#settings' => array ( 'field_name' => 'field_sticky', '#argument map' => array ( 'node' => 'node', ), 'value' => array ( 0 => array ( 'value' => 'off', ), ), 'code' => '', 'vars' => array ( ), ), '#type' => 'condition', '#weight' => 0, ), ), '#actions' => array ( 1 => array ( '#weight' => 0, '#type' => 'action', '#settings' => array ( 'code' => 'sticky\'", \'status\'); $node->sticky = -100; // drupal_set_message("node sticky: \'$node->sticky\'", \'status\'); db_query("UPDATE {node} SET sticky = \'%d\' WHERE nid = \'%d\'", $node->sticky, $node->nid); ?>', 'vars' => array ( 0 => 'node', ), '#eval input' => array ( 'rules_input_evaluator_php' => array ( 'code' => array ( 0 => 'node', ), ), ), ), '#name' => 'rules_action_custom_php', '#info' => array ( 'label' => 'Execute custom PHP code to make Unsticky', 'label callback' => false, 'module' => 'PHP', 'eval input' => array ( 0 => 'code', ), ), ), ), ), 'rules_28' => array ( '#type' => 'rule', '#set' => 'event_node_update', '#label' => 'Make Sticky - Existing Content', '#active' => 1, '#weight' => '0', '#categories' => array ( 0 => 'Moderation', ), '#status' => 'custom', '#conditions' => array ( 0 => array ( '#weight' => 0, '#type' => 'condition', '#settings' => array ( 'boolean' => '[node:nid]', '#eval input' => array ( 'token_rules_input_evaluator' => array ( 'boolean' => array ( 0 => 'node', ), ), ), ), '#name' => 'rules_condition_check_boolean', '#info' => array ( 'label' => 'Check a truth value - Node ID Exists', 'label callback' => false, 'arguments' => array ( 'boolean' => array ( 'type' => 'boolean', 'label' => 'Truth value', ), ), 'module' => 'Rules', ), ), 1 => array ( '#info' => array ( 'label' => 'Updated content\'s field \'field_sticky\' is checked', 'label callback' => false, 'arguments' => array ( 'node' => array ( 'type' => 'node', 'label' => 'Content', ), ), 'eval input' => array ( 0 => 'code', 1 => 'value|0|value', ), 'module' => 'CCK', ), '#name' => 'content_rules_field_has_value', '#settings' => array ( 'field_name' => 'field_sticky', '#argument map' => array ( 'node' => 'node', ), 'value' => array ( 0 => array ( 'value' => 'Sticky at top of lists', ), ), 'code' => '', 'vars' => array ( ), ), '#type' => 'condition', '#weight' => 0, ), ), '#actions' => array ( 0 => array ( '#weight' => 0, '#info' => array ( 'label' => 'Execute custom PHP code to make Sticky', 'label callback' => false, 'module' => 'PHP', 'eval input' => array ( 0 => 'code', ), ), '#name' => 'rules_action_custom_php', '#settings' => array ( 'code' => 'sticky\'", \'status\'); $node->sticky = 100; // drupal_set_message("node sticky: \'$node->sticky\'", \'status\'); db_query("UPDATE {node} SET sticky = \'%d\' WHERE nid = \'%d\'", $node->sticky, $node->nid); ?>', 'vars' => array ( 0 => 'node', ), '#eval input' => array ( 'rules_input_evaluator_php' => array ( 'code' => array ( 0 => 'node', ), ), ), ), '#type' => 'action', ), ), ), ), 'rule_sets' => array ( ), )