Parent Directory
|
Revision Log
|
Revision Graph
Moved user API key handling and node crossposting to separate modules.
| 1 | <?php |
| 2 | // $Id: $ |
| 3 | |
| 4 | /** |
| 5 | * Implementation of hook_nodeapi(). |
| 6 | */ |
| 7 | function jaiku_crosspost_nodeapi(&$node, $op) { |
| 8 | switch ($op) { |
| 9 | case 'insert': |
| 10 | $account = user_load(array('uid' => $node->uid)); |
| 11 | $text = ($account->jaiku_text) ? $account->jaiku_text : 'New post: !title (!url)'; |
| 12 | $text = t($text, array('!title' => $node->title, '!url' => url('node/' . $node->nid, NULL, NULL, TRUE))); |
| 13 | if ($node->status == 1) { |
| 14 | jaiku_user_post($text, array(), $account->name); |
| 15 | } |
| 16 | } |
| 17 | } |
| ViewVC Help | |
| Powered by ViewVC 1.1.2 |