Hi, I need to post a send message link to jomsocial using the code below.
I am using content form. It creates a article and i need to create a link to send message to author of article.
Thanks
I am using content form. It creates a article and i need to create a link to send message to author of article.
$jspath = JPATH_ROOT.DS.'components'.DS.'com_community';
include_once($jspath.DS.'libraries'.DS.'core.php');
include_once($jspath.DS.'libraries'.DS.'messaging.php');
// Add a onclick action to any link to send a message
// Here, we assume $usrid contain the id of the user we want to send message to
$onclick = CMessaging::getPopup($userid);
echo '<a href="javascript:void(0)" onclick="'. $onclick .'">Send message</a>';
Thanks
Hi tippex,
You can probably add that directly into the Form HTML
Bob
You can probably add that directly into the Form HTML
<?php
if ( !$mainframe->isSite() ) { return; }
$jspath = JPATH_ROOT.DS.'components'.DS.'com_community';
include_once($jspath.DS.'libraries'.DS.'core.php');
include_once($jspath.DS.'libraries'.DS.'messaging.php');
// Add a onclick action to any link to send a message
// Here, we assume $usrid contain the id of the user we want to send message to
$onclick = CMessaging::getPopup($userid);
echo '<a href="javascript:void(0)" onclick="'. $onclick .'">Send message</a>';
?>
Bob
This topic is locked and no more replies can be posted.