User group based IF statement?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Sisem
Registered User
Posts: 121
Joined: Fri May 25, 2007 11:52 am

User group based IF statement?

Post by Sisem »

Hi

Just a quick one I hope.

Like there is a (IF USER_LOGGED_IN) type statement to hide certain items on the page when a user is not logged in, is there a way of using a IF statement to specify user group based decisions.

Like having a (IF USER_GROUP = admin) for example.

I'm thinking of having a chatbox type page on my site but just viewable for members of the admin group, and so any other members cannot even see there is that page on the site or view the content. So would be great to just add a simple IF statement around the page link on the site menu header and on the content of that page in case someone stumbles accross the page.

Thanks.

Nick
Last edited by ric323 on Tue Dec 02, 2008 7:50 am, edited 2 times in total.
Reason: Topic icon changed
User avatar
RMcGirr83
Former Team Member
Posts: 21586
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: User group based IF statement?

Post by RMcGirr83 »

Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Sisem
Registered User
Posts: 121
Joined: Fri May 25, 2007 11:52 am

Re: User group based IF statement?

Post by Sisem »

Thank you very much. :)

Nick
User avatar
RMcGirr83
Former Team Member
Posts: 21586
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: User group based IF statement?

Post by RMcGirr83 »

If you want a simpler solution the correct switch would be this

Code: Select all

<!-- IF U_ACP -->
for just admin eyes.
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Sisem
Registered User
Posts: 121
Joined: Fri May 25, 2007 11:52 am

Re: User group based IF statement?

Post by Sisem »

Would U_MCP work for just moderators the same way?

Nick
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51579
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: User group based IF statement?

Post by stevemaury »

Yep.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Sisem
Registered User
Posts: 121
Joined: Fri May 25, 2007 11:52 am

Re: User group based IF statement?

Post by Sisem »

Stunning.

Thanks!

Nick
Locked

Return to “[3.0.x] Support Forum”