Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Hide event attendees counts during the event

7 years 10 months ago
  • Melanie's Avatar
    Topic Author
  • Melanie
  • Offline
  • Fresh Boarder
  • Posts: 94
  • Thank you received: 2
Licenses:
JomSocial Active Socialize Expired

Hi,
We need a way of hiding event attendee accounts for certain events - ideally during event creation. We run a mix of internal events (where we want to keep the event attendee counts) and external events, where we are promoting on behalf of third party companies. They do not book through our site, but instead have an external link to 'usually' eventbrite. A while ago Michal provided a code hack for me to turn off visibility for individual events manually ( www.jomsocial.com/forum/events/31252-swi...-for-specific-events ) and it worked beautifully, but as you can appreciate, to do this for all our external event listings would be an absolute nightmare - particularly now as we are looking to increase tenfold our external event listings.
Is there a way of adding a little tick box that hides the events counts?

I see in the forums there are a lot of requests for this very feature. I will check the voices and if there isn't already a post there, I will create one. But in the short term is there any way of adding something like this?

UPDATE: User voices not working. I am trying to vote on this feature in the User voices and add the following comment (based on above): This is also a problem for us. We need a way of hiding event attendee counts for certain events - ideally during event creation. We run a mix of internal events (where we want to keep the event attendee counts and who is attending details) and external events, where we are promoting on behalf of third party companies. The third party companies do not book through our site, but instead have an external link to 'usually' Eventbrite. So when site visitors see there are no attendees on our listing they are put off and don't bother to register (we have been told this). Ideally when an event is being created there should be an option that allows us to tick a box to say we want to hide attendee counts, hide who is going, and maybe even mark it as an external event with a box to provide a link to the external booking details.

But the vote doesn't work. Nor can I submit my comment - I am guessing this is happening for others too who would like to vote/submit but can't?

7 years 10 months ago
Licenses:

Hi, Melanie.

Adding new feature is a complicated process as you get additional parameter that need to be stored somewhere (db) and then applied to event. So this may require core hack.

Here are possible option:

- hire a developer who will implement this feature for you (fastest)
- post a feature request (slow and uncertain)

I've checked Uservoice and it seems to work fine. however we get few similar reports in lats two weeks so I guess something is wrong with it for regular users. Could you post a printscreen what happens when you try to vote or post a request?


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 10 months ago
  • Melanie's Avatar
    Topic Author
  • Melanie
  • Offline
  • Fresh Boarder
  • Posts: 94
  • Thank you received: 2
Licenses:
JomSocial Active Socialize Expired

Hi Michal,

thanks for response.

1. Can you recommend a developer who could do this quickly?

2. Uservoices - when I am logged in to Jomsocial support, then click on Community then uservices in the text link above the community pages it seems to log me out. When I click on vote, it says you need to log in, the same applies for submitting a comment. So I log in, then have to go through the cylcle all over again only to have to log in again.

An image will only show that when I click on Vote it asks me to login.

Mel

7 years 10 months ago
Licenses:

Hi, Melanie.

1. I could only direct you to developers list here: www.upwork.com/groups/jomsocial

2. I confirm that when you browse to User Voice it log you out... that's strange. indeed.
Try this:

Browse to Uservoice
If you logged out don't log in uservoice but open new tab with our Support Forum and log there.
Then go back to User Voice browser tab and refresh the page.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 10 months ago
  • Melanie's Avatar
    Topic Author
  • Melanie
  • Offline
  • Fresh Boarder
  • Posts: 94
  • Thank you received: 2
Licenses:
JomSocial Active Socialize Expired

Hi Michal,

1. thank you, I shall post a request there for a permanent solution.
2. Yes that worked, I have now voted but still canot comment but that is ok.

Finally, I need to hide attendee details for some urgent events and trying to adapt the original code you gave me. At the moment It has just one event blocked, I am trying to add the other event IDs but when I do I get a blank screen on the event page.

I am changing this current line of code:

<?php if($event->id != 31) { ?>

To this:
($event->id != 31) OR ($event->id != 40)  OR ($event->id != 41) OR ($event->id != 42) OR ($event->id != 43)))){ ?>

Is there anything obvious that I am doing wrong?

Mel

UPDATE: my apologies, I figured that one it was the brackets so it should be:
((((($event->id != 31) OR ($event->id != 40)  OR ($event->id != 41) OR ($event->id != 42) OR ($event->id != 43))))){ ?>

However, unlike 5 months ago, this code no longer has any effect. I also edited the list.php with the same, but in all sections I still see the attendees. Is the latest version of Jomsocial different? Is it a different file now?

7 years 10 months ago
Licenses:

Hi, Melanie.

Too many brackets :)
It should look like this:

<?php if (($event->id != 270) AND ($event->id != 271)) { ?>

Whole if statement should be wrapped in bracket and every expression too. Like on example above.
Also change OR to AND.

In list.php attendees are displayed around line 233.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 9 months ago
  • Melanie's Avatar
    Topic Author
  • Melanie
  • Offline
  • Fresh Boarder
  • Posts: 94
  • Thank you received: 2
Licenses:
JomSocial Active Socialize Expired

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'); ?>"> &nbsp; <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) ) {

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW