Download & Extend

Bugs with hook_send $op='node'

Project:Send
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:dww
Status:closed (won't fix)

Issue Summary

trying the following:

<?php
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:

<?php
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

#1

Title:hook_send $op='node' does nothing» Bugs with hook_send $op='node'
Category:support request» bug report
Assigned to:Anonymous» dww
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.

#2

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!

nobody click here