Posted by aaron on August 13, 2007 at 6:36pm
Jump to:
| 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
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
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!