The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
dynamically changing vbulletin permissions/bitfields via a plugin
I want to override permissions using a plugin - specifically for viewing attachments. By default, guests can not view attachments. I know I can set this manually, but would like to do so dynamically.
I think this is the bitfield I need to toggle is: Code:
<bitfields product="vbulletin"> <bitfielddefs> <group name="ugp"> <group name="forumpermissions"> <bitfield name="cangetattachment" group="forum_viewing_permissions" phrase="can_download_attachments" install="2,5,6,7" >4096</bitfield> Code:
$userdata->set_bitfield('forumpermissions','cangetattachment',true); the plugin code will have other conditionals (primarily the forum which the post/attachment resides in ), but the short story is I ultimately want to allow viewing of attachments by anyone. any help appreciated ! Many thanks |
#2
|
||||
|
||||
You can change it at runtime instead (but this may sometimes cause confusion) by modifying the bitfield array in $vbulletin.
|
#3
|
|||
|
|||
Many thanks - in this case the following code seems to work:
Code:
$vbulletin->bf_ugp['forumpermissions']['cangetattachment']=1; |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|