Here are the steps to be followed:
You need to enable the "Recommend Friends" community type plugin in backend plugin manager.
Jomsocial : - Embed the Widget in your Template / Extension code via a Template override: Here is the widget that you need to copy and paste (ideally this widget should be placed in a template override for the profile page in JomSocial): If you are using Jomsocial 2.8.x then you need to ovverride com_community/templates/your_template/modules/profile/userinfo.php file. Else you need to override template "profile.header.php" of com_community, After overriding ,You will get the Recommend Friends link on profile page of the user who is your friend.Have a look: Community Builder : We give the "recommedfriends.zip" with the People suggest package. You will find it in "YOUR_JOOMLA_DIRECTORY/components/com_psuggest/CB_recommedfriends" folder. You need to install this plugin zip using Community Builder Plugin installer
1. Enabling Recommend Friend plugin:
2. Showing "Recommend Friends" link on Friend's profile:
<?php /*start of code to integrate recommend plugin*/ ?>
<?php if($isFriend){
$profileid = JRequest::getVar('userid');
$userid = JFactory::getUser()->id;
?>
<script type='text/javascript'>
function loadRCF(sender, reciever) {
var ajaxCall = 'jax.call("community", "plugins,recommendfriend,loadRCF", "' + sender + '", "' +reciever + '");';
cWindowShow(ajaxCall, 'Do You Wish to Suggest Friends to this user ?', 565, 400);
}
</script>
<div class='btn btn-primary' onclick="loadRCF(<?php echo $userid ?> , <?php echo $profileid ?> )">
<span><?php echo JText::_('PLG_RECOMMENDFRIEND_RECOMMEND');?></span>
</div>
<?php } ?>
<?php /*End of code to integrate recommend plugin*/ ?>
For more information on how template overrides work check : http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core