What I could say these solutions should work with 2.2 as much as any other previous 2.x version. I've just tried them with my local version and everything works. The only thing you need to carry on is to enable
$startPageModern=FALSE; dynamically if the user is not logged in. I've fixed the code above.
The only difference is in HTML code provided in my post #13 above, I have fixed that too.
Extra restrictions: it should work by the following code:
$clForums=array(1,2,3,4,5,6,7,8,9);
$clForumsUsers=array();
foreach($clForums as $k) $clForumsUsers[$k]=array();
$clForumsUsers[2]=array(2);
i.e. you should not define $clForums twice.
Then addition to the code above will be (pasted in lang.pack):
if(!isset($clForums)) $clForums=array();
if(isset($user_id) and $user_id!=0) {
foreach($clForums as $k) {
if(sizeof($clForumsUsers[$k])==0 and !in_array($user_id, $clForumsUsers[$k])) $clForumsUsers[$k][]=$user_id;
}
}
else $startPageModern=FALSE;
I tested it on my side and it 100% works.
Anyway... these solutions appear to me like you are trying to use a can opener for closing the can. We are creating the thing which is opened from everybody - you are trying to close it from everybody instead of choosing the thing which is already created for such goal. Strange world.