View Full Version : How do I do this?
Mijae
05-22-2004, 01:26 AM
I have this code:
if ($bbuserinfo['usergroupid'] == '1' or $bbuserinfo['usergroupid'] == '3')
{
eval(print_standard_error('nopermission_gallery')) ;
}
And I want to add another line that will give a registered user with a VALIDATED account another error if his/her post count is below XX. How can I do this?
Mijae
05-22-2004, 08:33 PM
Come on, how hard can it be for you people? :P
Majik?
05-22-2004, 10:44 PM
If you want a different error to be displayed then just add this under that block of code:
if ($bbuserinfo['usergroupid']!='1' AND $bbuserinfo['usergroupid']!='3' AND $bbuserinfo['usergroupid']!='4' AND $bbuserinfo['posts']<69)
{
// Some code or error message here.
}Change the 69 to whatever number of posts.
If you want the same error message to be shown then change this:
if ($bbuserinfo['usergroupid'] == '1' or $bbuserinfo['usergroupid'] == '3')
to this:
if ($bbuserinfo['usergroupid']=='1' OR $bbuserinfo['usergroupid']=='3' OR ($bbuserinfo['usergroupid']!='4' AND $bbuserinfo['posts']<69))
But, if it were me.. I'd just use this (regardless of whether or not guests can post and I wanted the same error message):
if ($bbuserinfo['usergroupid']=='1' OR $bbuserinfo['usergroupid']=='3' OR $bbuserinfo['usergroupid']=='4' OR $bbuserinfo['posts']<69)
Mijae
05-23-2004, 02:13 AM
Thanks! That'll annoy some people who sign up and dont post at my forums :D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.