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.

Switch attendee list off for specific events

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

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

8 years 4 months ago
Licenses:

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


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

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.

8 years 3 months ago
Licenses:

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

to:
<?php if((!$showRequestInvitationButton) AND ($event->id != 250)){ //hide attendees if this is a private event and viewer is not a member of the event?>

Crucial part is: $event->id != 250.
Where 250 is event ID. You need to change it to your event ID.
You'll find it in event URL: i.imgur.com/OxPKZZz.png


- 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 3 months ago
  • Melanie's Avatar
    Topic Author
  • Melanie
  • Offline
  • Fresh Boarder
  • Posts: 94
  • Thank you received: 2
Licenses:
JomSocial Active Socialize Expired

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

8 years 3 months ago
Licenses:

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>

With:
                            <?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 } ?>

So I just wrapped that list item with php condition: display that item ONLY when event ID IS DIFFERENT than 250.

If you'll need this for more than one event you may extend condition:
(($event->id != 250) OR ($event->id != 300))


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

8 years 3 months ago
Licenses:

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>

to
<?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 } ?>


- 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 3 months ago
  • Melanie's Avatar
    Topic Author
  • Melanie
  • Offline
  • Fresh Boarder
  • Posts: 94
  • Thank you received: 2
Licenses:
JomSocial Active Socialize Expired

Hi michal,

I see - I didn't notice that top attendee link - there are 2 on the list then? The one I was referring to is the bottom one - see your image attached with the bottom one highlighted:


I will make those other changes now thank you :)

Mel

Attachments:
8 years 3 months ago
Licenses:

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>

to this;
<?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 } ?>


- 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 3 months ago
  • Melanie's Avatar
    Topic Author
  • Melanie
  • Offline
  • Fresh Boarder
  • Posts: 94
  • Thank you received: 2
Licenses:
JomSocial Active Socialize Expired

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

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