This isn't a bug so much as an extension of the tell a friend module. I was looking for this functionality and couldn't find it so I hacked the module a bit. But I'm not sure where else to post this, but I wanted to make it available.

I made the hack to this module on a site so that I can feed a node number through a url variable and then replace some of the 'tell a friend' module variables with fields from the referenced node. I just added a few lines of code to the tell a friend module:

I dropped this in around line 306:

   if (isset($_GET['refID'])) {
	 	 
		 $refNode = node_load($_GET['refID']);
		 $node->tellafriend_node_subject = $refNode->title;
		 $node->tellafriend_node_message_constant_text = 'http://www.mysite.com/'.$refNode->path;
		 
   }

Note: I found that this will only work if you have a template file in your theme folder for the tell a friend content type "node-tellafriend_node.tpl.php"

Anyway, I hope this is helpful to someone.

Comments

d.novikov’s picture

Just another way to do this without patching the module itself:

function yourmodule_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  switch ($op) {
    case 'load':
      if ($node->type == 'tellafriend_node') {
        $node->tellafriend_node_message_constant_text = l('anytext', 'node/'. $_GET['refID'], array('absolute' => TRUE));
      }
      break;
    default:
      break;
  }
}