Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

Give panel item access to 'Member' but hide from user group 'xyz'

Greetings everyone!

What I would like to achieve is to show a certain menu item to all registered users, i.e. access 'Member', but hide it from all users in a certain custom user group.

We, a gaming community, provide an application form to registered users of our website, so you have to create an account first before you have access to the application form. Once someone has been accepted that person gets added to the "members only" user group. At that point it would be nice to hide the "Application" link from their navigation panel since it's completely redundant for them.

Obviously my problem here is that php-fusion, by default, enables you to grant access to a certain item to a certain user group and by that hide it from the general member group but not the other way round.

I am using v7.00.07

Any help would be greatly appreciated!



/edit title
if(iMEMBER AND !checkgroup("8")) {
echo "You are a member, but not a member of the group with the ID 8. (You are also not a Super-Admin)";

Hi slaughter,

many thanks for the the quick reply!

However, I'm afraid I need a little more guidance for this. Unfortunately I don't have any real knowledge of php, I'm getting better at copypaste jobs though. ;)

I assume for this I should be looking at the site_links.php? Or in my case the site_links_restrict.php which is just a clone of the original script and gets its data from a different table. But I'm not quite sure where exactly I would have to include the code you provided.
Also, I'm not sure I need to echo a message in case of an invalid access since I only intend to hide the site link from the user group, not necessarily restrict access to it.

Again, many thanks!

Well, I thought you want to show the link in an extra panel.
Do you want the link in the navigation panel?
Both, if you want to say so. ;)

I created a second nav panel by cloning the original script, renaming it, creating a new table for it, assigning the new table to the new script and adding it as second nav panel. This one is visible only to registered users while the original nav panel remains unaltered. The code for both panels is exactly the same, aside from the different tables they are referring to.

While the second nav panel should be visible to all registered members, including members in a specific group, the link in question should only be shown to those who are NOT member of said group.
Allow me to give this a gentle bump.

It doesn't have a very high priority but it would be a nice feature.

Best Regards
Try your luck posting this on Mods site. You'll might have a very good answer to this.
Mods Questions belong on the Mods Site.

[Thread Locked]
Thread Information
8 posts
3669 times
Last Post
Last updated on 10 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Craig, afif, Basti, Paperduck