Hi Michel,
thanks for the example. I have updated to latest version of Jomsocial and I am adding 2 new events (46 and 47) that require this custom code change you helped me with. However, for some reason it has stopped working (not sure if a change to Jomsocial in the update, or my error. Basically I just added those 2 new event IDs, and it only hides details for one event (43) and displays the counts for all the others. This is my code which I created based on your example (added in single.php and list.php custom files):
(($event->id != 31) AND ($event->id != 39) AND ($event->id != 40) AND ($event->id != 41) AND ($event->id != 42) AND ($event->id != 43) AND ($event->id != 46) AND ($event->id != 47))
In my earlier post you said I had too many brackets, so I have taken some out as per your example but it still has no effect. What are the rules with those brackets?
Should I actually be using OR rather than AND?
Here is a copy of my custom list.php:
<?php
/**
* @copyright (C) 2013 iJoomla, Inc. - All rights reserved.
* @license GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html)
* @author iJoomla.com <[email protected]>
* @url https://www.jomsocial.com/license-agreement
* The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0
* More info at https://www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die();
?>
<script>
function joms_change_filter_type(value) {
var urls = {
<?php
$task = JFactory::getApplication()->input->getCmd('task');
$isMyEventFilter = ($task == 'myevents' || ($task == 'pastevents' && JFactory::getApplication()->input->get('userid')) );
if($task == 'display' || $task == 'myevents'){
?>
all: '<?php echo html_entity_decode(CRoute::_("index.php?option=com_community&view=events&task=displaysort=upcoming")); ?>',
mine: '<?php echo html_entity_decode(CRoute::_("index.php?option=com_community&view=events&task=myevents")); ?>'
<?php
}else{
?>
all: '<?php echo html_entity_decode(CRoute::_("index.php?option=com_community&view=events&task=pastevents&sort=upcoming")); ?>',
mine: '<?php echo html_entity_decode(CRoute::_("index.php?option=com_community&view=events&task=pastevents&userid=" . CFactory::getUser()->id)); ?>'
<?php
}
?>
};
window.location = urls[value] || '?';
}
function joms_change_filter( value, type ) {
var url;
// Category selector.
if ( type === 'category' ) {
if ( value ) {
url = '<?php echo CRoute::_("index.php?option=com_community&view=events&task=display&categoryid=__cat__"); ?>';
url = url.replace( '__cat__', value );
} else {
url = '<?php echo CRoute::_("index.php?option=com_community&view=events&task=display"); ?>';
}
window.location = url;
return;
}
// Filter selector.
// @todo
}
</script>
<?php
// hide this is this is a search page
if(!$isSearch && $task == 'display' && !$groupid){
?>
<div class="joms-sortings">
<select class="joms-select reset-gap" onchange="joms_change_filter(this.value, 'category');">
<option value=""><?php echo JText::_('COM_COMMUNITY_EVENTS_ALL'); ?></option>
<option value="featured_only" <?php echo ($categoryId === 'featured_only') ? 'selected' : '' ; ?>><?php echo JText::_('COM_COMMUNITY_FEATURED'); ?></option>
<?php foreach($availableCategories as $category){ ?>
<option value="<?php echo $category->id ?>"<?php if ($categoryId == $category->id) echo ' selected'; ?>><?php echo JText::_( $this->escape(trim($category->name)) ); ?></option>
<?php } ?>
</select>
</div>
<div class="joms-gap"></div>
<?php } ?>
<?php if ($events) { ?>
<ul class="joms-list--card">
<?php
$my = CFactory::getUser();
$now = new JDate();
for ($i = 0; $i < count($events); $i++) {
$event =& $events[$i];
$isMine = $my->id == $event->creator;
$isAdmin = $event->isAdmin($my->id);
$user = CFactory::getUser($event->creator);
$isPastEvent = $event->getEndDate(false)->toSql() < $now->toSql(true) ? true : false;
$handler = CEventHelper::getHandler( $event );
$memberStatus = $event->getUserStatus($my->id);
$isEventGuest = $event->isMember( $my->id );
$waitingApproval = $event->isPendingApproval($my->id);
$isGroupEvent = $event->type == CEventHelper::GROUP_TYPE;
//check if this event is group event
$isGroup = false;
$privateGroup = false;
if($event->type == 'group' && $event->contentid){
$isGroup = true;
$groupModel = CFactory::getModel('groups');
$groupName = $groupModel->getGroupName($event->contentid);
$groupLink = CRoute::_( 'index.php?option=com_community&view=groups&task=viewgroup&groupid='.$event->contentid);
$privateGroup = $groupModel->needsApproval($event->contentid);
}
// Check if "Feature this" button should be added or not.
$addFeaturedButton = false;
$isFeatured = false;
if ($isCommunityAdmin && $showFeatured) {
$addFeaturedButton = true;
if (in_array($event->id, $featuredList)) {
$isFeatured = true;
}
}
// Check if "Invite friends" and "Settings" buttons should be added or not.
$canInvite = false;
$canEdit = false;
if ($isMine || $isAdmin || $isCommunityAdmin) {
if (!$isPastEvent && CEventHelper::seatsAvailable($event)) {
$canInvite = true;
}
$canEdit = true;
}
$showRequestInvitationButton = false;
if (
($event->permission == COMMUNITY_PRIVATE_EVENT) &&
(!$isEventGuest) &&
(!$waitingApproval) &&
(!$handler->isAllowed()) &&
($memberStatus != COMMUNITY_EVENT_STATUS_ATTEND) &&
($memberStatus != COMMUNITY_EVENT_STATUS_WONTATTEND) &&
($memberStatus != COMMUNITY_EVENT_STATUS_MAYBE) &&
($memberStatus != COMMUNITY_EVENT_STATUS_BLOCKED) &&
($memberStatus != COMMUNITY_EVENT_STATUS_BANNED)
) {
$showRequestInvitationButton = true;
}
?>
<li class="joms-list__item <?php echo $event->permission == 1 ? 'event-private' : 'event-public' ?>">
<div class="joms-list__cover">
<a href="<?php echo $event->getLink(); ?>" >
<?php if (in_array($event->id, $featuredList)) { ?>
<div class="joms-ribbon__wrapper">
<span class="joms-ribbon"><?php echo JText::_('COM_COMMUNITY_FEATURED'); ?></span>
</div>
<?php } ?>
<div class="joms-list__cover-image" style="background-image:url(<?php echo $event->getCover(); ?>);"></div>
</a>
<div class="joms-focus__date cover">
<span><?php echo JText::_( CEventHelper::formatStartDate($event, 'M') ); ?></span>
<span><?php echo JText::_( CEventHelper::formatStartDate($event, 'd') ); ?></span>
</div>
<?php if ($addFeaturedButton || $canInvite || $canEdit) { ?>
<div class="joms-focus__button--options--desktop">
<a class="joms-button--options" data-ui-object="joms-dropdown-button" href="javascript:">
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-cog"/>
</svg>
</a>
<ul class="joms-dropdown">
<?php if ($addFeaturedButton) { ?>
<?php if ($isFeatured) { ?>
<li><a href="javascript:"
onclick="joms.api.eventRemoveFeatured('<?php echo $event->id; ?>');"><?php echo JText::_(
'COM_COMMUNITY_REMOVE_FEATURED'
); ?></a></li>
<?php } else { ?>
<li><a href="javascript:"
onclick="joms.api.eventAddFeatured('<?php echo $event->id; ?>');"><?php echo JText::_(
'COM_COMMUNITY_EVENT_FEATURE'
); ?></a></li>
<?php } ?>
<?php } ?>
<?php if ($canInvite && CEventHelper::seatsAvailable($event)) { ?>
<li><a href="javascript:"
onclick="joms.api.eventInvite('<?php echo $event->id; ?>');"><?php echo JText::_(
'COM_COMMUNITY_INVITE_FRIENDS'
); ?></a></li>
<?php } ?>
<?php if ($canEdit) { ?>
<li><a href="<?php echo CRoute::_(
'index.php?option=com_community&view=events&task=edit&eventid=' . $event->id
); ?>"><?php echo JText::_('COM_COMMUNITY_SETTINGS'); ?></a></li>
<?php } ?>
</ul>
</div>
<?php } ?>
</div>
<div class="joms-list__content">
<?php if($isGroup){ ?>
<h4>
<a href="<?php echo $event->getLink(); ?>">
<?php echo $this->escape(
$event->title
); ?>
</a>
</h4>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-users"/>
</svg>
<a href="<?php echo $groupLink; ?>">
<?php echo $this->escape($groupName); ?>
</a>
<?php } else { ?>
<h4 class="joms-list__title">
<a href="<?php echo $event->getLink(); ?>">
<?php echo $this->escape(
$event->title
); ?>
</a>
</h4>
<?php } ?>
<ul class="joms-list--table">
<?php if(($event->id != 31) AND ($event->id != 39) AND ($event->id != 40) AND ($event->id != 41) AND ($event->id != 42) AND ($event->id != 43) AND ($event->id != 46) AND ($event->id != 47)){ ?>
<li>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-user"/>
</svg>
<a href="<?php echo $event->getGuestLink(
COMMUNITY_EVENT_STATUS_ATTEND
); ?>"><?php $membercount = $event->getMembersCount(COMMUNITY_EVENT_STATUS_ATTEND);
echo JText::sprintf(
(!CStringHelper::isSingular(
$membercount
)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY_NUMBER' : 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_NUMBER',
$membercount
); ?></a>
</li>
<?php } ?>
<?php if($event->showPhotos){ ?>
<li>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-images"/>
</svg>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos&task=display&eventid=' . $event->id); ?>">
<?php echo $event->totalPhotos; ?> <?php echo ($event->totalPhotos == 1) ?
JText::_('COM_COMMUNITY_PHOTOS_COUNT_SINGULAR') : JText::_('COM_COMMUNITY_PHOTOS'); ?>
</a>
</li>
<?php } ?>
<?php if($event->showVideos){ ?>
<li>
<svg class="joms-icon" viewBox="0 0 16 16">F
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-film"/>
</svg>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=videos&task=display&eventid=' . $event->id); ?>"><?php echo $event->totalVideos; ?>
<?php echo ($event->totalVideos == 1) ?
JText::_('COM_COMMUNITY_VIDEOS_COUNT') : JText::_('COM_COMMUNITY_VIDEOS_COUNT_MANY'); ?>
</a>
</li>
<?php } ?>
</ul>
<div class="joms-gap--small"></div>
<div class="joms-list__body">
<?php if( $handler->isAllowed() && !$isPastEvent && CEventHelper::showAttendButton($event)) { ?>
<a href="javascript:" class="joms-button--primary joms-button--small"
onclick="joms.api.eventResponse('<?php echo $event->id; ?>',
['<?php echo COMMUNITY_EVENT_STATUS_ATTEND; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND', true); ?>'],
['<?php echo COMMUNITY_EVENT_STATUS_MAYBE; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND', true); ?>'],
['<?php echo COMMUNITY_EVENT_STATUS_WONTATTEND; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND', true); ?>']);">
<?php if ($event->getMemberStatus($my->id) == COMMUNITY_EVENT_STATUS_ATTEND) { ?>
<span class="joms-icon__attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_MAYBE) { ?>
<span class="joms-icon__maybe-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_WONTATTEND) { ?>
<span class="joms-icon__not-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND'); ?>
<?php } else { ?>
<?php echo JText::_('COM_COMMUNITY_GROUPS_INVITATION_RESPONSE'); ?>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-arrow-down"/>
</svg>
<?php } ?>
</a>
<?php }
?>
<?php if ( !$isPastEvent && CEventHelper::seatsAvailable($event) && ( $event->allowinvite || $event->isAdmin($my->id) || $canInvite ) ) { ?>
<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>
<?php } ?>
<?php if ($showRequestInvitationButton) { ?>
<a href="javascript:" class="joms-focus__button--add joms-button--small" onclick="joms.api.eventJoin('<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_EVENTS_INVITE_REQUEST'); ?></a>
<?php } else if ($waitingApproval) { ?>
<span class="joms-alert--info" style="margin:0;width:auto;"><?php echo JText::_('COM_COMMUNITY_PENDING_APPROVAL'); ?></span>
<?php } ?>
</div>
<div class="joms-gap--small"></div>
<ul class="joms-list--inline">
<?php if ((((($event->id != 31) AND ($event->id != 40) AND ($event->id != 41) AND ($event->id != 42) AND ($event->id != 43))))) { ?>
<li>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-user"/>
</svg>
<a href="<?php echo $event->getGuestLink(
COMMUNITY_EVENT_STATUS_ATTEND
); ?>"><?php $membercount = $event->getMembersCount(COMMUNITY_EVENT_STATUS_ATTEND);
echo JText::sprintf(
(!CStringHelper::isSingular(
$membercount
)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY_NUMBER' : 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_NUMBER',
$membercount
); ?></a>
</li>
<?php } ?>
<?php
if($event->permission == 1 || (isset($privateGroup) && $privateGroup == 1) ){ ?>
<li>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-lock"/>
</svg>
<?php echo JText::_('COM_COMMUNITY_EVENT_PRIVATE'); ?>
</li>
<?php } else { ?>
<li>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-lock"/>
</svg>
<?php echo JText::_('COM_COMMUNITY_GROUPS_OPEN'); ?>
</li>
<?php } ?>
</ul>
</div>
<div class="joms-list__footer joms-padding">
<div class="<?php echo CUserHelper::onlineIndicator($user); ?>">
<a class="joms-avatar" href="<?php echo CUrlHelper::userLink($user->id); ?>"><img src="<?php echo $user->getAvatar(); ?>" alt="avatar" data-author="<?php echo $user->id; ?>" ></a>
</div>
<div class="joms-block">
<?php echo JText::_('COM_COMMUNITY_GROUPS_CREATED_BY'); ?> <a href="<?php echo CUrlHelper::userLink($user->id); ?>"><?php echo $user->getDisplayName();?></a>
</div>
</div>
</li>
<?php } ?>
</ul>
<script>
// window.joms_queue || (window.joms_queue = []);
// window.joms_queue.push(function( $ ) {
// $('.joms-list__cover-image').each(function( index, el ) {
// el = $( el );
// el.data('image') && el.backstretch( el.data('image') );
// });
// });
</script>
<?php } else { ?>
<div class="cEmpty cAlert"><?php echo JText::_('COM_COMMUNITY_EVENTS_NO_EVENTS_ERROR'); ?></div>
<?php } ?>
<?php if (isset($pagination) && $pagination->getPagesLinks() && ($pagination->pagesTotal > 1 || $pagination->total > 1) ) { ?>
<div class="joms-pagination">
<?php echo $pagination->getPagesLinks(); ?>
</div>
<?php } ?>
And here is a copy of my single.php:
<?php
/**
* @copyright (C) 2013 iJoomla, Inc. - All rights reserved.
* @license GNU General Public License, version 2 (http://www.gnu.org/licenses/gpl-2.0.html)
* @author iJoomla.com <
[email protected]>
* @url https://www.jomsocial.com/license-agreement
* The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0
* More info at https://www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die();
$showStream = ($isEventGuest || $isMine || $isAdmin || $isCommunityAdmin || $handler->manageable());
$config = CFactory::getConfig();
$titleLength= $config->get('header_title_length', 60);
$summaryLength = $config->get('header_summary_length', 100);
$enableReporting = false;
if ( $config->get('enablereporting') == 1 && ( $my->id > 0 || $config->get('enableguestreporting') == 1 ) ) {
$enableReporting = true;
}
$isGroupEvent = $event->type == CEventHelper::GROUP_TYPE;
$showRequestInvitationButton = false;
if (
($event->permission == COMMUNITY_PRIVATE_EVENT) &&
(!$isEventGuest) &&
(!$waitingApproval) &&
(!$handler->isAllowed()) &&
($memberStatus != COMMUNITY_EVENT_STATUS_ATTEND) &&
($memberStatus != COMMUNITY_EVENT_STATUS_WONTATTEND) &&
($memberStatus != COMMUNITY_EVENT_STATUS_MAYBE) &&
($memberStatus != COMMUNITY_EVENT_STATUS_BLOCKED)
) {
$showRequestInvitationButton = true;
}
?>
<div class="joms-body">
<!-- focus area -->
<div class="joms-focus">
<div class="joms-focus__cover">
<?php if (in_array($event->id, $featuredList)) { ?>
<div class="joms-ribbon__wrapper">
<span class="joms-ribbon joms-ribbon--full"><?php echo JText::_('COM_COMMUNITY_FEATURED'); ?></span>
</div>
<?php } ?>
<div class="joms-focus__cover-image joms-js--cover-image">
<img src="<?php echo $event->getCover(); ?>" style="width:100%;top:<?php echo $event->coverPostion; ?>" alt="<?php echo $event->title; ?>"
<?php if (!$event->defaultCover && $event->coverAlbum) { ?>
style="width:100%;top:<?php echo $event->coverPostion; ?>;cursor:pointer"
onclick="joms.api.coverClick(<?php echo $event->coverAlbum ?>, <?php echo $event->coverPhoto ?>);"
<?php } else { ?>
style="width:100%;top:<?php echo $event->coverPostion; ?>"
<?php } ?>>
</div>
<div class="joms-focus__cover-image--mobile joms-js--cover-image-mobile"
<?php if (!$event->defaultCover && $event->coverAlbum) { ?>
style="background:url(<?php echo $event->getCover(); ?>) no-repeat center center;cursor:pointer"
onclick="joms.api.coverClick(<?php echo $event->coverAlbum ?>, <?php echo $event->coverPhoto ?>);"
<?php } else { ?>
style="background:url(<?php echo $event->getCover(); ?>) no-repeat center center"
<?php } ?>>
</div>
<div class="joms-focus__header">
<div class="joms-focus__date">
<span><?php echo JText::_( CEventHelper::formatStartDate($event, 'M') ); ?></span>
<span><?php echo JText::_( CEventHelper::formatStartDate($event, 'd') ); ?></span>
</div>
<div class="joms-focus__title">
<h2><?php echo CActivities::truncateComplex($event->title , $titleLength, true); ?></h2>
<div class="joms-focus__header__actions">
<a class="joms-button--viewed nolink" title="<?php echo JText::sprintf( $event->hits > 0 ? 'COM_COMMUNITY_VIDEOS_HITS_COUNT_MANY' : 'COM_COMMUNITY_VIDEOS_HITS_COUNT', $event->hits ); ?>">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-eye"></use>
</svg>
<span><?php echo $event->hits; ?></span>
</a>
<?php if ($config->get('enablesharethis') == 1) { ?>
<a class="joms-button--shared" title="<?php echo JText::_('COM_COMMUNITY_SHARE_THIS'); ?>"
href="javascript:" onclick="joms.api.pageShare('<?php echo CRoute::getExternalURL( 'index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id ); ?>')">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-redo"></use>
</svg>
</a>
<?php } ?>
<?php if ($enableReporting) { ?>
<a class="joms-button--viewed" title="<?php echo JText::_('COM_COMMUNITY_EVENTS_REPORT'); ?>"
href="javascript:" onclick="joms.api.eventReport('<?php echo $event->id; ?>');">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-warning"></use>
</svg>
</a>
<?php } ?>
</div>
<p class="joms-focus__info--desktop">
<?php echo CActivities::truncateComplex($event->summary, $summaryLength, true); ?>
</p>
</div>
<div class="joms-focus__actions__wrapper">
<?php if ($my->id != 0) { ?>
<div class="joms-focus__actions--desktop">
<?php if( $handler->isAllowed() && !$isPastEvent && CEventHelper::showAttendButton($event)) { ?>
<a href="javascript:" class="joms-focus__button--add"
onclick="joms.api.eventResponse('<?php echo $event->id; ?>',
['<?php echo COMMUNITY_EVENT_STATUS_ATTEND; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND', true); ?>'],
['<?php echo COMMUNITY_EVENT_STATUS_MAYBE; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND', true); ?>'],
['<?php echo COMMUNITY_EVENT_STATUS_WONTATTEND; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND', true); ?>']);">
<?php if ($event->getMemberStatus($my->id) == COMMUNITY_EVENT_STATUS_ATTEND) { ?>
<span class="joms-icon__attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_MAYBE) { ?>
<span class="joms-icon__maybe-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_WONTATTEND) { ?>
<span class="joms-icon__not-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND'); ?>
<?php } else { ?>
<?php echo JText::_('COM_COMMUNITY_GROUPS_INVITATION_RESPONSE'); ?>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-arrow-down"/>
</svg>
<?php } ?>
</a>
<?php }elseif($waitingApproval){?>
<a href="javascript:" class="joms-button--primary joms-button--small">
<?php echo JText::_('COM_COMMUNITY_EVENTS_PENDING_INVITATIONS'); ?>
</a>
<?php } ?>
<?php if ( !$isPastEvent && CEventHelper::seatsAvailable($event) && ( $event->allowinvite || $event->isAdmin($my->id) || COwnerHelper::isCommunityAdmin() ) ) { ?>
<a href="javascript:" class="joms-focus__button--add joms-button--secondary" 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>
<?php } ?>
<?php if ($showRequestInvitationButton) { ?>
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.eventJoin('<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_EVENTS_INVITE_REQUEST'); ?></a>
<?php } ?>
</div>
<?php } ?>
<div class="joms-focus__header__actions--desktop">
<a class="joms-button--viewed nolink" title="<?php echo JText::sprintf( $event->hits > 0 ? 'COM_COMMUNITY_VIDEOS_HITS_COUNT_MANY' : 'COM_COMMUNITY_VIDEOS_HITS_COUNT', $event->hits ); ?>">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-eye"></use>
</svg>
<span><?php echo $event->hits; ?></span>
</a>
<?php if ($config->get('enablesharethis') == 1) { ?>
<a class="joms-button--shared" title="<?php echo JText::_('COM_COMMUNITY_SHARE_THIS'); ?>"
href="javascript:" onclick="joms.api.pageShare('<?php echo CRoute::getExternalURL( 'index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id ); ?>')">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-redo"></use>
</svg>
</a>
<?php } ?>
<?php if ($enableReporting) { ?>
<a class="joms-button--viewed" title="<?php echo JText::_('COM_COMMUNITY_EVENTS_REPORT'); ?>"
href="javascript:" onclick="joms.api.eventReport('<?php echo $event->id; ?>');">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-warning"></use>
</svg>
</a>
<?php } ?>
</div>
</div>
</div>
<div class="joms-focus__actions--reposition">
<input type="button" class="joms-button--neutral" data-ui-object="button-cancel" value="<?php echo JText::_('COM_COMMUNITY_CANCEL'); ?>">
<input type="button" class="joms-button--primary" data-ui-object="button-save" value="<?php echo JText::_('COM_COMMUNITY_SAVE'); ?>">
</div>
<?php if ($my->id != 0) { ?>
<div class="joms-focus__button--options--desktop">
<a href="javascript:" data-ui-object="joms-dropdown-button">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-cog"></use>
</svg>
</a>
<!-- No need to populate menus as it is cloned from mobile version. -->
<ul class="joms-dropdown"></ul>
</div>
<?php } ?>
</div>
<div class="joms-focus__actions">
<?php if ($my->id != 0) { ?>
<?php if( $handler->isAllowed() && !$isPastEvent ) { ?>
<a href="javascript:" class="joms-focus__button--add joms-button--small mobile-only-landscape--show "
onclick="joms.api.eventResponse('<?php echo $event->id; ?>',
['<?php echo COMMUNITY_EVENT_STATUS_ATTEND; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND', true); ?>'],
['<?php echo COMMUNITY_EVENT_STATUS_MAYBE; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND', true); ?>'],
['<?php echo COMMUNITY_EVENT_STATUS_WONTATTEND; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND', true); ?>']);">
<?php if ($event->getMemberStatus($my->id) == COMMUNITY_EVENT_STATUS_ATTEND) { ?>
<span class="joms-icon__attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_MAYBE) { ?>
<span class="joms-icon__maybe-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_WONTATTEND) { ?>
<span class="joms-icon__not-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND'); ?>
<?php } else { ?>
<?php echo JText::_('COM_COMMUNITY_GROUPS_INVITATION_RESPONSE'); ?>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-arrow-down"/>
</svg>
<?php } ?>
</a>
<?php }?>
<?php if ( !$isPastEvent && CEventHelper::seatsAvailable($event) && ( $event->allowinvite || $event->isAdmin($my->id) || COwnerHelper::isCommunityAdmin() ) ) { ?>
<a href="javascript:" class="joms-focus__button--add joms-button--secondary" 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>
<?php } ?>
<a class="joms-focus__button--options" data-ui-object="joms-dropdown-button"><?php echo JText::_('COM_COMMUNITY_GROUP_OPTIONS'); ?></a>
<?php } ?>
<ul class="joms-dropdown">
<?php if ($memberStatus != COMMUNITY_EVENT_STATUS_BLOCKED) { ?>
<?php if ($handler->showPrint()) { ?>
<li><a tabindex="-1" href="javascript:void(0)" onclick="window.open('<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=printpopup&eventid='.$event->id); ?>','', 'menubar=no,width=600,height=700,toolbar=no');"><?php echo JText::_('COM_COMMUNITY_EVENTS_PRINT');?></a></li>
<?php } ?>
<?php if( $handler->showExport() && $config->get('eventexportical') ) { ?>
<li><a tabindex="-1" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=export&format=raw&eventid=' . $event->id); ?>" ><?php echo JText::_('COM_COMMUNITY_EVENTS_EXPORT_ICAL');?></a></li>
<?php } ?>
<?php if( (!$isMine) && !($waitingRespond) && (COwnerHelper::isRegisteredUser()) ) { ?>
<li><a tabindex="-1" href="javascript:" onclick="joms.api.eventLeave('<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_EVENTS_IGNORE');?></a></li>
<?php } ?>
<li class="divider"></li>
<?php } ?>
<?php if( $isMine || COwnerHelper::isCommunityAdmin() || $isAdmin ){?>
<?php if(false) { //hide for now ?>
<li><a href="javascript:" onclick="joms.api.avatarChange('event', '<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_CHANGE_AVATAR')?></a></li>
<?php } ?>
<li class="joms-js--menu-reposition joms-hidden--small"<?php echo $event->defaultCover ? ' style="display:none"' : '' ?>><a href="javascript:" data-propagate="1" onclick="joms.api.coverReposition('event', '<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_REPOSITION_COVER')?></a></li>
<li><a href="javascript:" onclick="joms.api.coverChange('event', '<?php echo $event->id; ?>');" ><?php echo JText::_('COM_COMMUNITY_CHANGE_COVER'); ?></a></li>
<li class="joms-js--menu-remove-cover"<?php echo $event->defaultCover ? ' style="display:none"' : '' ?>><a href="javascript:" data-propagate="1" onclick="joms.api.coverRemove('event', <?php echo $event->id; ?>);"><?php echo JText::_('COM_COMMUNITY_REMOVE_COVER'); ?></a></li>
<?php } ?>
<?php
$createPhoto = $my->authorise('community.create', 'events.photos.' . $event->id);
$createVideo = $my->authorise('community.create', 'events.videos.' . $event->id);
?>
<?php // Add photos
if ($createPhoto) { ?>
<li>
<a href="javascript:" data-propagate="1" onclick="joms.api.photoUpload('', '<?php echo $event->id; ?>', 'event');"><?php echo JText::_('COM_COMMUNITY_PHOTOS_UPLOAD_PHOTOS'); ?></a>
</li>
<?php if(!$createVideo){?>
<li class="divider"></li>
<?php } ?>
<?php } ?>
<?php // Add videos
if ($createVideo) { ?>
<li>
<a href="javascript:" data-propagate="1" onclick="joms.api.videoAdd('<?php echo $event->id; ?>', 'event');"><?php echo JText::_('COM_COMMUNITY_VIDEOS_ADD'); ?></a>
</li>
<li class="divider"></li>
<?php } ?>
<!-- event administration -->
<?php if($isMine || $isCommunityAdmin || $isAdmin || $handler->manageable()) { ?>
<?php if( $isMine || $isCommunityAdmin || $isAdmin) {?>
<li><a tabindex="-1" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=edit&eventid=' . $event->id );?>"><?php echo JText::_('COM_COMMUNITY_EVENTS_EDIT');?></a></li>
<?php } ?>
<?php if( ($event->permission != COMMUNITY_PRIVATE_EVENT) && ($isMine || $isCommunityAdmin || $isAdmin) ){ ?>
<li><a tabindex="-1" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=create&eventid=' . $event->id );?>"><?php echo JText::_('COM_COMMUNITY_EVENTS_DUPLICATE');?></a></li>
<?php } ?>
<?php if($totalMembers = count($event->getMembers(COMMUNITY_EVENT_STATUS_BANNED))){ ?>
<li><a tabindex="-1" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&type=8&eventid=' . $event->id );?>"><?php echo JText::_('COM_COMMUNITY_EVENTS_VIEW_BANNED_MEMBERS');?></a></li>
<?php } ?>
<li class="divider"></li>
<?php if($my->authorise('community.delete', 'events.' . $event->id, $event) ) { ?>
<li><a tabindex="-1" class="event-delete" href="javascript:" onclick="joms.api.eventDelete('<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_EVENTS_DELETE'); ?></a></li>
<?php } ?>
<?php } ?>
<?php if( ( $isMine || $isAdmin || $isCommunityAdmin) && ( $unapproved > 0 ) ) { ?>
<li class="divider"></li>
<li>
<a tabindex="-1" 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>
</li>
<?php } ?>
</ul>
</div>
<p class="joms-focus__info">
<?php echo JHTML::_('string.truncate', $this->escape(strip_tags($event->summary)), 100); ?>
</p>
<ul class="joms-focus__link">
<?php if( $handler->isAllowed() && !$isPastEvent ) { ?>
<li class="full mobile-only--show">
<a href="javascript:" class="joms-focus__button--add joms-button--small "
onclick="joms.api.eventResponse('<?php echo $event->id; ?>',
['<?php echo COMMUNITY_EVENT_STATUS_ATTEND; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND', true); ?>'],
['<?php echo COMMUNITY_EVENT_STATUS_MAYBE; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND', true); ?>'],
['<?php echo COMMUNITY_EVENT_STATUS_WONTATTEND; ?>', '<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND', true); ?>']);">
<?php if ($event->getMemberStatus($my->id) == COMMUNITY_EVENT_STATUS_ATTEND) { ?>
<span class="joms-icon__attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_MAYBE) { ?>
<span class="joms-icon__maybe-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_WONTATTEND) { ?>
<span class="joms-icon__not-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND'); ?>
<?php } else { ?>
<?php echo JText::_('COM_COMMUNITY_GROUPS_INVITATION_RESPONSE'); ?>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-arrow-down"/>
</svg>
<?php } ?>
</a>
</li>
<?php }?>
<?php if (($event->id != 31) AND ($event->id != 39) AND ($event->id != 40) AND ($event->id != 41) AND ($event->id != 42) AND ($event->id != 43) AND ($event->id != 46) AND ($event->id != 47)){ ?>
<li class="full"><a href="<?php echo CRoute::_('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_ATTEND )?>"><?php
echo JText::sprintf((CStringHelper::isPlural($eventMembersCount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY':'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $eventMembersCount);
?></a></li><?php } ?>
<?php if(isset($groupEventDetails) && !empty($groupEventDetails->groupName)){ ?>
<li class="full"><?php echo JText::sprintf('COM_COMMUNITY_GROUP_EVENT_HOSTED_BY',$groupEventDetails->groupLink,$groupEventDetails->groupName,CRoute::_('index.php?option=com_community&view=profile&userid=' . $groupEventDetails->creator->id),$groupEventDetails->creator->getDisplayName()) ?></li>
<?php }else{ ?>
<li class="full"><?php echo JText::sprintf('COM_COMMUNITY_EVENT_HOSTED_BY',CRoute::_('index.php?option=com_community&view=profile&userid=' . $creator->id), $creator->getDisplayName()) ?></li>
<?php } ?>
<li class="full">
<a href="javascript:" data-ui-object="joms-dropdown-button">
<?php echo JTEXT::_('COM_COMMUNITY_MORE'); ?>
<svg viewBox="0 0 14 20" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-arrow-down"></use>
</svg>
</a>
<ul class="joms-dropdown more-button">
<?php if($showPhotos){ ?>
<li class="full">
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos&task=display&eventid=' . $event->id); ?>"><?php echo ($totalPhotos == 1) ?
JText::_('COM_COMMUNITY_PHOTOS_COUNT_SINGULAR') . ' <span class="joms-text--light">' . $totalPhotos . '</span>' :
JText::_('COM_COMMUNITY_PHOTOS_COUNT') . ' <span class="joms-text--light">' . $totalPhotos . '</span>' ; ?></a>
</li>
<?php } ?>
<?php if($showVideos){ ?>
<li class="full">
<a href="<?php echo CRoute::_('index.php?option=com_community&view=videos&task=display&eventid=' . $event->id); ?>"><?php echo ($totalVideos == 1) ?
JText::_('COM_COMMUNITY_VIDEOS_COUNT') . ' <span class="joms-text--light">' . $totalVideos . '</span>' :
JText::_('COM_COMMUNITY_VIDEOS_COUNT_MANY') . ' <span class="joms-text--light">' . $totalVideos . '</span>' ; ?></a>
</li>
<?php } ?>
</ul>
</li>
<?php if ($isLikeEnabled) { ?>
<li class="full liked">
<a href="javascript:"
class="joms-js--like-events-<?php echo $event->id; ?><?php echo $isUserLiked > 0 ? ' liked' : ''; ?>"
onclick="joms.api.page<?php echo $isUserLiked > 0 ? 'Unlike' : 'Like' ?>('events', '<?php echo $event->id; ?>');"
data-lang-like="<?php echo JText::_('COM_COMMUNITY_LIKE'); ?>"
data-lang-liked="<?php echo JText::_('COM_COMMUNITY_LIKED'); ?>">
<svg viewBox="0 0 14 20" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-thumbs-up"></use>
</svg>
<span class="joms-js--lang"><?php echo ($isUserLiked > 0) ? JText::_('COM_COMMUNITY_LIKED') : JText::_('COM_COMMUNITY_LIKE'); ?></span>
<span class="joms-text--light"> <?php echo $totalLikes; ?></span>
</a>
</li>
<?php } ?>
</ul>
</div>
<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>
<!-- begin: map -->
<?php if ( $config->get('eventshowmap') && ( $handler->isAllowed() || $event->permission != COMMUNITY_PRIVATE_EVENT ) || $eventSeries && $seriesCount > 1 ) { ?>
<div class="joms-module__wrapper">
<div class="joms-tab__bar">
<a class="active" href="#joms-app--event-map"><?php echo JText::_('COM_COMMUNITY_MAP_LOCATION');?></a>
<?php if ($eventSeries && $seriesCount > 1) { ?>
<a href="#joms-app--event-series"><?php echo JText::_('COM_COMMUNITY_EVENTS_SERIES');?></a>
<?php } ?>
</div>
<div id="joms-app--event-map" class="joms-tab__content">
<?php if ( CMapping::validateAddress($event->location) ) { ?>
<div id="community-event-map" >
<div class="app-box-content event-description">
<!-- begin: dynamic map -->
<?php // echo CMapping::drawMap('event-map', $event->location); ?>
<div id="event-map" style="height:210px;width:100%;">
<?php echo JText::_('COM_COMMUNITY_MAPS_LOADING'); ?>
</div>
<!-- end: dynamic map -->
<div class="joms-text--small"><?php echo CMapping::getFormatedAdd($event->location); ?></div>
</div>
<div class="joms-module__footer">
<a href="http://maps.google.com/?q=<?php echo urlencode($event->location); ?>" target="_blank" class="joms-button--link"><?php echo JText::_('COM_COMMUNITY_EVENTS_FULL_MAP'); ?></a>
</div>
</div>
<script>
(function( w ) {
w.joms_queue || (w.joms_queue = []);
w.joms_queue.push(function() {
var address, container, geocoder;
address = '<?php echo addslashes($event->location); ?>',
container = joms.jQuery('#event-map');
// Delay execution.
setTimeout(function() {
joms.util.map(function() {
geocoder = new google.maps.Geocoder();
geocoder.geocode({ address: address }, function( results, status ) {
var location, center, mapOptions, map, marker;
if (status != google.maps.GeocoderStatus.OK) {
container.html( 'Geocode was not successful for the following reason: ' + status );
return;
}
location = results[0].geometry.location;
center = new google.maps.LatLng( location.lat(), location.lng() );
mapOptions = {
zoom: 14,
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map( container[0], mapOptions );
marker = new google.maps.Marker({
map: map,
position: center
});
});
});
}, 2000 );
});
})( window );
</script>
<?php } ?>
</div>
<?php if ($eventSeries && $seriesCount > 1) { ?>
<div id="joms-app--event-series" class="joms-tab__content" style="display:none;">
<div id="community-event-series">
<?php
$grouplink = '';
if ($event->contentid > 0) {
$grouplink = '&groupid=' . $event->contentid;
}
foreach( $eventSeries as $series ) {
?>
<div class="joms-stream__header no-gap">
<div class="joms-avatar--stream">
<div class="joms-media__calendar">
<?php
$datestr = strtotime($series->getStartDate());
$day = date('d', $datestr);
$month = date('M', $datestr);
$year = date('y', $datestr);
?>
<span class="month"><?php echo JText::_( CEventHelper::formatStartDate($series, 'M') ); ?></span>
<span class="date"><?php echo JText::_( CEventHelper::formatStartDate($series, 'd') ); ?></span>
</div>
</div>
<div class="joms-popover__content">
<p class="reset-gap">
<svg class="joms-icon" viewBox="0 0 14 20">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-calendar"/>
</svg>
<?php echo JText::_( CEventHelper::formatStartDate($series, $config->get('eventdateformat')) ); ?></p>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=events&task=viewguest&eventid=' . $series->id . $grouplink);?>">
<svg class="joms-icon" viewBox="0 0 14 20">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-users"/>
</svg>
<?php echo JText::sprintf((CStringHelper::isPlural($series->confirmedcount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY':'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $series->confirmedcount);?></a>
</div>
</div>
<?php } ?>
<div class="joms-gap"></div>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=events' . $grouplink . '&parent=' . $event->parent);?>" class="joms-button--link"><?php echo JText::_('COM_COMMUNITY_EVENTS_VIEW_SERIES'). '(' . $seriesCount . ')';?></a>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
<!-- end: map -->
<div class="joms-module__wrapper">
<div class="joms-tab__bar">
<?php if ($showPhotos) { ?>
<?php if ($albums) { ?>
<a href="#joms-event--photos" class="active"><?php echo JText::_('COM_COMMUNITY_PHOTOS_PHOTO_ALBUMS'); ?></a>
<?php } ?>
<?php } ?>
<?php if ($showVideos) { ?>
<?php if ($videos) { ?>
<a href="#joms-event--videos"><?php echo JText::_('COM_COMMUNITY_VIDEOS'); ?></a>
<?php } ?>
<?php } ?>
</div>
<?php if ($showPhotos) { ?>
<?php if ($albums) { ?>
<div id="joms-event--photos" class="joms-tab__content">
<ul class="joms-list--photos">
<?php foreach ($albums as $album) { ?>
<li class="joms-list__item">
<a href="<?php echo CRoute::_(
'index.php?option=com_community&view=photos&task=album&albumid=' . $album->id . '&eventid=' . $event->id
); ?>">
<img class="cAvatar cMediaAvatar jomNameTips"
title="<?php echo $this->escape($album->name); ?>"
src="<?php echo $album->getCoverThumbURI(); ?>"
alt="<?php echo $album->getCoverThumbURI(); ?>"/>
</a>
</li>
<?php } ?>
</ul>
<div class="cUpdatesHelper clearfull">
<a href="<?php echo CRoute::_(
'index.php?option=com_community&view=photos&task=display&eventid=' . $event->id
); ?>">
<?php echo JText::_('COM_COMMUNITY_VIEW_ALL_ALBUMS') . ' (' . count($albums) . ')'; ?>
</a>
</div>
</div>
<?php } ?>
<?php } ?>
<?php if ($showVideos) { ?>
<?php if ($videos) { ?>
<div id="joms-event--videos" class="joms-tab__content" style="display:none;">
<ul class="joms-list--videos">
<?php foreach ($videos as $video) { ?>
<li class="joms-list__item">
<a href="<?php echo $video->getURL(); ?>"
title="<?php echo $video->title; ?>">
<img src="<?php echo $video->getThumbnail(); ?>" class="joms-list__cover" alt="<?php echo $video->title; ?>" />
<span class="joms-video__duration"><?php echo $video->getDurationInHMS(); ?></span>
</a>
</li>
<?php } ?>
</ul>
<div class="cUpdatesHelper clearfull">
<a href="<?php echo CRoute::_(
'index.php?option=com_community&view=videos&eventid=' . $event->id
); ?>">
<?php echo JText::_('COM_COMMUNITY_VIDEOS_ALL') . ' (' . $totalVideos . ')'; ?>
</a>
</div>
</div>
<?php } ?>
<?php } ?>
</div>
<div class="joms-module__wrapper"><?php $this->renderModules( 'js_events_side_bottom' ); ?></div>
<div class="joms-module__wrapper--stacked"><?php $this->renderModules('js_events_side_bottom_stacked'); ?></div>
<?php } ?>
</div>
<div class="joms-main">
<div class="joms-middlezone">
<!-- Event Approval -->
<?php if( $waitingApproval == COMMUNITY_EVENT_STATUS_REQUESTINVITE) {?>
<div class="joms-alert--info">
<span><?php echo JText::_('COM_COMMUNITY_EVENTS_APPROVEL_WAITING'); ?></span>
</div>
<?php }?>
<?php if( $isInvited && CEventHelper::seatsAvailable($event)){ ?>
<div id="events-invite-<?php echo $event->id; ?>" class="joms-page joms-js--invitation-notice-event-<?php echo $event->id; ?>">
<div class="cInvite-Content">
<div class="cInvite-Message">
<?php echo JText::sprintf( 'COM_COMMUNITY_EVENTS_YOUR_INVITED', $join ); $test = 1; ?>
</div>
<?php if ($friendsCount) { ?>
<div class="cInvite-Relations">
<?php echo JText::sprintf( (CStringHelper::isPlural($friendsCount)) ? 'COM_COMMUNITY_EVENTS_FRIEND_MANY' : 'COM_COMMUNITY_EVENTS_FRIEND', $friendsCount ); ?>
</div>
<?php } ?>
<div class="cInvite-Actions">
<?php echo JText::_( 'COM_COMMUNITY_EVENTS_RSVP_NOTIFICATION' ) . JText::_('COM_COMMUNITY_OR'); ?>
<a href="javascript:void(0);" onclick="joms.api.invitationReject('event', '<?php echo $event->id; ?>');">
<?php echo JText::_('COM_COMMUNITY_EVENTS_REJECT'); ?>
</a>
</div>
</div>
</div>
<div class="joms-gap"></div>
<?php } ?>
<div class="joms-tab__bar">
<?php if( $showStream ) { ?>
<a href="#joms-event--stream" class="<?php echo ($config->get('default_event_tab') == 0) ? 'active' : ''; ?>">
<?php echo JText::_('COM_COMMUNITY_FRONTPAGE_RECENT_ACTIVITIES');?>
</a>
<?php } ?>
<a href="#joms-event--details" class="<?php echo (!$showStream || $config->get('default_event_tab') == 1) ? 'active' : '' ; ?>">
<?php echo JText::_('COM_COMMUNITY_EVENTS_DETAIL');?>
</a>
</div>
<div class="joms-gap"></div>
<?php if( $showStream ) { ?>
<div id="joms-event--stream" class="joms-tab__content" style="<?php echo (!$showStream || $config->get('default_event_tab') == 1) ? 'display:none;' : '' ; ?>">
<?php
$status->render();
echo $streamHTML;
?>
</div>
<?php } ?>
<div id="joms-event--details" class="joms-tab__content" style="<?php echo ($showStream && $config->get('default_event_tab') == 0) ? 'display:none;' : '' ; ?>">
<ul class="joms-list__row">
<?php if( !CStringHelper::isHTML($event->description) ) {
[code type=php]<?php
/**
* @copyright (C) 2013 iJoomla, Inc. - All rights reserved.
* @license GNU General Public License, version 2 (
www.gnu.org/licenses/gpl-2.0.html
)
* @author iJoomla.com <
This email address is being protected from spambots. You need JavaScript enabled to view it.>
* @url
www.jomsocial.com/license-agreement
* The PHP code portions are distributed under the GPL license. If not otherwise stated, all images, manuals, cascading style sheets, and included JavaScript *are NOT GPL, and are released under the IJOOMLA Proprietary Use License v1.0
* More info at
www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die();
$showStream = ($isEventGuest || $isMine || $isAdmin || $isCommunityAdmin || $handler->manageable());
$config = CFactory::getConfig();
$titleLength= $config->get('header_title_length', 60);
$summaryLength = $config->get('header_summary_length', 100);
$enableReporting = false;
if ( $config->get('enablereporting') == 1 && ( $my->id > 0 || $config->get('enableguestreporting') == 1 ) ) {
$enableReporting = true;
}
$isGroupEvent = $event->type == CEventHelper::GROUP_TYPE;
$showRequestInvitationButton = false;
if (
($event->permission == COMMUNITY_PRIVATE_EVENT) &&
(!$isEventGuest) &&
(!$waitingApproval) &&
(!$handler->isAllowed()) &&
($memberStatus != COMMUNITY_EVENT_STATUS_ATTEND) &&
($memberStatus != COMMUNITY_EVENT_STATUS_WONTATTEND) &&
($memberStatus != COMMUNITY_EVENT_STATUS_MAYBE) &&
($memberStatus != COMMUNITY_EVENT_STATUS_BLOCKED)
) {
$showRequestInvitationButton = true;
}
?>
<div class="joms-body">
<!-- focus area -->
<div class="joms-focus">
<div class="joms-focus__cover">
<?php if (in_array($event->id, $featuredList)) { ?>
<div class="joms-ribbon__wrapper">
<span class="joms-ribbon joms-ribbon--full"><?php echo JText::_('COM_COMMUNITY_FEATURED'); ?></span>
</div>
<?php } ?>
<div class="joms-focus__cover-image joms-js--cover-image">
<img src="<?php echo $event->getCover(); ?>" style="width:100%;top:<?php echo $event->coverPostion; ?>" alt="<?php echo $event->title; ?>"
<?php if (!$event->defaultCover && $event->coverAlbum) { ?>
style="width:100%;top:<?php echo $event->coverPostion; ?>;cursor:pointer"
onclick="joms.api.coverClick(<?php echo $event->coverAlbum ?>, <?php echo $event->coverPhoto ?>);"
<?php } else { ?>
style="width:100%;top:<?php echo $event->coverPostion; ?>"
<?php } ?>>
</div>
<div class="joms-focus__cover-image--mobile joms-js--cover-image-mobile"
<?php if (!$event->defaultCover && $event->coverAlbum) { ?>
style="background:url(<?php echo $event->getCover(); ?>) no-repeat center center;cursor:pointer"
onclick="joms.api.coverClick(<?php echo $event->coverAlbum ?>, <?php echo $event->coverPhoto ?>);"
<?php } else { ?>
style="background:url(<?php echo $event->getCover(); ?>) no-repeat center center"
<?php } ?>>
</div>
<div class="joms-focus__header">
<div class="joms-focus__date">
<span><?php echo JText::_( CEventHelper::formatStartDate($event, 'M') ); ?></span>
<span><?php echo JText::_( CEventHelper::formatStartDate($event, 'd') ); ?></span>
</div>
<div class="joms-focus__title">
<h2><?php echo CActivities::truncateComplex($event->title , $titleLength, true); ?></h2>
<div class="joms-focus__header__actions">
<a class="joms-button--viewed nolink" title="<?php echo JText::sprintf( $event->hits > 0 ? 'COM_COMMUNITY_VIDEOS_HITS_COUNT_MANY' : 'COM_COMMUNITY_VIDEOS_HITS_COUNT', $event->hits ); ?>">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-eye"></use>
</svg>
<span><?php echo $event->hits; ?></span>
</a>
<?php if ($config->get('enablesharethis') == 1) { ?>
<a class="joms-button--shared" title="<?php echo JText::_('COM_COMMUNITY_SHARE_THIS'); ?>"
href="javascript:" onclick="joms.api.pageShare('<?php echo CRoute::getExternalURL( 'index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id ); ?>')">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-redo"></use>
</svg>
</a>
<?php } ?>
<?php if ($enableReporting) { ?>
<a class="joms-button--viewed" title="<?php echo JText::_('COM_COMMUNITY_EVENTS_REPORT'); ?>"
href="javascript:" onclick="joms.api.eventReport('<?php echo $event->id; ?>');">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-warning"></use>
</svg>
</a>
<?php } ?>
</div>
<p class="joms-focus__info--desktop">
<?php echo CActivities::truncateComplex($event->summary, $summaryLength, true); ?>
</p>
</div>
<div class="joms-focus__actions__wrapper">
<?php if ($my->id != 0) { ?>
<div class="joms-focus__actions--desktop">
<?php if( $handler->isAllowed() && !$isPastEvent && CEventHelper::showAttendButton($event)) { ?>
<a href="javascript:" class="joms-focus__button--add"
onclick="joms.api.eventResponse('<?php echo $event->id; ?>',
,
,
);">
<?php if ($event->getMemberStatus($my->id) == COMMUNITY_EVENT_STATUS_ATTEND) { ?>
<span class="joms-icon__attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_MAYBE) { ?>
<span class="joms-icon__maybe-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_WONTATTEND) { ?>
<span class="joms-icon__not-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND'); ?>
<?php } else { ?>
<?php echo JText::_('COM_COMMUNITY_GROUPS_INVITATION_RESPONSE'); ?>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-arrow-down"/>
</svg>
<?php } ?>
</a>
<?php }elseif($waitingApproval){?>
<a href="javascript:" class="joms-button--primary joms-button--small">
<?php echo JText::_('COM_COMMUNITY_EVENTS_PENDING_INVITATIONS'); ?>
</a>
<?php } ?>
<?php if ( !$isPastEvent && CEventHelper::seatsAvailable($event) && ( $event->allowinvite || $event->isAdmin($my->id) || COwnerHelper::isCommunityAdmin() ) ) { ?>
<a href="javascript:" class="joms-focus__button--add joms-button--secondary" 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>
<?php } ?>
<?php if ($showRequestInvitationButton) { ?>
<a href="javascript:" class="joms-focus__button--add" onclick="joms.api.eventJoin('<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_EVENTS_INVITE_REQUEST'); ?></a>
<?php } ?>
</div>
<?php } ?>
<div class="joms-focus__header__actions--desktop">
<a class="joms-button--viewed nolink" title="<?php echo JText::sprintf( $event->hits > 0 ? 'COM_COMMUNITY_VIDEOS_HITS_COUNT_MANY' : 'COM_COMMUNITY_VIDEOS_HITS_COUNT', $event->hits ); ?>">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-eye"></use>
</svg>
<span><?php echo $event->hits; ?></span>
</a>
<?php if ($config->get('enablesharethis') == 1) { ?>
<a class="joms-button--shared" title="<?php echo JText::_('COM_COMMUNITY_SHARE_THIS'); ?>"
href="javascript:" onclick="joms.api.pageShare('<?php echo CRoute::getExternalURL( 'index.php?option=com_community&view=events&task=viewevent&eventid=' . $event->id ); ?>')">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-redo"></use>
</svg>
</a>
<?php } ?>
<?php if ($enableReporting) { ?>
<a class="joms-button--viewed" title="<?php echo JText::_('COM_COMMUNITY_EVENTS_REPORT'); ?>"
href="javascript:" onclick="joms.api.eventReport('<?php echo $event->id; ?>');">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-warning"></use>
</svg>
</a>
<?php } ?>
</div>
</div>
</div>
<div class="joms-focus__actions--reposition">
<input type="button" class="joms-button--neutral" data-ui-object="button-cancel" value="<?php echo JText::_('COM_COMMUNITY_CANCEL'); ?>">
<input type="button" class="joms-button--primary" data-ui-object="button-save" value="<?php echo JText::_('COM_COMMUNITY_SAVE'); ?>">
</div>
<?php if ($my->id != 0) { ?>
<div class="joms-focus__button--options--desktop">
<a href="javascript:" data-ui-object="joms-dropdown-button">
<svg viewBox="0 0 16 16" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-cog"></use>
</svg>
</a>
<!-- No need to populate menus as it is cloned from mobile version. -->
<ul class="joms-dropdown"></ul>
</div>
<?php } ?>
</div>
<div class="joms-focus__actions">
<?php if ($my->id != 0) { ?>
<?php if( $handler->isAllowed() && !$isPastEvent ) { ?>
<a href="javascript:" class="joms-focus__button--add joms-button--small mobile-only-landscape--show "
onclick="joms.api.eventResponse('<?php echo $event->id; ?>',
,
,
);">
<?php if ($event->getMemberStatus($my->id) == COMMUNITY_EVENT_STATUS_ATTEND) { ?>
<span class="joms-icon__attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_MAYBE) { ?>
<span class="joms-icon__maybe-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_WONTATTEND) { ?>
<span class="joms-icon__not-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND'); ?>
<?php } else { ?>
<?php echo JText::_('COM_COMMUNITY_GROUPS_INVITATION_RESPONSE'); ?>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-arrow-down"/>
</svg>
<?php } ?>
</a>
<?php }?>
<?php if ( !$isPastEvent && CEventHelper::seatsAvailable($event) && ( $event->allowinvite || $event->isAdmin($my->id) || COwnerHelper::isCommunityAdmin() ) ) { ?>
<a href="javascript:" class="joms-focus__button--add joms-button--secondary" 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>
<?php } ?>
<a class="joms-focus__button--options" data-ui-object="joms-dropdown-button"><?php echo JText::_('COM_COMMUNITY_GROUP_OPTIONS'); ?></a>
<?php } ?>
<ul class="joms-dropdown">
<?php if ($memberStatus != COMMUNITY_EVENT_STATUS_BLOCKED) { ?>
<?php if ($handler->showPrint()) { ?>
<li><a tabindex="-1" href="javascript:void(0)" onclick="window.open('<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=printpopup&eventid='.$event->id); ?>','', 'menubar=no,width=600,height=700,toolbar=no');"><?php echo JText::_('COM_COMMUNITY_EVENTS_PRINT');?></a></li>
<?php } ?>
<?php if( $handler->showExport() && $config->get('eventexportical') ) { ?>
<li><a tabindex="-1" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=export&format=raw&eventid=' . $event->id); ?>" ><?php echo JText::_('COM_COMMUNITY_EVENTS_EXPORT_ICAL');?></a></li>
<?php } ?>
<?php if( (!$isMine) && !($waitingRespond) && (COwnerHelper::isRegisteredUser()) ) { ?>
<li><a tabindex="-1" href="javascript:" onclick="joms.api.eventLeave('<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_EVENTS_IGNORE');?></a></li>
<?php } ?>
<li class="divider"></li>
<?php } ?>
<?php if( $isMine || COwnerHelper::isCommunityAdmin() || $isAdmin ){?>
<?php if(false) { //hide for now ?>
<li><a href="javascript:" onclick="joms.api.avatarChange('event', '<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_CHANGE_AVATAR')?></a></li>
<?php } ?>
<li class="joms-js--menu-reposition joms-hidden--small"<?php echo $event->defaultCover ? ' style="display:none"' : '' ?>><a href="javascript:" data-propagate="1" onclick="joms.api.coverReposition('event', '<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_REPOSITION_COVER')?></a></li>
<li><a href="javascript:" onclick="joms.api.coverChange('event', '<?php echo $event->id; ?>');" ><?php echo JText::_('COM_COMMUNITY_CHANGE_COVER'); ?></a></li>
<li class="joms-js--menu-remove-cover"<?php echo $event->defaultCover ? ' style="display:none"' : '' ?>><a href="javascript:" data-propagate="1" onclick="joms.api.coverRemove('event', <?php echo $event->id; ?>);"><?php echo JText::_('COM_COMMUNITY_REMOVE_COVER'); ?></a></li>
<?php } ?>
<?php
$createPhoto = $my->authorise('community.create', 'events.photos.' . $event->id);
$createVideo = $my->authorise('community.create', 'events.videos.' . $event->id);
?>
<?php // Add photos
if ($createPhoto) { ?>
<li>
<a href="javascript:" data-propagate="1" onclick="joms.api.photoUpload('', '<?php echo $event->id; ?>', 'event');"><?php echo JText::_('COM_COMMUNITY_PHOTOS_UPLOAD_PHOTOS'); ?></a>
</li>
<?php if(!$createVideo){?>
<li class="divider"></li>
<?php } ?>
<?php } ?>
<?php // Add videos
if ($createVideo) { ?>
<li>
<a href="javascript:" data-propagate="1" onclick="joms.api.videoAdd('<?php echo $event->id; ?>', 'event');"><?php echo JText::_('COM_COMMUNITY_VIDEOS_ADD'); ?></a>
</li>
<li class="divider"></li>
<?php } ?>
<!-- event administration -->
<?php if($isMine || $isCommunityAdmin || $isAdmin || $handler->manageable()) { ?>
<?php if( $isMine || $isCommunityAdmin || $isAdmin) {?>
<li><a tabindex="-1" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=edit&eventid=' . $event->id );?>"><?php echo JText::_('COM_COMMUNITY_EVENTS_EDIT');?></a></li>
<?php } ?>
<?php if( ($event->permission != COMMUNITY_PRIVATE_EVENT) && ($isMine || $isCommunityAdmin || $isAdmin) ){ ?>
<li><a tabindex="-1" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=create&eventid=' . $event->id );?>"><?php echo JText::_('COM_COMMUNITY_EVENTS_DUPLICATE');?></a></li>
<?php } ?>
<?php if($totalMembers = count($event->getMembers(COMMUNITY_EVENT_STATUS_BANNED))){ ?>
<li><a tabindex="-1" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&type=8&eventid=' . $event->id );?>"><?php echo JText::_('COM_COMMUNITY_EVENTS_VIEW_BANNED_MEMBERS');?></a></li>
<?php } ?>
<li class="divider"></li>
<?php if($my->authorise('community.delete', 'events.' . $event->id, $event) ) { ?>
<li><a tabindex="-1" class="event-delete" href="javascript:" onclick="joms.api.eventDelete('<?php echo $event->id; ?>');"><?php echo JText::_('COM_COMMUNITY_EVENTS_DELETE'); ?></a></li>
<?php } ?>
<?php } ?>
<?php if( ( $isMine || $isAdmin || $isCommunityAdmin) && ( $unapproved > 0 ) ) { ?>
<li class="divider"></li>
<li>
<a tabindex="-1" 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>
</li>
<?php } ?>
</ul>
</div>
<p class="joms-focus__info">
<?php echo JHTML::_('string.truncate', $this->escape(strip_tags($event->summary)), 100); ?>
</p>
<ul class="joms-focus__link">
<?php if( $handler->isAllowed() && !$isPastEvent ) { ?>
<li class="full mobile-only--show">
<a href="javascript:" class="joms-focus__button--add joms-button--small "
onclick="joms.api.eventResponse('<?php echo $event->id; ?>',
,
,
);">
<?php if ($event->getMemberStatus($my->id) == COMMUNITY_EVENT_STATUS_ATTEND) { ?>
<span class="joms-icon__attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_MAYBE) { ?>
<span class="joms-icon__maybe-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND'); ?>
<?php } else if ($event->getMemberStatus($my->id) >= COMMUNITY_EVENT_STATUS_WONTATTEND) { ?>
<span class="joms-icon__not-attending"></span>
<?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND'); ?>
<?php } else { ?>
<?php echo JText::_('COM_COMMUNITY_GROUPS_INVITATION_RESPONSE'); ?>
<svg class="joms-icon" viewBox="0 0 16 16">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-arrow-down"/>
</svg>
<?php } ?>
</a>
</li>
<?php }?>
<?php if (($event->id != 31) AND ($event->id != 39) AND ($event->id != 40) AND ($event->id != 41) AND ($event->id != 42) AND ($event->id != 43) AND ($event->id != 46) AND ($event->id != 47)){ ?>
<li class="full"><a href="<?php echo CRoute::_('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_ATTEND )?>"><?php
echo JText::sprintf((CStringHelper::isPlural($eventMembersCount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY':'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $eventMembersCount);
?></a></li><?php } ?>
<?php if(isset($groupEventDetails) && !empty($groupEventDetails->groupName)){ ?>
<li class="full"><?php echo JText::sprintf('COM_COMMUNITY_GROUP_EVENT_HOSTED_BY',$groupEventDetails->groupLink,$groupEventDetails->groupName,CRoute::_('index.php?option=com_community&view=profile&userid=' . $groupEventDetails->creator->id),$groupEventDetails->creator->getDisplayName()) ?></li>
<?php }else{ ?>
<li class="full"><?php echo JText::sprintf('COM_COMMUNITY_EVENT_HOSTED_BY',CRoute::_('index.php?option=com_community&view=profile&userid=' . $creator->id), $creator->getDisplayName()) ?></li>
<?php } ?>
<li class="full">
<a href="javascript:" data-ui-object="joms-dropdown-button">
<?php echo JTEXT::_('COM_COMMUNITY_MORE'); ?>
<svg viewBox="0 0 14 20" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-arrow-down"></use>
</svg>
</a>
<ul class="joms-dropdown more-button">
<?php if($showPhotos){ ?>
<li class="full">
<a href="<?php echo CRoute::_('index.php?option=com_community&view=photos&task=display&eventid=' . $event->id); ?>"><?php echo ($totalPhotos == 1) ?
JText::_('COM_COMMUNITY_PHOTOS_COUNT_SINGULAR') . ' <span class="joms-text--light">' . $totalPhotos . '</span>' :
JText::_('COM_COMMUNITY_PHOTOS_COUNT') . ' <span class="joms-text--light">' . $totalPhotos . '</span>' ; ?></a>
</li>
<?php } ?>
<?php if($showVideos){ ?>
<li class="full">
<a href="<?php echo CRoute::_('index.php?option=com_community&view=videos&task=display&eventid=' . $event->id); ?>"><?php echo ($totalVideos == 1) ?
JText::_('COM_COMMUNITY_VIDEOS_COUNT') . ' <span class="joms-text--light">' . $totalVideos . '</span>' :
JText::_('COM_COMMUNITY_VIDEOS_COUNT_MANY') . ' <span class="joms-text--light">' . $totalVideos . '</span>' ; ?></a>
</li>
<?php } ?>
</ul>
</li>
<?php if ($isLikeEnabled) { ?>
<li class="full liked">
<a href="javascript:"
class="joms-js--like-events-<?php echo $event->id; ?><?php echo $isUserLiked > 0 ? ' liked' : ''; ?>"
onclick="joms.api.page<?php echo $isUserLiked > 0 ? 'Unlike' : 'Like' ?>('events', '<?php echo $event->id; ?>');"
data-lang-like="<?php echo JText::_('COM_COMMUNITY_LIKE'); ?>"
data-lang-liked="<?php echo JText::_('COM_COMMUNITY_LIKED'); ?>">
<svg viewBox="0 0 14 20" class="joms-icon">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-thumbs-up"></use>
</svg>
<span class="joms-js--lang"><?php echo ($isUserLiked > 0) ? JText::_('COM_COMMUNITY_LIKED') : JText::_('COM_COMMUNITY_LIKE'); ?></span>
<span class="joms-text--light"> <?php echo $totalLikes; ?></span>
</a>
</li>
<?php } ?>
</ul>
</div>
<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>
<!-- begin: map -->
<?php if ( $config->get('eventshowmap') && ( $handler->isAllowed() || $event->permission != COMMUNITY_PRIVATE_EVENT ) || $eventSeries && $seriesCount > 1 ) { ?>
<div class="joms-module__wrapper">
<div class="joms-tab__bar">
<a class="active" href="#joms-app--event-map"><?php echo JText::_('COM_COMMUNITY_MAP_LOCATION');?></a>
<?php if ($eventSeries && $seriesCount > 1) { ?>
<a href="#joms-app--event-series"><?php echo JText::_('COM_COMMUNITY_EVENTS_SERIES');?></a>
<?php } ?>
</div>
<div id="joms-app--event-map" class="joms-tab__content">
<?php if ( CMapping::validateAddress($event->location) ) { ?>
<div id="community-event-map" >
<div class="app-box-content event-description">
<!-- begin: dynamic map -->
<?php // echo CMapping::drawMap('event-map', $event->location); ?>
<div id="event-map" style="height:210px;width:100%;">
<?php echo JText::_('COM_COMMUNITY_MAPS_LOADING'); ?>
</div>
<!-- end: dynamic map -->
<div class="joms-text--small"><?php echo CMapping::getFormatedAdd($event->location); ?></div>
</div>
<div class="joms-module__footer">
<a href="
maps.google.com/?q=
<?php echo urlencode($event->location); ?>" target="_blank" class="joms-button--link"><?php echo JText::_('COM_COMMUNITY_EVENTS_FULL_MAP'); ?></a>
</div>
</div>
<script>
(function( w ) {
w.joms_queue || (w.joms_queue = []);
w.joms_queue.push(function() {
var address, container, geocoder;
address = '<?php echo addslashes($event->location); ?>',
container = joms.jQuery('#event-map');
// Delay execution.
setTimeout(function() {
joms.util.map(function() {
geocoder = new google.maps.Geocoder();
geocoder.geocode({ address: address }, function( results, status ) {
var location, center, mapOptions, map, marker;
if (status != google.maps.GeocoderStatus.OK) {
container.html( 'Geocode was not successful for the following reason: ' + status );
return;
}
location = results[0].geometry.location;
center = new google.maps.LatLng( location.lat(), location.lng() );
mapOptions = {
zoom: 14,
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map( container[0], mapOptions );
marker = new google.maps.Marker({
map: map,
position: center
});
});
});
}, 2000 );
});
})( window );
</script>
<?php } ?>
</div>
<?php if ($eventSeries && $seriesCount > 1) { ?>
<div id="joms-app--event-series" class="joms-tab__content" style="display:none;">
<div id="community-event-series">
<?php
$grouplink = '';
if ($event->contentid > 0) {
$grouplink = '&groupid=' . $event->contentid;
}
foreach( $eventSeries as $series ) {
?>
<div class="joms-stream__header no-gap">
<div class="joms-avatar--stream">
<div class="joms-media__calendar">
<?php
$datestr = strtotime($series->getStartDate());
$day = date('d', $datestr);
$month = date('M', $datestr);
$year = date('y', $datestr);
?>
<span class="month"><?php echo JText::_( CEventHelper::formatStartDate($series, 'M') ); ?></span>
<span class="date"><?php echo JText::_( CEventHelper::formatStartDate($series, 'd') ); ?></span>
</div>
</div>
<div class="joms-popover__content">
<p class="reset-gap">
<svg class="joms-icon" viewBox="0 0 14 20">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-calendar"/>
</svg>
<?php echo JText::_( CEventHelper::formatStartDate($series, $config->get('eventdateformat')) ); ?></p>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=events&task=viewguest&eventid=' . $series->id . $grouplink);?>">
<svg class="joms-icon" viewBox="0 0 14 20">
<use xlink:href="<?php echo CRoute::getURI(); ?>#joms-icon-users"/>
</svg>
<?php echo JText::sprintf((CStringHelper::isPlural($series->confirmedcount)) ? 'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT_MANY':'COM_COMMUNITY_EVENTS_ATTANDEE_COUNT', $series->confirmedcount);?></a>
</div>
</div>
<?php } ?>
<div class="joms-gap"></div>
<a href="<?php echo CRoute::_('index.php?option=com_community&view=events' . $grouplink . '&parent=' . $event->parent);?>" class="joms-button--link"><?php echo JText::_('COM_COMMUNITY_EVENTS_VIEW_SERIES'). '(' . $seriesCount . ')';?></a>
</div>
</div>
<?php } ?>
</div>
<?php } ?>
<!-- end: map -->
<div class="joms-module__wrapper">
<div class="joms-tab__bar">
<?php if ($showPhotos) { ?>
<?php if ($albums) { ?>
<a href="#joms-event--photos" class="active"><?php echo JText::_('COM_COMMUNITY_PHOTOS_PHOTO_ALBUMS'); ?></a>
<?php } ?>
<?php } ?>
<?php if ($showVideos) { ?>
<?php if ($videos) { ?>
<a href="#joms-event--videos"><?php echo JText::_('COM_COMMUNITY_VIDEOS'); ?></a>
<?php } ?>
<?php } ?>
</div>
<?php if ($showPhotos) { ?>
<?php if ($albums) { ?>
<div id="joms-event--photos" class="joms-tab__content">
<ul class="joms-list--photos">
<?php foreach ($albums as $album) { ?>
<li class="joms-list__item">
<a href="<?php echo CRoute::_(
'index.php?option=com_community&view=photos&task=album&albumid=' . $album->id . '&eventid=' . $event->id
); ?>">
<img class="cAvatar cMediaAvatar jomNameTips"
title="<?php echo $this->escape($album->name); ?>"
src="<?php echo $album->getCoverThumbURI(); ?>"
alt="<?php echo $album->getCoverThumbURI(); ?>"/>
</a>
</li>
<?php } ?>
</ul>
<div class="cUpdatesHelper clearfull">
<a href="<?php echo CRoute::_(
'index.php?option=com_community&view=photos&task=display&eventid=' . $event->id
); ?>">
<?php echo JText::_('COM_COMMUNITY_VIEW_ALL_ALBUMS') . ' (' . count($albums) . ')'; ?>
</a>
</div>
</div>
<?php } ?>
<?php } ?>
<?php if ($showVideos) { ?>
<?php if ($videos) { ?>
<div id="joms-event--videos" class="joms-tab__content" style="display:none;">
<ul class="joms-list--videos">
<?php foreach ($videos as $video) { ?>
<li class="joms-list__item">
<a href="<?php echo $video->getURL(); ?>"
title="<?php echo $video->title; ?>">
<img src="<?php echo $video->getThumbnail(); ?>" class="joms-list__cover" alt="<?php echo $video->title; ?>" />
<span class="joms-video__duration"><?php echo $video->getDurationInHMS(); ?></span>
</a>
</li>
<?php } ?>
</ul>
<div class="cUpdatesHelper clearfull">
<a href="<?php echo CRoute::_(
'index.php?option=com_community&view=videos&eventid=' . $event->id
); ?>">
<?php echo JText::_('COM_COMMUNITY_VIDEOS_ALL') . ' (' . $totalVideos . ')'; ?>
</a>
</div>
</div>
<?php } ?>
<?php } ?>
</div>
<div class="joms-module__wrapper"><?php $this->renderModules( 'js_events_side_bottom' ); ?></div>
<div class="joms-module__wrapper--stacked"><?php $this->renderModules('js_events_side_bottom_stacked'); ?></div>
<?php } ?>
</div>
<div class="joms-main">
<div class="joms-middlezone">
<!-- Event Approval -->
<?php if( $waitingApproval == COMMUNITY_EVENT_STATUS_REQUESTINVITE) {?>
<div class="joms-alert--info">
<span><?php echo JText::_('COM_COMMUNITY_EVENTS_APPROVEL_WAITING'); ?></span>
</div>
<?php }?>
<?php if( $isInvited && CEventHelper::seatsAvailable($event)){ ?>
<div id="events-invite-<?php echo $event->id; ?>" class="joms-page joms-js--invitation-notice-event-<?php echo $event->id; ?>">
<div class="cInvite-Content">
<div class="cInvite-Message">
<?php echo JText::sprintf( 'COM_COMMUNITY_EVENTS_YOUR_INVITED', $join ); $test = 1; ?>
</div>
<?php if ($friendsCount) { ?>
<div class="cInvite-Relations">
<?php echo JText::sprintf( (CStringHelper::isPlural($friendsCount)) ? 'COM_COMMUNITY_EVENTS_FRIEND_MANY' : 'COM_COMMUNITY_EVENTS_FRIEND', $friendsCount ); ?>
</div>
<?php } ?>
<div class="cInvite-Actions">
<?php echo JText::_( 'COM_COMMUNITY_EVENTS_RSVP_NOTIFICATION' ) . JText::_('COM_COMMUNITY_OR'); ?>
<a href="javascript:void(0);" onclick="joms.api.invitationReject('event', '<?php echo $event->id; ?>');">
<?php echo JText::_('COM_COMMUNITY_EVENTS_REJECT'); ?>
</a>
</div>
</div>
</div>
<div class="joms-gap"></div>
<?php } ?>
<div class="joms-tab__bar">
<?php if( $showStream ) { ?>
<a href="#joms-event--stream" class="<?php echo ($config->get('default_event_tab') == 0) ? 'active' : ''; ?>">
<?php echo JText::_('COM_COMMUNITY_FRONTPAGE_RECENT_ACTIVITIES');?>
</a>
<?php } ?>
<a href="#joms-event--details" class="<?php echo (!$showStream || $config->get('default_event_tab') == 1) ? 'active' : '' ; ?>">
<?php echo JText::_('COM_COMMUNITY_EVENTS_DETAIL');?>
</a>
</div>
<div class="joms-gap"></div>
<?php if( $showStream ) { ?>
<div id="joms-event--stream" class="joms-tab__content" style="<?php echo (!$showStream || $config->get('default_event_tab') == 1) ? 'display:none;' : '' ; ?>">
<?php
$status->render();
echo $streamHTML;
?>
</div>
<?php } ?>
<div id="joms-event--details" class="joms-tab__content" style="<?php echo ($showStream && $config->get('default_event_tab') == 0) ? 'display:none;' : '' ; ?>">
<ul class="joms-list__row">
<?php if( !CStringHelper::isHTML($event->description) ) {