class jc_com_comprofiler extends JCommentsPlugin
{
function getTitles($ids)
{
$db = & JCommentsFactory::getDBO();
$db->setQuery( "SELECT CONCAT(username,'\'s Profile') AS title FROM #__users WHERE id IN (' . implode(',', $ids) . ')" );
return $db->loadObjectList('id');
}
function getObjectTitle($id)
{
$db = & JCommentsFactory::getDBO();
$db->setQuery( "SELECT CONCAT(username,'\'s Profile') AS title FROM #__users WHERE id = $id" );
return $db->loadResult();
}
function getObjectLink($id)
{
$_Itemid = JCommentsPlugin::getItemid( 'com_comprofiler' );
$link = JRoute::_( 'index.php?option=com_comprofiler&task=viewprofile&user='.$id.'&Itemid='. $_Itemid );
return $link;
}
}
$uid = urldecode( stripslashes( cbGetParam( $_GET, 'user', '' ) ) );
$comments = JPATH_SITE . DS .'components' . DS . 'com_jcomments' . DS . 'jcomments.php';
if (file_exists($comments)) {
require_once($comments);
$cuser =& JFactory::getUser($uid);
//echo $uid.'------'.$cuser->name.'<br/>'; //ok
$title = $cuser->username."'s Profile.";
echo JComments::showComments($uid, 'com_comprofiler', $title);
}
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
<?php $uid = urldecode( stripslashes( cbGetParam( $_GET, 'user', '' ) ) );
$comments = JPATH_SITE . DS .'components' . DS . 'com_jcomments' . DS . 'jcomments.php';
if (file_exists($comments)) {
require_once($comments);
$cuser =& JFactory::getUser($uid);
//echo $uid.'------'.$cuser->name.'<br/>'; //ok
$title = $cuser->username."'s Profile.";
echo JComments::showComments($uid, 'com_comprofiler', $title);
} ?>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.