View Full Version : Group Only Page
infecto
04-04-2004, 11:08 PM
How can I take this code from zachary and use it to now allow people from a certain group to play using. Thanks.
<?php
// ## Error Reporting ##
error_reporting(E_ALL & ~E_NOTICE);
// ## Sets Enviroment ##
define('NO_REGISTER_GLOBALS', 1);
// ## Grabs global.php ##
require_once("./global.php");
if (!$bbuserinfo['userid'])
{
print_no_permission();
}
?>
:surprised:
AN-net
04-04-2004, 11:30 PM
try this:
if($bbuserinfo['usergroup']==idnumbersofgroup)
{
print "hey your in this group";
}
else
{
print "your not in the group that is need";
}
infecto
04-04-2004, 11:49 PM
Yeah but don't I need the actual integration of it into the vbscript?
AN-net
04-04-2004, 11:55 PM
woops i made a mistake above anyways.
just plug this code in there and fill in x with the # of the usergroupid you wish to view that page:
if($bbuserinfo['usergroupid'] == X)
{
print "hey your part of usergroup x";
}
infecto
04-05-2004, 12:05 AM
Yeah that should work great! THanks for the help. But now that I think of it say the page is going to be a gallery any ideas how I could protect the image files from people just typing in the path?
infecto
04-05-2004, 12:10 AM
I should be able to stop people from just typing in example.com/image.jpg through htaccess though if I am not mistaken.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.