Hi;
Is it possible with this module to have an status added to the user profile page (we are using profile2) to indicate if the user is online?

Also it would be great having this available in views.

Thanks
Thomas

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bryantt’s picture

Version: 7.x-1.0-beta31 » 7.x-2.0
Component: Miscellaneous » Code
Status: Active » Needs review
FileSize
2.27 KB

Lets you create links to start chat or display online status. You'll need to create the html, in your case the user profile template file. I also submitted a patch for views. Combined with that patch and you can alter the output in views with the UID to create the online status circle or a chat link.

link to views patch - https://www.drupal.org/project/drupalchat/issues/2931862

Example from my user-profile.tpl.php file

$account = menu_get_object('user');
$strUID = $account->uid;


 print '<div id="drupalchat"><li id="2chatbox_' . $strUID . '"><div class="second_subpanel_title"><div class="status-1"></div></li></div>';

 print '<div id="drupalchat"><li id="2chatbox_' . $strUID . '"><div class="second_subpanel_title"><div class="status-0"></div></li></div>';

 

print ('<a href="#' . $account->uid .'" id="' . $account->name . '" class="drupalChatLink btn">Send ' . $account->name . ' a chat</a>');