PDA


View Full Version : How to setup a condition statement based on permissions?


JohnBee
05-10-2005, 02:26 PM
On my homepage, I have put up a 3 column top 5 forum display system
there are 3 individual forums where I am pulling my lastest thread topics
from:

1) General forum (all others eccept 2 & 3).
2) News discussion forum.
3) Technical Support section.

They all look and feel just as I would want them however the method I am
using to pull forum data into the front page does not allow me to filter out
user permission as as I would normally do within vBa so its easy for users with
insufficient permissions to see thread topics from say the administration
forums.

I would like to setup a condition where

if $usergroup 6 then $topthreads1 else $topthreads2

Can someone help me write the proper line to accomplish this?


PS. this goes in my vBa templates in a module called TOP THREADS
thanks in advance for your help (im almost done my masterpiece! pics to come) :)

Brian
05-10-2005, 02:36 PM
if ($bbuserinfo['usergroupid'] == 6)
{
$forums = 'X, Y, Z';
}
else
{
$forums = 'Y, Z';
}

Something like that?

JohnBee
05-10-2005, 02:37 PM
Lemme try that out :)