Quote:
Originally Posted by deem0n
yes, it can be a way.
Question is how link the level of user and userGroup?
|
You will need to assign users to the usergroup, either manually through the admin control panel or through some custom script that gets info from...well, somewhere. I guess it depends on how the levels are decided. I understand (though have never used myself) that the vb payment API allows group assignment based on payment.
Quote:
PHP Code:
if (!($permissions['forumpermissions'] & $vbulletin->bf_ugp_forumpermissions['canview']))
My though is:
add new permision to forum (for example levelpermision) and checking in hook if current user can access to forum.
If no set one of prev variable for make 'no_permission' effect.
so, can I add permission to forum?
|
All the forum permission stuff in VB is usergroup based, so adding a new permission means you still have to use the usergroup stuff. In addition, the forumpermissions are things like
"can create thread"
"can vew posts"
"can edit other peoples posts"
In other words the forumpermissions are generic things which are then set on individual forums via the usergroups. They are NOT specific things like
"can be viewed by silver"
Code:
mysql> select * from forumpermission limit 5;
+-------------------+---------+-------------+------------------+
| forumpermissionid | forumid | usergroupid | forumpermissions |
+-------------------+---------+-------------+------------------+
| 174 | 2695 | 2 | 528391 |
| 76 | 668 | 10 | 0 |
| 75 | 135 | 10 | 0 |
| 74 | 2 | 10 | 716815 |
| 171 | 353 | 8 | 0 |
+-------------------+---------+-------------+------------------+
5 rows in set (0.01 sec)
As you can see from my forupermission table, each form has a set of permissions based on usergroup.