View Full Version : Hide some forums from some subnets
vasek
09-23-2009, 01:57 PM
I want to hide some forums from several subnetworks.
Saying hide - I mean do not show them at all, threads too.
And better to hide threads from been found via search, but it's optional.
Is it possible? May be modification?
Thanks a lot!
vasek
10-08-2009, 04:44 PM
any sujestions? :)
Lynne
10-08-2009, 05:35 PM
Do you mean you don't want some usergroups to see them at all? That is done in Forums & Moderators > Forum Permissions > find the forum > selct the usergroup > take away their permissions to see the forum
vasek
10-09-2009, 07:59 PM
Do you mean you don't want some usergroups to see them at all? That is done in Forums & Moderators > Forum Permissions > find the forum > selct the usergroup > take away their permissions to see the forum
no, I mean I got a number of forums for example 10. And I want that 5 of them are viewable only from 10.0.0.0/8 subnet while others are from all subnets.
Lynne
10-09-2009, 09:31 PM
I really have no idea if that would be possible. I've never seen anyone talk about doing that before.
vasek
10-12-2009, 08:06 PM
sigh..
thanks for reply!
Adrian Schneider
10-12-2009, 10:06 PM
Here's an example for the subnet permissions:
global_start function cidr_match($ip, $range)
{
list($subnet, $bits) = explode('/', $range);
$ip = ip2long($ip);
$subnet = ip2long($subnet);
$mask = -1 << (32 - $bits);
$subnet &= $mask;
return $subnet == ($ip & $mask);
}
// deny users who match this
if (!cidr_match($_SERVER['REMOTE_ADDR'], '192.168.12.0/23'))
{
print_no_permission();
}
I can give a full example with forum permissions later this week. Not enough time at the moment.
vasek
10-13-2009, 02:52 PM
cool!
can't check this untill weekend
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.