Hi,
We are running some events where we do not want to reveal who is attending until the night of the event. Is there a way of switching off the attendee list for specific events (and switch on again as desired). Ideally a check box with something like make attendee list private (to event creator only) would be ideal. I found another thread which does something similar, but I think it turns the attendee lists off indefinitely for all events:
www.jomsocial.com/forum/events/26608-hid...nde-and-seats#130370
Any help would be most appreciated.
Kind regards
Mel
Hi, Melanie.
I'm sorry but what you need is a customization - implementing new feature (and administration options for it).
You may request feature here:
uservoice.jomsocial.com/forums/101561-jo...ial-feature-requests
Or consider to hire professional developer to help you with this:
www.upwork.com/groups/jomsocial
Removing list definitely is quite easy but implementing switch on/off will be quite complicated (core hack).
Hi Michel,
thanks.
Is it possible just to hide the module that shows who is attending just for one event? I need it on all other events but just not this one. I will also add it as a feature request.
Mel
Update: I just tried to add a new feature request but I get an error message saying I am not allowed to post and your website logs me out.
Hi, Melanie.
Yes, it's possible.
You need to 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 edit file and change line 440:
<?php if(!$showRequestInvitationButton){ //hide attendees if this is a private event and viewer is not a member of the event?>
<?php if((!$showRequestInvitationButton) AND ($event->id != 250)){ //hide attendees if this is a private event and viewer is not a member of the event?>
Hi Michel,
THANKYOU!
It now hides the attendee box for that particular event which is brilliant. I have just one last problem, it still shows on the events list page (see image) and so I can still click on that attendee list and see the members attending. How do I hide it there too?
Mel
Hi, Melanie.
Then you need do nearly the same thing in different file - use the same php condition.
Copy this file:
ROOT/components/com_community/templates/jomsocial/layouts/events/list.php
to:
ROOT/templates/your-template/html/com_community/layouts/events (if you don't have those folders - feel free to create them).
Then replace this (line 232):
<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 if($event->id != 250) { ?>
<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 } ?>
(($event->id != 250) OR ($event->id != 300))
Hi Michal,
thanks. I have made that change but it hasn't removed it from the list, I changed the event id to my own and also cleared cache but list is still accessible. I also notice one final location - just under the events cover it also shows attendee count.
Mel
Hi, Melanie.
I can't access your site backend - so I can't see what changes you've made.
My code works 100%:
i.imgur.com/wPYnGd1.png
:)
Probably you did something wrong... please, check again your code.
As for last place of attendee list:
Edit file single.php (you already created override for it) in line 361:
Change this;
<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 if($event->id != 250) { ?>
<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 } ?>
Hi, Melanie.
Ah, you're right.
Code for attendee list under buttons - list.php line 317:
Change this;
<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 if($event->id != 250) { ?>
<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 } ?>
Hi Michal,
I just figured it out myself thanks to your previous messages, and found it at 317. Its now perfect!
Thank you for all your help with this and I have learnt something good today about the custom html :)
Kind regards
Mel