Project:RealName
Version:6.x-1.3
Component:Tokens
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

When using the RealName module, I ended up needing to create a token for the author of a comment. I ran into this when using the Notifications module.

When using Notifications, the ['realname'] token substitutes in the real name of the person receiving the message. However, I wanted to have the creator of the comment substituted in instead. To do this, I created a new token called ['realname-comment-author']. I'm attaching a patch with my changes. Please let me know if you have any questions.

AttachmentSizeStatusTest resultOperations
realname-comment-token.patch823 bytesIgnored: Check issue status.NoneNone

Comments

#1

Tested, it works!

#2

Title:Realname Comment Author Token» Author realname
Version:6.x-1.x-dev» 6.x-1.3

Realname is working for users with permission. But when sending email updates about new content there is no token available to include author's real name. it looks odd where you can see the realname in the nodes but only author's usernames in the emails.

#3

It would be nice to have a similar token for the author of a node, as well; something like [author-realname].

#4

I couldnt get it to work :S. is it in the latest release.
Can somebody upload me a working version?

#5

Not sure what is this about. It just provide a new token, isn't it?

Is it somehow related to the "Author by" field of a node (where I can't use the realname)?

#6

@JuliaKM: There really should be a matching hook_token_list value as well. Also, I don't see the value in a heavy user_load here; I changed it to $tokens['realname-comment-author'] = db_result(db_query("SELECT realname FROM {realname} WHERE uid = %d", $object->uid));

@xjm: You got it.

#7

Title:Author realname» Author realname tokens
Status:needs review» fixed

Committed to 6.x-1.x-dev.

#8

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here