By Uwe Sunkel on Thursday, 26 October 2017
Posted in Technical Issues
Replies 8
Likes 0
Views 633
Votes 0
Hi,

I have deactivated access to eg. groups and events for one of our profile-types (basic). However the menu items for groups and events show in the toolbar (Timeline | About | Friends | Follower | Groups | Events | Pages). When a basic user clicks on one of the "forbidden" links he is redirected to the frontpage and sees the error message "It is not allowed to see this resource". This is not very nice.

So I can see two options to solve this:


  1. we hide the menu items in the toolbar which are not allowed
  2. we redirect the basic user to a page where he can see a message like "This option is only allowed for Premium users. Please upgrade to use this option"


Also I need to hide the part "Statistics" for basic users.

How can I achieve either of these options?

Regards,
Uwe
I think hide that menu item is better, perhaps you can create a basic user account access to us so I can try what we can suggest you on this situation?

And provide us some of the screenshot which menu you referring.
·
Thursday, 26 October 2017 16:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Arlex,

I have added the screenshot and user details for you.

Thanks,
Uwe
·
Thursday, 26 October 2017 16:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Actually this error (It is not allowed to see this resource) throw by Joomla is because all those link return you these error is because these link contain this `prime-net` menu alias and this menu only set to special user can able to access it.

Currently that was not possible to hide this from the existing setting unless you hack on the Easysocial core file so that those user whoever have the permission to access it, it will appear these thing on the page.

Having said that, if you require us to perform the customization for you, you can always request for a quote from us at https://crm.stackideas.com and select "Customizations" . Our sales person would be glad to send you a quote for the customizations that you have requested.
·
Thursday, 26 October 2017 17:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Let me challenge this for a second ;-)

By adding this code

$myProfile = $this->my->getProfile()->id;
// ACL defintions
$basic = false;
$premium = false;
// Basic (profile type is "basic")
if ($myProfile == 1) {
$basic = true;
}

// Premium (profile type is "premium")
if ($myProfile == 5) {
$premium = true;
}

to any view file and then put eg.

<?php if($premium): ?>

in front of the items which are displayed by default it is easily possible to hide information based on the profile-type.

So bottom line I only need to know which file is responsible for displaying this information and then I can help myself by creating a custom override. Can you please navigate me to the right file(s)?
·
Thursday, 26 October 2017 17:51
·
0 Likes
·
0 Votes
·
0 Comments
·
You can modify on these following file

JoomlaFolder/components/com_easysocial/themes/wireframe/helpers/cover/user.php
JoomlaFolder/components/com_easysocial/themes/wireframe/profile/default/default.php
·
Thursday, 26 October 2017 18:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Great! That works perfectly well for the toolbar. But the statistics block on the left side (see screenshot) seems not to be in default.php. Could you please check if this is the correct file?

Basically it would be best to hide any menu on the left side for the respective user group.
·
Thursday, 26 October 2017 18:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Try this file.

JoomlaFolder/components/com_easysocial/themes/wireframe/profile/about/stats.php
·
Thursday, 26 October 2017 18:50
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post