Hi,
I need to hide the Going/Not Going tabs for certain events. I have hidden attendee counts (thanks to guidance provided by Michael here):
www.jomsocial.com/forum/events/33728-hid...ing-the-event#162880
www.jomsocial.com/forum/modules-plugins-...-upgrading-to-latest
I am guessing it is the single.php file that I need to edit? which I have already created in my custom template html folder. I wondered if it was this section of the code:
<div class="joms-sidebar">
<?php if($my->authorise('community.view','events.'.$event->id)){ ?>
<div class="joms-module__wrapper"><?php $this->renderModules( 'js_side_top' ); ?></div>
<div class="joms-module__wrapper--stacked"><?php $this->renderModules('js_side_top_stacked'); ?></div>
<div class="joms-module__wrapper"><?php $this->renderModules( 'js_side_bottom' ); ?></div>
<div class="joms-module__wrapper--stacked"><?php $this->renderModules('js_side_bottom_stacked'); ?></div>
<div class="joms-module__wrapper"><?php $this->renderModules( 'js_events_side_top' ); ?></div>
<div class="joms-module__wrapper--stacked"><?php $this->renderModules('js_events_side_top_stacked'); ?></div>
<div class="joms-module__wrapper">
<div class="joms-tab__bar">
<a href="#joms-event--attend" class="active"><?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND'); ?></a>
<?php if ($maybeCount > 0) { ?>
<a href="#joms-event--maybe"><?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND'); ?></span></a>
<?php } ?>
<?php if ($wontAttendCount > 0) { ?>
<a href="#joms-event--not-attend"><?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND'); ?></span></a>
<?php } ?>
<?php if (($isMine || $isAdmin || $isCommunityAdmin) && count($pendingRequestGuests) > 0) { ?>
<a href="#joms-event--waiting">
<?php echo JText::sprintf('COM_COMMUNITY_EVENTS_INVITATION_REQUEST',count($pendingRequestGuests)); ?>
</a>
<?php } ?>
</div>
Hi Melanie,
To hide that tab you need to remove this code :
<div class="joms-module__wrapper">
<div class="joms-tab__bar">
<a href="#joms-event--attend" class="active"><?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND'); ?></a>
<?php if ($maybeCount > 0) { ?>
<a href="#joms-event--maybe"><?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND'); ?></span></a>
<?php } ?>
<?php if ($wontAttendCount > 0) { ?>
<a href="#joms-event--not-attend"><?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND'); ?></span></a>
<?php } ?>
<?php if (($isMine || $isAdmin || $isCommunityAdmin) && count($pendingRequestGuests) > 0) { ?>
<a href="#joms-event--waiting">
<?php echo JText::sprintf('COM_COMMUNITY_EVENTS_INVITATION_REQUEST',count($pendingRequestGuests)); ?>
</a>
<?php } ?>
</div>
<?php if(!$showRequestInvitationButton){ //hide attendees if this is a private event and viewer is not a member of the event?>
<div id="joms-event--attend" class="joms-tab__content">
<?php if ($eventMembersCount > 0) { ?>
<ul class="joms-list--thumbnail">
<?php foreach($eventMembers as $member) { ?>
<li class="joms-list__item <?php echo CUserHelper::onlineIndicator($member); ?>">
<a href="<?php echo CUrlHelper::userLink($member->id); ?>" class="joms-avatar">
<img src="<?php echo $member->getThumbAvatar(); ?>" alt="<?php echo $member->getDisplayName(); ?>" data-author="<?php echo $member->id; ?>" />
</a>
</li>
<?php } ?>
</ul>
<div class="joms-gap"></div>
<a class="joms-button--link" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_ATTEND ); ?>">
<?php echo JText::_('COM_COMMUNITY_VIEW_ALL') . ' (' . $eventMembersCount . ')'; ?>
</a>
<?php } else {
echo JText::_('COM_COMMUNITY_EVENTS_NO_USER_ATTENDING_MESSAGE');
} ?>
</div>
<?php } ?>
<?php if ($maybeCount > 0) { ?>
<div id="joms-event--maybe" class="joms-tab__content" style="display:none;">
<ul class="joms-list--thumbnail">
<?php foreach($maybeList as $member) { ?>
<li class="joms-list__item <?php echo CUserHelper::onlineIndicator($member); ?>">
<a href="<?php echo CUrlHelper::userLink($member->id); ?>" class="joms-avatar">
<img src="<?php echo $member->getThumbAvatar(); ?>" alt="<?php echo $member->getDisplayName(); ?>" data-author="<?php echo $member->id; ?>" />
</a>
</li>
<?php } ?>
</ul>
<div class="joms-gap"></div>
<a class="joms-button--link" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_MAYBE ); ?>">
<?php echo JText::_('COM_COMMUNITY_VIEW_ALL') . ' (' . $maybeCount . ')'; ?>
</a>
</div>
<?php } ?>
<?php if ($wontAttendCount > 0) { ?>
<div id="joms-event--not-attend" class="joms-tab__content" style="display:none;">
<ul class="joms-list--thumbnail">
<?php foreach($wontAttendList as $member) { ?>
<li class="joms-list__item <?php echo CUserHelper::onlineIndicator($member); ?>">
<a href="<?php echo CUrlHelper::userLink($member->id); ?>" class="joms-avatar">
<img src="<?php echo $member->getThumbAvatar(); ?>" alt="<?php echo $member->getDisplayName(); ?>" data-author="<?php echo $member->id; ?>" />
</a>
</li>
<?php } ?>
</ul>
<div class="joms-gap"></div>
<a class="joms-button--link" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_WONTATTEND ); ?>">
<?php echo JText::_('COM_COMMUNITY_VIEW_ALL') . ' (' . $wontAttendCount . ')'; ?>
</a>
</div>
<?php } ?>
<?php if (($isMine || $isAdmin || $isCommunityAdmin) && count($pendingRequestGuests) > 0) { ?>
<div id="joms-event--waiting" class="joms-tab__content" style="display:none;">
<div class="joms-module__body">
<ul class="joms-list--thumbnail">
<?php foreach($pendingRequestGuests as $member) { ?>
<li class="joms-list__item">
<a href="<?php echo CUrlHelper::userLink($member->id); ?>" class="joms-avatar">
<img src="<?php echo $member->getThumbAvatar(); ?>" alt="<?php echo $member->getDisplayName(); ?>" />
</a>
</li>
<?php } ?>
</ul>
</div>
<div class="joms-gap"></div>
<a class="joms-button--link" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&type='.COMMUNITY_EVENT_STATUS_REQUESTINVITE.'&eventid=' . $event->id);?>">
<?php echo JText::sprintf((CStringHelper::isPlural($unapproved)) ? 'COM_COMMUNITY_EVENTS_PENDING_INVITE_MANY' :'COM_COMMUNITY_EVENTS_PENDING_INVITE' , $unapproved ); ?>
</a>
</div>
<?php } ?>
</div>