I just installed the privatemsg module in a drupal 4.6.2 site and I cannot seem to figure out how to enable links on every post to allow users to "write to author" even though it offers me the option in the administration settings and I went into the module itself and see the following code that should make this possible.
/**
* Implementation of hook_link().
*/
function privatemsg_link($type, $arg) {
if (user_access('access private messages') && ($type == 'node' || $type == 'comment') && variable_get("privatemsg_link_$type", 0) && (isset($GLOBALS['user']->privatemsg_allow) ? $GLOBALS['user']->privatemsg_allow : 1)) {
if (user_access('access private messages', $arg) && $arg->privatemsg_allow) {
return array(l(t('write to author'), "privatemsg/msgto/$arg->uid"));
}
}
}
Does anyone know if there is a bug or something I need to be made aware of? Is there some trick to getting this to work?
I did notice in the install.txt there is a line that says:
If you want to create a link to send a user a message, use:
l(t("send private message"), "privatemsg/msgto/$user->uid"))
But it appears that the line is already in the module.
I am stumped....any help would be great! Thanks!
-- Firedancer5
Comments
I finally got it!
I seemed to have gotten it by reading this post by davec611: http://drupal.org/node/19662
Thanks davec611!