By J. Marvin on Thursday, 08 December 2016
Posted in Groups
Replies 9
Likes 0
Views 548
Votes 0
Is it possible to have "EasySocial Events" module only show events for groups which the user is registered to?

(Currently, it displays all events, then gives a permission warning when selecting event to view.)
Hi there,

You can set your "Filter Type" for you event module to "User Events (Only display events from current logged in user)" as shown http://screencast.com/t/9xn2Hs5Ys2. Please give it a try and see how it goes
·
Friday, 09 December 2016 12:08
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello, thank you for your reply.

Unfortunately, your suggestion does not work. When I add the filter as suggested, no group events are displayed at all. This includes no group events displayed from "open" groups as well as no group events displayed from groups to which the user is a member.

Do you have any other suggestions?
·
Friday, 09 December 2016 15:20
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

As suggested, it only can be used if you "joined" group/events only. It will show you all event/group your "joined" and will not shown any of open group/event you not joined. May i know which user you faced this problems? Maybe he/she is not one of the member for one of your group/member. Maybe you can provide us with your backend, ftp access and user credentials on which you faced this kind of problems for further check on this issues. Please advice.
·
Friday, 09 December 2016 15:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Abdul,

Thank you again for your response.

I did not see the indication that users would only be able to see events to which they are "joined" or registered.

I do not want to show group events of which the user is not a group member. I have created events for group members which non-group members are not allowed or invited to attend. Therefore I would like for them to not see the events which are not available to them (events from groups they are not a member of). Is this possible?

Yes, I can supply access information to the site. However, if I understand correctly, the functionality I am requesting is not available. Therefore, I would like to know if there is another possible solution?

1. Perhaps all group members can be automatically registered to attend all events for the groups of which they are a member of?

2. Perhaps I can add custom code to check if user is a member of the group before displaying the group event?

(mod_easysocial_events.php)

Perhaps something similar to this...??

foreach($events as $event) {
//if (($this->isGroupEvent() && !$this->getGroup()->isMember())) {
$eventIds[] = $event->id;
//}
}


Thank you for your suggestions and assistance. Attached is access information to the dev site.
·
Friday, 09 December 2016 23:09
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

The suggestion which my colleague provided earlier allows the module to display only events the user is attending regardless if it is a group event or not. Does it not work for you? What is the privacy of the group?

Regarding your hack, that would be viable as well but there is a problem with your limit settings because if the limit is set to 5, and only 5 events are retrieved but only 1 of it is a group event, then you only get to see 1 event.
·
Saturday, 10 December 2016 18:36
·
0 Likes
·
0 Votes
·
0 Comments
·
My groups are "closed" groups. We do not need event registration, so they will not select if they are attending. The only way I could get it to work that way is if everyone in the group was automatically set to attend every event in the groups they are in. This does not appear to be an option.

Regarding my hack, something like this instead...?

// if (($this->isGroupEvent() && !$this->getGroup()->isMember())) {
// } else {
$eventIds[] = $event->id;
// }

I just copied this code from the groups module but it does not work correctly ("$this out of context...").

I will have many group events but it is important that only group members may see the events of their group. I will also need to hack other modules such as the calendar. Do you think I am doing this in the easiest or simplest manner?

Thanks again for your help and advice!
·
Sunday, 11 December 2016 01:34
·
0 Likes
·
0 Votes
·
0 Comments
·
You can't just copy these codes directly to the module because the keyword $this refers to the current group being viewed. In your module, you probably want to hack the $groups resultset.
·
Sunday, 11 December 2016 15:35
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post