trying the following:

function pw_send_send($op, $module = 'send', $nodetype='', $node=null) {
  switch ($op) {
    case 'node':
      return $node->title;
  }
}

has no effect. i would expect it would allow me to return the text i want displayed, rather than the node body.

i also tried to follow the code in the module, and tried:


function pw_send_send($op, $module = 'send', $nodetype='', $node=null) {
  switch ($op) {
    case 'node':
      pw_send_title($node->title, true);
      return 'pw_send_title';
      break;
  }
}

function pw_send_title($title = '', $set_title = false) {
  static $pw_title;
  if ($set_title) {
    $pw_title = $title;
  }
  return $pw_title;
}

which also had no effect.

Comments

dww’s picture

Title: hook_send $op='node' does nothing » Bugs with hook_send $op='node'
Assigned: Unassigned » dww
Category: support » bug
Status: Active » Needs review

Whoops, I just found this older issue about something I recently debugged and provided patches for:
#257208: hook_send('node') invoked with wrong arguments, callback returned doesn't get info it needs
Just marked that duplicated, but read there for an explanation of the bug and patches that fix it.

allie micka’s picture

Status: Needs review » Closed (won't fix)

Send uses a new class abstraction setup, and now relies on "Templates" to render its stuff. In D6+, you'll be able to select alternative Build modes via admin/settings/send/template

Hopefully, this gets you what you need for future revs. If not, let's start with a new issue.

Thanks DWW!