View Full Version : page viewble only by users with xxx posts
hollyboy
03-23-2005, 07:22 AM
Is it possible to set a php integrated into my vB so that only registered users with xxx posts can view it?
After your call to global.php in the script put this if ($bbuserinfo[posts] =<20)
{
print_no_permission();
}
hollyboy
03-23-2005, 07:41 AM
I get error after I added that code I think the "<" is not recognized
Try this (is tired I mixed up the possition)
if ($bbuserinfo[posts] <= 20)
{
print_no_permission();
}
hollyboy
03-23-2005, 08:06 AM
this one worked, thanks dude :)
Is it possible to get a message for the users who can't access the page?
Something like "To view this page u must have more then xxx posts"
Thanks :)
In your phrase manager add new phrase.
Select Front-End Error Messages
notenoughpostsaddin (rename if you wish but make sure you rename in code)
Put the text you wish it to show
Save It
Now change the code I gave you to this
if ($bbuserinfo[posts] <= 20)
{
eval(print_standard_error('error_notenoughpostsadd in'));
}
hollyboy
03-23-2005, 08:33 AM
works great!
thank u very much
No trouble at all glad it is working right :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.