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