Instructions for Integration with Jomsocial v4.x Groups Details view
Â
Â
You can easily replace Jomsocial group Invite link with Invitex's Invite link. To integrate Invitex with Jomsocial group by doing template override, here are the changes that need to be done:
1. Locate and copy this file-
YOUR_JOOMLA/components/com_community/templates/jomsocial/layouts/groups/single.php
2. Paste the copied file into the folder-
YOUR_JOOMLA/templates/YOUR_CURRENT_JOOMLA_TEMPLATE/html/com_community/
3. Open file from above step in a text editor.
4. Comment out Jomsocial Invite button code given below in this file. This code results in the native "Invite" button of Jomsocial. If you do not want to hide it, you can keep it as it is-
<!-- 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>
5. Then add Invitex Invite button code given below-
<?php $invite_url = urlencode(base64_encode('index.php?option=com_community&view=groups&task=viewgroup&groupid=' . $group->id)); $name = $group->name; $link = "index.php?option=com_invitex&view=invites"; require_once JPATH_SITE . '/components/com_invitex/helper.php'; $this->invhelperObj = new cominvitexHelper(); $itemid = $this->invhelperObj->getItemId($link); $link .= "&Itemid=".$itemid; $link = JRoute::_($link); $link .= strpos($link,'?')?"&catch_act=":"?catch_act="; $link.="&invite_type=5&invite_anywhere=1&invite_url=".$invite_url."&tag=[name=".$name."]"; ?> <a href='<?php echo $link; ?>' class="joms-focus__button--add" ><?php echo JText::_('COM_COMMUNITY_INVITE_FRIENDS'); ?></a>
Â
 6. Save file and you are done!
Instructions for Integration with Jomsocial v4.x Groups List view
1. Locate and copy this file-
YOUR_JOOMLA/components/com_community/templates/jomsocial/layouts/groups/list.php
2. Paste the copied file into the folder-
YOUR_JOOMLA/templates/YOUR_CURRENT_JOOMLA_TEMPLATE/html/com_community/
3. Open file from above step in a text editor.
4. Comment out Jomsocial Invite button code given below in this file on line number 117. This code results in the native "Invite" button of Jomsocial. If you do not want to hide it, you can keep it as it is-
<li> <a href="javascript:" onclick="joms.api.groupInvite('<?php echo $group->id; ?>');"><?php echo JText::_('COM_COMMUNITY_INVITE_FRIENDS'); ?></a> </li>
Â
5. Then add Invitex Invite button code given below-
<?php JHtml::_('behavior.modal'); $invite_url = urldecode(base64_encode('index.php?option=com_community&view=groups&task=viewgroup&groupid=' . $group->id)); $name = $group->name; $link = "index.php?option=com_invitex&view=invites&catch_act=&invite_type=5&invite_anywhere=1&invite_url=" . $invite_url . "&tag=[name=" . $name . "]"; ?> <li> <a href='<?php echo $link; ?>'><?php echo JText::_('COM_COMMUNITY_INVITE_FRIENDS'); ?></a> </li>
Â
 6. Save file and you are done!