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 number of attendees of events

8 years 1 week ago
  • Per's Avatar
    Topic Author
  • Per
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Licenses:
JomSocial Active

ISSUE SUMMARY:
Hi,
We would like to have an option tohide the number of attendees on a event, is that possible?
Would be great to have a checkbox to make that choice.

STEPS TO REPLICATE:
1
2
3
4
5
RESULT
EXPECTED RESULT
BROWSER

8 years 1 week ago
Licenses:

Hi, Per.

If you want such a feature, you'll need to post it here and gather voices under it:
uservoice.jomsocial.com/forums/101561-jo...ial-feature-requests

I may serve with a hack that will hide this box permanently... or with some condition but all made in code directly using overrides - no administration panel for this.


- 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
8 years 1 week ago
  • Per's Avatar
    Topic Author
  • Per
  • Offline
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Licenses:
JomSocial Active

Hi,
Ok! Thankyou!

Yes, I would appriciate that help from you!

Best!

8 years 1 week ago
Licenses:

Hi.

Copy this file:

ROOT/components/com_community/templates/jomsocial/layouts/events/single.php

to:

ROOT/templates/your-template/html/com_community/layouts/events (if you don't have those folders - feel free to create them)

Then look for line 423 and remove this:

<div class="joms-module__wrapper">
            <div class="joms-tab__bar">
                <a href="#joms-event--attend" class="active"><?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_ATTEND'); ?></a>
                <?php if ($maybeCount > 0) { ?>
                <a href="#joms-event--maybe"><?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_MAYBE_ATTEND'); ?></span></a>
                <?php } ?>
                <?php if ($wontAttendCount > 0) { ?>
                <a href="#joms-event--not-attend"><?php echo JText::_('COM_COMMUNITY_EVENTS_RSVP_NOT_ATTEND'); ?></span></a>
                <?php } ?>
                <?php if (($isMine || $isAdmin || $isCommunityAdmin) && count($pendingRequestGuests) > 0) { ?>
                <a href="#joms-event--waiting">
                    <?php echo JText::sprintf('COM_COMMUNITY_EVENTS_INVITATION_REQUEST',count($pendingRequestGuests)); ?>
                </a>
                <?php } ?>

            </div>

            <?php if(!$showRequestInvitationButton){ //hide attendees if this is a private event and viewer is not a member of the event?>
            <div id="joms-event--attend" class="joms-tab__content">
                <?php if ($eventMembersCount > 0) { ?>
                <ul class="joms-list--thumbnail">
                    <?php foreach($eventMembers as $member) { ?>
                    <li class="joms-list__item <?php echo CUserHelper::onlineIndicator($member); ?>">
                        <a href="<?php echo CUrlHelper::userLink($member->id); ?>" class="joms-avatar">
                            <img src="<?php echo $member->getThumbAvatar(); ?>" alt="<?php echo $member->getDisplayName(); ?>" data-author="<?php echo $member->id; ?>" />
                        </a>
                    </li>
                    <?php } ?>
                </ul>
                <div class="joms-gap"></div>
                <a class="joms-button--link" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_ATTEND ); ?>">
                    <?php echo JText::_('COM_COMMUNITY_VIEW_ALL') . ' (' . $eventMembersCount . ')'; ?>
                </a>

                <?php } else {
                    echo JText::_('COM_COMMUNITY_EVENTS_NO_USER_ATTENDING_MESSAGE');
                } ?>
            </div>
            <?php } ?>

            <?php if ($maybeCount > 0) { ?>
            <div id="joms-event--maybe" class="joms-tab__content" style="display:none;">
                <ul class="joms-list--thumbnail">
                    <?php foreach($maybeList as $member) { ?>
                    <li class="joms-list__item <?php echo CUserHelper::onlineIndicator($member); ?>">
                        <a href="<?php echo CUrlHelper::userLink($member->id); ?>" class="joms-avatar">
                            <img src="<?php echo $member->getThumbAvatar(); ?>" alt="<?php echo $member->getDisplayName(); ?>" data-author="<?php echo $member->id; ?>" />
                        </a>
                    </li>
                    <?php } ?>
                </ul>
                <div class="joms-gap"></div>
                <a class="joms-button--link" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_MAYBE ); ?>">
                    <?php echo JText::_('COM_COMMUNITY_VIEW_ALL') . ' (' . $maybeCount . ')'; ?>
                </a>
            </div>
            <?php } ?>

            <?php if ($wontAttendCount > 0) { ?>
            <div id="joms-event--not-attend" class="joms-tab__content" style="display:none;">
                <ul class="joms-list--thumbnail">
                    <?php foreach($wontAttendList as $member) { ?>
                    <li class="joms-list__item <?php echo CUserHelper::onlineIndicator($member); ?>">
                        <a href="<?php echo CUrlHelper::userLink($member->id); ?>" class="joms-avatar">
                            <img src="<?php echo $member->getThumbAvatar(); ?>" alt="<?php echo $member->getDisplayName(); ?>" data-author="<?php echo $member->id; ?>" />
                        </a>
                    </li>
                    <?php } ?>
                </ul>
                <div class="joms-gap"></div>
                <a class="joms-button--link" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&eventid=' . $event->id . '&type='.COMMUNITY_EVENT_STATUS_WONTATTEND ); ?>">
                    <?php echo JText::_('COM_COMMUNITY_VIEW_ALL') . ' (' . $wontAttendCount . ')'; ?>
                </a>
            </div>
            <?php } ?>

            <?php if (($isMine || $isAdmin || $isCommunityAdmin) && count($pendingRequestGuests) > 0) { ?>
            <div id="joms-event--waiting" class="joms-tab__content" style="display:none;">
                <div class="joms-module__body">
                    <ul class="joms-list--thumbnail">
                        <?php  foreach($pendingRequestGuests as $member) { ?>
                            <li class="joms-list__item">
                                <a href="<?php echo CUrlHelper::userLink($member->id); ?>" class="joms-avatar">
                                    <img src="<?php echo $member->getThumbAvatar(); ?>" alt="<?php echo $member->getDisplayName(); ?>" />
                                </a>
                            </li>
                        <?php } ?>
                    </ul>
                </div>

                <div class="joms-gap"></div>
                <a class="joms-button--link" href="<?php echo $handler->getFormattedLink('index.php?option=com_community&view=events&task=viewguest&type='.COMMUNITY_EVENT_STATUS_REQUESTINVITE.'&eventid=' . $event->id);?>">
                    <?php echo JText::sprintf((CStringHelper::isPlural($unapproved)) ? 'COM_COMMUNITY_EVENTS_PENDING_INVITE_MANY'    :'COM_COMMUNITY_EVENTS_PENDING_INVITE' , $unapproved ); ?>
                </a>

            </div>
            <?php } ?>
        </div>

This will remove Going, not going and maybe box.

In order to remove number of attendees right under cover, look for line 349 and remove this:
<?php
                //only show to non-attendees
                if($event->ticket && !$isEventGuest) { ?>
                <li class="full">
                <?php
                    if(($event->ticket - $eventMembersCount) > 0 )
                        echo JText::sprintf('COM_COMMUNITY_EVENTS_TICKET_STATS', $event->ticket, $eventMembersCount, ($event->ticket - $eventMembersCount));
                    else
                        echo JText::_("COM_COMMUNITY_EVENTS_NO_SEAT_ERROR");
                ?>
                </li>
            <?php } ?>


- 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
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