Index: trackback.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/trackback/trackback.module,v retrieving revision 1.64.2.22 diff -u -r1.64.2.22 trackback.module --- trackback.module 29 Nov 2007 15:30:29 -0000 1.64.2.22 +++ trackback.module 6 Mar 2008 16:26:57 -0000 @@ -305,7 +305,7 @@ } break; - case 'alter': + case 'view': if ($node->can_receive && !$node->in_preview) { $url = url('node/'. $node->nid, NULL, NULL, TRUE); $tb_url = url('trackback/'. $node->nid, NULL, NULL, TRUE); @@ -315,7 +315,10 @@ $autodetect .= ''; $autodetect .= "\n-->\n"; if ($teaser) { - $node->teaser .= $autodetect; + $node->content['trackback'] = array ( + '#weight' => 12, + 'autodetect' => array('#weight' => 1, '#value' => $autodetect), + ); } else { $node->trackback = array( @@ -326,9 +329,12 @@ if (!$teaser && variable_get('trackback_view', 0) == 0) { $node->trackback['received'] = trackback_render($node); } - if (!empty($node->trackback)) { - $node->body .= implode('', $node->trackback); - } + $node->content['trackback'] = array ( + '#weight' => 12, + 'autodetect' => array('#weight' => 1, '#value' => $node->trackback['autodetect']), + 'url' => array('#weight' => 2, '#value' => $node->trackback['url']), + 'received' => array('#weight' => 3, '#value' => $node->trackback['received']), + ); } break; @@ -675,7 +681,9 @@ // First, grab anything that looks like a url from the body of the node. $node = node_build_content($node); - $content = drupal_render($node->content); + $targets = $node->content; + unset($targets['trackback']); // do not send trackbacks to yourself ! + $content = drupal_render($targets); $pattern = '((?:http|https)://[a-z0-9;/?:@&=+#$,_.!~*()%-]+)'; if (variable_get('trackback_link_only', 0)) {