Don,
Completely new question for us, so thanks for your patience. We've determined how to add the Like and Comment box. I'm going to give directions for the Like only right now, though the commenting is similar. The code below will add a unique Like button to each activity stream update posted. When "Liked", the link that would appear in a users FB wall will link to the original user's profile that posted the stream update in JomSocial. Unfortunately, there's no way to link directly to the activity stream update, so hopefully the link to the user's profile is good enough for now. If you have suggestions on where you'd prefer the link in FB to go, let me know.
Hopefully, the steps below are pretty clear, but if not, let us know.
* Copy /components/com_community/templates/default/activities.index.php to /templates/<YOUR_TEMPLATE>/html/com_community/activities.index.php (creating any directories as necessary)
** This creates a 'template override' so that any changes you make to that file won't be overridden if you update JomSocial
* Edit the file you just created in the /templates/ folder
* Search for the following code (at line 201 in my file):
<!-- <?php if($act->userLiked!=COMMUNITY_LIKE) { ?>
• <a id="like_id<?php echo $act->id?>" href="#like" onclick="jax.call('community','system,ajaxStreamAddLike', '<?php echo $act->id; ?>');return false;"><?php echo JText::_('COM_COMMUNITY_LIKE');?></a>
<?php } else { ?>
• <a id="like_id<?php echo $act->id?>" href="#unlike" onclick="jax.call('community','system,ajaxStreamUnlike', '<?php echo $act->id; ?>');return false;"><?php echo JText::_('COM_COMMUNITY_UNLIKE');?></a>
<?php } ?>-->Update that to as below, adding the {JFBCLogin..} tag on the second line, the <!-- on the next and the --> at the end :
<!-- <?php if($act->userLiked!=COMMUNITY_LIKE) { ?>
{JFBCLike href=<?php echo CRoute::_('index.php?option=com_community&view=profile&userid='.$act->actor.'&act='.$act->id); ?>}
<!--
• <a id="like_id<?php echo $act->id?>" href="#like" onclick="jax.call('community','system,ajaxStreamAddLike', '<?php echo $act->id; ?>');return false;"><?php echo JText::_('COM_COMMUNITY_LIKE');?></a>
<?php } else { ?>
• <a id="like_id<?php echo $act->id?>" href="#unlike" onclick="jax.call('community','system,ajaxStreamUnlike', '<?php echo $act->id; ?>');return false;"><?php echo JText::_('COM_COMMUNITY_UNLIKE');?></a>
<?php } ?>-->
-->I'm going to skip the code for the comments now to focus on one thing at a time. Also, with Comments, there's not an easy way I can think of to 'drop-down' the comment box like it's done in JomSocial. Therefore, the comment box for FB will be there for every post, and that may be a little overwhelming.
So, start with the Likes and see if that works for you and we can go from there.
Thanks,
Alex