Instructions for integration with Jomsocial v4.x Events Details view
You can easily replace Jomsocial group Invite link with Invitex's Invite link. To integrate Invitex with Jomsocial events 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/events/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-
<a href="javascript:" class="joms-focus__button--add joms-button--secondary" onclick="joms.api.eventInvite('<?php echo $event->id; ?>')"> <?php echo JText::_('COM_COMMUNITY_TAB_INVITE'); ?> </a>
5. Then add Invitex Invite button code given below-
<?php $name = $event->title; $invite_url = urlencode(base64_encode('index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id)); $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=4&invite_anywhere=1&invite_url=".$invite_url."&tag=[name=".$name."]"; ?> <a href='<?php echo $link; ?>' class="joms-focus__button--add joms-button--secondary"> <?php echo JText::_('COM_COMMUNITY_TAB_INVITE'); ?></a>
Â
6. Save file and you are done!
Instructions for integration with Jomsocial v4.x Events List View
Â
1. Locate and copy this file-
YOUR_JOOMLA/components/com_community/templates/jomsocial/layouts/events/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 166. 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.eventInvite('<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_INVITE_FRIENDS'); ?> </a> </li>
Â
5. Then add Invitex Invite button code given below-
<?php $name = $event->title; $invite_url = urlencode(base64_encode('index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id)); $link="index.php?option=com_invitex&view=invites&catch_act=&invite_type=4&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. Comment out Jomsocial Invite button code given below in this file on line number 248. 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-
<a href="javascript:" class="joms-button--secondary joms-button--small" onclick="joms.api.eventInvite('<?php echo $event->id; ?>', '<?php echo $isGroupEvent ? "group" : "" ?>')"> <?php echo JText::_($isGroupEvent ? 'COM_COMMUNITY_EVENT_INVITE_GROUP_MEMBERS' : 'COM_COMMUNITY_TAB_INVITE'); ?> </a>
Â
7. Then add Invitex Invite button code given below-
<?php $name = $event->title; $invite_url = urlencode(base64_encode('index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id)); $link="index.php?option=com_invitex&view=invites&catch_act=&invite_type=4&invite_anywhere=1&invite_url=" . $invite_url . "&tag=[name=" . $name . "]"; ?> <a href='<?php echo $link; ?>' class="joms-focus__button--add joms-button--secondary"> <?php echo JText::_('COM_COMMUNITY_TAB_INVITE'); ?></a>
Â
8. Save file and you are done!
Instructions for integration with Jomsocial v3.x Events
To integrate Invitex with Jomsocial Event, here are the changes to be done:
1. Locate and copy this file-
YOUR_JOOMLA/components/com_community/templates/jomsocial/layouts/events/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-
<a href="javascript:" class="joms-focus__button--add joms-button--secondary" onclick="joms.api.eventInvite('<?php echo $event->id; ?>')"> <?php echo JText::_('COM_COMMUNITY_TAB_INVITE'); ?> </a>
5. Then add Invitex Invite button code given below-Â
<?php $name = $event->title; $invite_url = urlencode(base64_encode('index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id)); $link="index.php?option=com_invitex&view=invites&catch_act=&invite_type=4&invite_anywhere=1&invite_url=" . $invite_url . "&tag=[name=" . $name . "]"; ?> <a href='<?php echo $link;?>' class="joms-focus__button--add joms-button--secondary"> <?php echo JText::_('COM_COMMUNITY_TAB_INVITE'); ?></a>
6. Save file and you are done!Â