/[drupal]/contributions/modules/jaiku/jaiku_crosspost.module
ViewVC logotype

Contents of /contributions/modules/jaiku/jaiku_crosspost.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu Jan 3 18:06:37 2008 UTC (22 months, 3 weeks ago) by tomsun
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
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