I'll split this into a new topic over the next day or so.
The coding of it is not too difficult, providing you don't mind missing out on the ACP side of it (ie. it will be very quick to just put something in the code saying "only allow access if user is from usergroup X" but would take considerably longer to build ACP options for it too).
Would that be suitable?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
What is the ID number of the usergroup you want to allow access? If you go to the usergroup page it should be the ID in the address bar.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
$groupid=10; // ID of group whitch can enter to players database
$us_id=$userdata['user_id']; //ID of the current logged in user
if ($userdata['user_level'] != ADMIN){
$sql = "SELECT group_id,user_id
FROM phpbb_user_group
WHERE group_id=".$groupid." AND user_id=".$us_id;
if( !($result = $db->sql_query($sql)) ){
message_die(GENERAL_ERROR, 'Could not Check for group membership', '', __LINE__, __FILE__, $sql);}
$row = $db->sql_fetchrow($result);
if ($row['user_id']==''){
message_die(GENERAL_ERROR, 'Sorry - You can not access this page.', '', '', '');
}
}
I gave the wrong URL as UQM is currently installed at my test site and the actual user group ID is 10. (That URL was for live forum lol).
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
Thanks battye! I need to do same for Hangman MOD so guess what I'm doing later lol.
Over 50 posts already?! Crikey!
I like the various ranks here - Greenhorn was one (my surname is Green pmsl). First rank at my site is "Screwball virgin". Always causes a laugh and remarks from newbies. lol