ISSUE SUMMARY:
Our community is completely closed and there is only one path to gaining membership, therefore we want the Invite Friend button from the Member Directory removed as well any other instances and links (mobile and desktop) that allows a member to invite someone from the outside.
Please Advise.
STEPS TO REPLICATE:
1 Log in to the front end
2 Click Member Directory
3 See the Invite Friends button
4
5
RESULT
The button is there
EXPECTED RESULT
We want the button gone
BROWSER
Any
Hi,
you can do it by using template overrides, so the changes will not disappear at upgrade process.
documentation.jomsocial.com/wiki/Customizing_Template
1st it would be great if you using jomsocial latest version: 4.2.4, because many bug fixes there.
to remove all invite friend button:
/components/com_community/templates/jomsocial/layouts/activities/system/topusers.php
copy to
/templates/yoo_monday/html/com_community/layouts/activities/system/topusers.php
and remove this code from
line 41
<a href="javascript:void(0)" onclick="joms.api.friendAdd('<?php echo $user->id;?>')"><span><?php echo JText::_('COM_COMMUNITY_PROFILE_PENDING_FRIEND_REQUEST'); ?></span></a>
<a href="javascript:void(0)" onclick="joms.api.friendAdd('<?php echo $user->id;?>')"><span><?php echo JText::_('COM_COMMUNITY_PROFILE_ADD_AS_FRIEND'); ?></span></a>
<a class="joms-button--neutral joms-button--small" href="javascript:void(0)" onclick="joms.api.friendAdd('<?php echo $row->user->id;?>')"><?php echo JText::_('COM_COMMUNITY_PROFILE_PENDING_FRIEND_REQUEST'); ?></a>
<a class="joms-button--primary joms-button--small" href="javascript:" onclick="joms.api.friendAdd('<?php echo $row->user->id;?>')"><?php echo JText::_('COM_COMMUNITY_PROFILE_ADD_AS_FRIEND'); ?></a>
<a href="javascript:void(0)" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')"><span><?php echo JText::_('COM_COMMUNITY_PROFILE_ADD_AS_FRIEND'); ?></span></a>
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
<a href="javascript:void(0)" onclick="joms.api.friendAdd('<?php echo $user->id;?>')">
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
<a href="javascript:" class="joms-button--neutral joms-button--small" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
<a href="javascript:" class="joms-button--neutral joms-button--small" onclick="joms.api.friendAdd('<?php echo $profile->id;?>')">
Thank you for your reply!
I have upgraded to 4.2.4.
I do not have a file called
/components/com_community/templates/jomsocial/layouts/profile/hovercard.php
or
/components/com_community/templates/jomsocial/layouts/profile/focus.php
Does mean that there is something wrong with our JomSocial installation?
Regards,
Dom
The Invite Friends button is still on the ALL MEMBERS page even after making the changes you suggested to people.browse.php. The other suggestion to add fields works great however.
I have double checked the code and I'm pretty sure that I have it correct, but I have attached it for your review.
I have made all the other suggested changes and put them in the corresponding directories under yoo_monday/com_community/layouts
Thank you,
Dom
I have added an empty file named friend-dropdown.php into templates/yoo_monday/html/com_community/layouts/general
There is no change...The Invite Friends button is still there and clicking it goes to the Invite form. We cannot have this method of inviting outsiders to the community.
Other ideas? Thanks,
Dom