The groups in my site are highly exclusive and membership is only approved through a group leader after a bit of protocol that goes on outside the website. However, the members that are already in their own group are trying to invite members whom are their friends into their group despite them never having met with the group leader. I tried removing the button with this:
.joms-focus__button--add {
display: none !important;
}
I don't mind that this removes the option to add friends in some places, since we don't need "friends" for our site, but it also kills the ability to RSVP to events, which we need.
Simply stated: how can I remove the "invite friends" option from groups. It appears on the group page and on the groups lists. Thanks for your help!!!
Hi Scott,
You should modify this file components/com_community/templates/jomsocial/layouts/groups/single.php. and remove this code :
<!-- invite friend button -->
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.groupInvite('<?php echo $group->id; ?>')">
<?php echo JText::_('COM_COMMUNITY_INVITE_FRIENDS'); ?>
</a>
Hi,
- from list group, open this file components/com_community/templates/jomsocial/layouts/groups/list.php, find and remove this code :
$canInvite = true;
<?php // Invite
if ($isMember) { ?>
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.groupInvite('<?php echo $group->id; ?>')">
<?php echo JText::_('COM_COMMUNITY_INVITE_FRIENDS'); ?>
</a>
<?php } ?>
find and delete this code as well :
<li>
<a href="javascript:" onclick="joms.api.groupInvite('<?php echo $group->id ?>');"><?php echo JText::_('COM_COMMUNITY_INVITE_FRIENDS'); ?></a>
</li>
Hi
Kindly check you have removed this code from components/com_community/templates/jomsocial/layouts/groups/list.php
<li><a href="javascript:" onclick="joms.api.groupInvite('<?php echo $group->id; ?>');"><?php echo JText::_('COM_COMMUNITY_INVITE_FRIENDS'); ?></a></li>
Hi
The FTP details were not working so i remove it from admin panel.
/html/com_community/layouts/groups/list.php" in template "socialize". please check the group list now and give me URL and screenshot if it's still showing, As i checked it no more showing on list pages.
Regards
Hi
File :/components/com_community/templates/jomsocial/layouts/groups/minheader.php
I removed this code
<a href="javascript:" class="joms-focus__button--add"
onclick="joms.api.groupInvite('<?php echo $group->id; ?>')">
<?php echo JText::_('COM_COMMUNITY_INVITE_FRIENDS'); ?>
</a>