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.

Community Groups Module - hide private events

9 years 4 months ago
Licenses:
JomSocial Expired

Hey,

thanks a bunch for all the help already given :D But things keep coming ;)

I got a couple of problems my client wou:ld like to change


1.
The client would like to hide private groups and private events for non-members and non-invited-members.

I found a solution for "com_community/events.list.php" and "com_community/groups.list.php" in the forum:

<?php if(($event->permission != COMMUNITY_PRIVATE_EVENT) || (($event->permission == COMMUNITY_PRIVATE_EVENT) && ($isEventGuest || $isMine || $isAdmin || $isCommunityAdmin))) { ?>

Thats a cool statement but i can not use the variables $isEventGuest, $isMine, $isAdmin, $isCommunityAdmin in the "Community - Events Module" and in the "Community - Groups Module". Can you tell me how to make the modules understand the variables? The modules basically should behave like the "Groups List" and the "Event List" inside the component.


2.
On the startpage/loginpage the "forgot password" and "forgot username" buttons both dont work.

Joomla redirects me to this page permakultur-design.com/j3-forum/index.ph...unity&view=frontpage which then will show the navigation bar that isnt meant to be seen here. So Joomla gets something but still nothing. Any ideas where to check?


Ill keep searching until you reply :)

Cheery, Phil

9 years 4 months ago
Licenses:

Hi. Philipp.

1. That is right, you can't use those variables as module doesn't loads helper with them.
Private groups are not displayed in modules or stream by default (in JomSocial 3.2.1.5).
Private Events are not private in meaning that their content is restricted to attendee only, rather that they belong to private person (not site) ant users need to be accepted to attend.

So if you to prevent displaying those events in module use this:

<?php if(($event->permission != COMMUNITY_PRIVATE_EVENT) { ?>

This should be enough as the rest of statement mean || (or) if event is private && (and) viewing user is attendee, owner, admin [or] super user... and will not work in module.

If you insist to display private events for certain users. You'll need to check if user that currently view it is an event guest.

2. This issue is related with JomSocial redirect plugin. Links work fine when plugin is disabled. I assign developer to chek what is happening.


- 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
The following user(s) said Thank You: CoolPics
9 years 4 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

2. Please you try change jomsocial redirect plugin setting "Override com_user registration" to No

Thank you

9 years 4 months ago
Licenses:
JomSocial Expired

I did, but it doesnt change anything.

Right now i fixed the problem by deactivating the redirect plugin as you said. But if you could have an in depth look that would be highly appreciated :)

The other code was wonderful: <?php if(($event->permission != COMMUNITY_PRIVATE_EVENT) { ?> in order to hide private events in the module.

Now the next problem is that private groups are still shown in the groups list. They should be hidden for non-members too. I thought i could figure it out myself by using a similar code to this: <?php if(($event->permission != COMMUNITY_PRIVATE_EVENT) || (($event->permission == COMMUNITY_PRIVATE_EVENT) && ($isEventGuest || $isMine || $isAdmin || $isCommunityAdmin))) { ?>

But no luck :)

Thank once more!

Phil

9 years 4 months ago
Licenses:
JomSocial Expired

And i just saw that the Events Module now hides all private events, even if i am a member of it.

I think it would be cool if i could load the helper.php for the module too. That way i could modify it the way i want. The parameters are already available, so that should be easy i guess?

I would like to make this code work FOR GROUPS and INSIDE A MODULE: <?php if(($event->permission != COMMUNITY_PRIVATE_EVENT) || (($event->permission == COMMUNITY_PRIVATE_EVENT) && ($isEventGuest || $isMine || $isAdmin || $isCommunityAdmin))) { ?>

That would be awesome!

Thanks you so much, Phil

9 years 4 months ago
  • Dimas Tekad Santosa's Avatar
  • Dimas Tekad Santosa
  • Visitor
  • Thank you received: 0
Licenses:

Hi Philipp,

Regarding the event we will improve it in next mayor package version 4... check my screenshoot for the leaked :)

thank you

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