View Full Version : Private Forum Mod or Plug-in Request
MuratCetin
11-20-2005, 11:22 AM
I need a mod or plug-in which can limit forum permissions by member's profile choise. For example, I will create a custom field which name is "Display Private Forums" and value is field6 with checkbox, then if the checkbox true, this user can view private forums which as selected private by admin.
Thanks now for all replies and interests.
Marco van Herwaarden
11-20-2005, 07:22 PM
Why not just use secondary usergroups for this?
MuratCetin
11-21-2005, 09:03 AM
MarcoH64, thank you for your reply. Secondary usergroup seems to be good solution but I want to editable this option by members. If I use secondary usergroups, I must edit members one by one which can able to view private forums.
zappsan
11-21-2005, 01:50 PM
Why don't you just make those groups public so members can join them themselves?
Marco van Herwaarden
11-21-2005, 09:23 PM
Just do like zappsan say, Create a Public Joinable Usergroup, if you want to moderate Join Requests, assign a group Leader.
MuratCetin
11-22-2005, 02:08 PM
Thanks for replies but I have started to writing plug-in.
I created option for 'private_access' (int) value on forum mySQL table and custom field which id is field6 and name is display private forums but it gives an error on search_start hook. Codes are like this:
foreach ($vbulletin->forumcache as $forumid => $foruminfo)
{
if ($foruminfo['private_access'] AND !$vbulletin->userinfo['field6'])
{
$vbulletin->userinfo['forumpermissions'][$forumid] = $vbulletin->userinfo['forumpermissions'][$forumid] ^ $vbulletin->bf_ugp_forumpermissions['canviewthreads'];
}
}
My think is like that, if $foruminfo['private_access'] is true and $vbulletin->userinfo['field6'] (display private forums) is false disable showing private threads on search results. But when I use this code, forum search said that, forum id is invalid. So who can help me for fix this code? If we fix this, I will share this plug-in.
Thanks.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.