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.
Not a member yet? Click here to register.
Forgot Password?

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

Locked Asked Modified Viewed 4,041 times
P
Paperduck
P
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
asked
Newbie

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!

Cheers

Ducky

/edit title
Edited by Paperduck on 11-03-2010 09:28,
0 replies

7 posts

B
Basti
B
Basti 10
[PHP-Fusion Crew Member & Admin from June 2008 - December 2010]

http://basti2web.de - Support Site for my infusions
  • Veteran Member, joined since
  • Contributed 1,099 posts on the community forums.
  • Started 32 threads in the forums
answered
Veteran Member

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)";
}
0 replies
P
Paperduck
P
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

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!

Ducky
0 replies
B
Basti
B
Basti 10
[PHP-Fusion Crew Member & Admin from June 2008 - December 2010]

http://basti2web.de - Support Site for my infusions
  • Veteran Member, joined since
  • Contributed 1,099 posts on the community forums.
  • Started 32 threads in the forums
answered
Veteran Member

Well, I thought you want to show the link in an extra panel.
Do you want the link in the navigation panel?
0 replies
P
Paperduck
P
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

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.
Edited by Paperduck on 03-03-2010 18:47,
0 replies
P
Paperduck
P
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions
answered
Newbie

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
0 replies
A
afif
A
afif 10
  • Member, joined since
  • Contributed 183 posts on the community forums.
  • Started 12 threads in the forums
answered
Member

Try your luck posting this on Mods site. You'll might have a very good answer to this.
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Mods Questions belong on the Mods Site.

[Thread Locked]
0 replies

Category Forum

User Administration - 8

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
A
A
afif 10
  • Member, joined since
  • Contributed 183 posts on the community forums.
  • Started 12 threads in the forums
B
B
Basti 10
[PHP-Fusion Crew Member & Admin from June 2008 - December 2010]

http://basti2web.de - Support Site for my infusions
  • Veteran Member, joined since
  • Contributed 1,099 posts on the community forums.
  • Started 32 threads in the forums
P
P
  • Newbie, joined since
  • Contributed 4 posts on the community forums.
  • Started 1 thread in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet