I managed to build my messages using Realnames with rules and display them with display suite, but when a user reacts it's the username instead of realname that shows.

Is there maybe a way to change this?

Thank you soo much for this incredible module,
D

Comments

Stalski’s picture

Status: Active » Fixed

Yes, You need to simple override the theme function "function theme_heartbeat_comment".
You will need to take over the function and replace this line beneath with your realname implementation (I checked realname for you, and think the sollution, included in the code beneath as well)

// Change this
 $output .= l($account->name, 'user/' . $comment->uid) . ' ';
// Into this
$output .= l(realname_make_name($account), 'user/' . $comment->uid) . ' ';
Donaldd’s picture

Status: Closed (fixed) » Fixed

It works!! :)

Thank you soo much Stalski!

Stalski’s picture

Glad i can refer to this issue now. I will spontanuously create a documentation page on
http://heartbeat.menhireffect.be/docs/using-realname-module

Status: Fixed » Closed (fixed)

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

c-c-m’s picture

Sorry to reopen this. Could you explain where and how is to be copied that piece of code?

thanks!

Stalski’s picture

It is explained on that page. Its a theme override for theme_heartbeat_comment. So just the basic drupal theme implemenation.
phptemplate_heartbeat_comment in your module or theme's template.php will fix your problem. That is what theme functions are for.

c-c-m’s picture

Sorry to say that that page didn't say where to place the code, although a user with knowledge in theme functions may have already known that because it seems obvious. It is not my case. That's why I made a dummy question, but I really needed it.

Thank you anyway for your explanations, I know now where to place that code and future theme functions.

misterpronin’s picture

Title: RealName in Heartbeat react field » Who knows what to do in drupal 7? Thanks in advance))
Version: 6.x-4.9 » 7.x-1.0
Component: Miscellaneous » Code
Assigned: Unassigned » misterpronin
Category: support » task
Status: Fixed » Active

Who knows what to do in drupal 7? Thanks in advance))

Stalski’s picture

Status: Active » Closed (fixed)