Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
floppydrivez
Involved
Involved


Joined: Feb 26, 2006
Posts: 340
Location: Jackson, Mississippi

PostPosted: Sat Apr 14, 2007 2:40 pm Reply with quote

For instance I have a sql query on my front page for topics with 0 replies, atm its only set to show to admins, but that is not very useful seeing as moderators are usually not.

So instead of
Code:
is_admin($admin)


What am I looking for?
 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
evaders99
Former Moderator in Good Standing


Joined: Apr 30, 2004
Posts: 3221

PostPosted: Sun Apr 15, 2007 12:01 am Reply with quote

I think you're looking for
Code:


($userdata['user_level'] == ADMIN)


Of course, $userdata has to be defined.. I believe it is only used within the Forums. But try it and see Smile

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
floppydrivez
PostPosted: Sun Apr 15, 2007 7:04 am Reply with quote

user_level is from the users table which is defined by an interger value from what you set in the forums user permissions panel.

ADMIN = 2
MOD = 3 <-- I think

So
Code:
($userdata['user_level'] == 2) || ($userdata['user_level'] == 3)


Should work. I will post back the final when I sort it out.

Thanks evaders99


Last edited by floppydrivez on Sun Apr 15, 2007 12:45 pm; edited 3 times in total 
floppydrivez
PostPosted: Sun Apr 15, 2007 7:28 am Reply with quote

Was my final

Code:
 if(($userinfo[user_level] == 2) || ($userinfo[user_levl] == 3)){


$userinfo was predefined so no use in recreating the wheel so to speak.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©