| 1 |
<?php
|
| 2 |
// $Id: twitter_actions.rules.inc,v 1.1.2.1 2009/04/08 14:19:59 eaton Exp $
|
| 3 |
/**
|
| 4 |
* @file
|
| 5 |
* Provide better intergration into the rules module
|
| 6 |
*/
|
| 7 |
|
| 8 |
/**
|
| 9 |
* Implementation of hook_rules_action_info_alter().
|
| 10 |
*
|
| 11 |
* Actions of type system are not supported, so rules won't make use of it automatically. So
|
| 12 |
* we have to provide some information about it to make it work.
|
| 13 |
*/
|
| 14 |
function twitter_actions_rules_action_info_alter(&$actions) {
|
| 15 |
$actions['rules_core_twitter_actions_set_status_action'] = array(
|
| 16 |
'label' => t('Post a message to Twitter'),
|
| 17 |
// Make sure there is something passed for $object.
|
| 18 |
'arguments' => array('object' => array('type' => 'value', 'default value' => NULL)),
|
| 19 |
'module' => 'Twitter',
|
| 20 |
'eval input' => array('screen_name', 'password', 'message'),
|
| 21 |
// Let the rules system for executing core style actions execute it.
|
| 22 |
'base' => 'rules_core_action_execute',
|
| 23 |
'action_name' => 'twitter_actions_set_status_action',
|
| 24 |
'configurable' => TRUE,
|
| 25 |
);
|
| 26 |
}
|
| 27 |
|