Posted by JuliaKM on November 11, 2009 at 3:03pm
Jump to:
| 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.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| realname-comment-token.patch | 823 bytes | Ignored: Check issue status. | None | None |
Comments
#1
Tested, it works!
#2
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_loadhere; 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
Committed to 6.x-1.x-dev.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.