PDA

View Full Version : How to make a non-vb page not accessible to cetrain usergroups?


Mijae
04-08-2003, 12:33 AM
So far, my gallery is for registered members only, which works with this simple code:


<?php
require("global.php");
// unregistered error message
if ($bbuserinfo[userid]==0) {
eval("standarderror(\"".gettemplate("galleryerror")."\");");
}
?>


What I want is only registered members who have activated their account to be able to view them, and those who registered but not activated their account will get a specific error telling them to activate (like galleryerror_activate)

Also, is possible I could use another method: my gallery currently has only 130 images (but most of my site's hits go there), so I would like the first 1-25 images accessible for all registered users who have activated their account, then 26-50 for users with >X posts, then 51-75 with >XX and so on. Would this be possible or it would depend on my gallery script? If this is too much to ask for, I'd be satisfied with the first request ;)

mr e
04-08-2003, 03:37 AM
if ($bbuserinfo['userid'] == 0 or $bbuserinfo['userid'] ==3) {


will make it so if there userid is 0 or 3 (awaiting email conformation) they will get the error

Mijae
04-08-2003, 09:44 AM
Should have figured out that myself, thanks :P

Going to try that out after I clean my PC from viruses :(

Xenon
04-08-2003, 10:23 AM
it's $bbuserinfo['usergroupid'] and not $bbuserinfo['userid'] ;)