The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
bitfield problems.
I assure you I have searched high and low to a solution to this before I posted. Anyone that can shed light on this would be appreciated.
I have the following: Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <bitfields product="item_shop"> <bitfielddefs> <group name="ugp"> <group name="shop_item_settings"> <bitfield name="shop_invent_size" group="shop_usergroup_options" phrase="shop_inventory_size" intperm="true" >1</bitfield> <bitfield name="shop_pbit_size" group="shop_usergroup_options" phrase="shop_pbit_size" intperm="true" >1</bitfield> </group> </group> </bitfielddefs> </bitfields> However, when I try to access it in code using: Code:
$visibleallowed = $vbulletin->bf_ugp_shop_item_settings['shop_pbit_size']; $inventoryallowed = $vbulletin->bf_ugp_shop_item_settings['shop_invent_size']; var_dump($vbulletin->bf_ugp_shop_item_settings); brings back NULL; var_dump($vbulletin->bf_ugp); brings back Code:
array(8) { ["forumpermissions"]=> &array(20) { ["canview"]=> int(1) ["canviewthreads"]=> int(524288) ["canviewothers"]=> int(2) ["cansearch"]=> int(4) ["canemail"]=> int(8) ["canpostnew"]=> int(16) ["canreplyown"]=> int(32) ["canreplyothers"]=> int(64) ["caneditpost"]=> int(128) ["candeletepost"]=> int(256) ["candeletethread"]=> int(512) ["canopenclose"]=> int(1024) ["canmove"]=> int(2048) ["cangetattachment"]=> int(4096) ["canpostattachment"]=> int(8192) ["canpostpoll"]=> int(16384) ["canvote"]=> int(32768) ["canthreadrate"]=> int(65536) ["followforummoderation"]=> int(131072) ["canseedelnotice"]=> int(262144) } ["pmpermissions"]=> &array(3) { ["canignorequota"]=> int(4) ["cantrackpm"]=> int(1) ["candenypmreceipts"]=> int(2) } ["calendarpermissions"]=> &array(6) { ["canviewcalendar"]=> int(1) ["canpostevent"]=> int(2) ["caneditevent"]=> int(4) ["candeleteevent"]=> int(8) ["canviewothersevent"]=> int(16) ["isnotmoderated"]=> int(32) } ["wolpermissions"]=> &array(5) { ["canwhosonline"]=> int(1) ["canwhosonlineip"]=> int(2) ["canwhosonlinefull"]=> int(4) ["canwhosonlinebad"]=> int(8) ["canwhosonlinelocation"]=> int(16) } ["adminpermissions"]=> &array(17) { ["ismoderator"]=> int(1) ["cancontrolpanel"]=> int(2) ["canadminsettings"]=> int(4) ["canadminstyles"]=> int(8) ["canadminlanguages"]=> int(16) ["canadminforums"]=> int(32) ["canadminthreads"]=> int(64) ["canadmincalendars"]=> int(128) ["canadminusers"]=> int(256) ["canadminpermissions"]=> int(512) ["canadminfaq"]=> int(1024) ["canadminimages"]=> int(2048) ["canadminbbcodes"]=> int(4096) ["canadmincron"]=> int(8192) ["canadminmaintain"]=> int(16384) ["canadminupgrade"]=> int(32768) ["canadminplugins"]=> int(65536) } ["genericpermissions"]=> &array(30) { ["canviewmembers"]=> int(1) ["canmodifyprofile"]=> int(2) ["caninvisible"]=> int(4) ["canviewothersusernotes"]=> int(8) ["canmanageownusernotes"]=> int(16) ["canseehidden"]=> int(32) ["canbeusernoted"]=> int(64) ["canprofilepic"]=> int(128) ["cananimateprofilepic"]=> int(134217728) ["canuseavatar"]=> int(512) ["cananimateavatar"]=> int(67108864) ["canusesignature"]=> int(1024) ["canusecustomtitle"]=> int(2048) ["canseeprofilepic"]=> int(4096) ["canviewownusernotes"]=> int(8192) ["canmanageothersusernotes"]=> int(16384) ["canpostownusernotes"]=> int(32768) ["canpostothersusernotes"]=> int(65536) ["caneditownusernotes"]=> int(131072) ["canseehiddencustomfields"]=> int(262144) ["canseeownrep"]=> int(256) ["canuserep"]=> int(524288) ["canhiderep"]=> int(1048576) ["cannegativerep"]=> int(2097152) ["cangiveinfraction"]=> int(4194304) ["canseeinfraction"]=> int(8388608) ["cangivearbinfraction"]=> int(536870912) ["canreverseinfraction"]=> int(16777216) ["cansearchft_bool"]=> int(33554432) ["canemailmember"]=> int(268435456) } ["genericoptions"]=> &array(6) { ["showgroup"]=> int(1) ["showbirthday"]=> int(2) ["showmemberlist"]=> int(4) ["showeditedby"]=> int(8) ["allowmembergroups"]=> int(16) ["isnotbannedgroup"]=> int(32) } ["signaturepermissions"]=> &array(17) { ["canbbcode"]=> int(131072) ["canbbcodebasic"]=> int(1) ["canbbcodecolor"]=> int(2) ["canbbcodesize"]=> int(4) ["canbbcodefont"]=> int(8) ["canbbcodealign"]=> int(16) ["canbbcodelist"]=> int(32) ["canbbcodelink"]=> int(64) ["canbbcodecode"]=> int(128) ["canbbcodephp"]=> int(256) ["canbbcodehtml"]=> int(512) ["canbbcodequote"]=> int(1024) ["allowimg"]=> int(2048) ["allowsmilies"]=> int(4096) ["allowhtml"]=> int(8192) ["cansigpic"]=> int(32768) ["cananimatesigpic"]=> int(65536) } } Thanks, d4 |
#2
|
|||
|
|||
Try this in your xml file...
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <bitfields product="vbulletin"> <bitfielddefs> <group name="ugp"> <group name="shop_item_settings"> <bitfield name="shop_invent_size" group="shop_usergroup_options" phrase="shop_inventory_size" intperm="true" >1</bitfield> <bitfield name="shop_pbit_size" group="shop_usergroup_options" phrase="shop_pbit_size" intperm="true">1</bitfield> </group> </group> </bitfielddefs> </bitfields> |
#3
|
|||
|
|||
Reason: This reference only works when it is a bit permission. If the permission is an integer standing on it's own, then the reference is $permissions[nameoffield]
Thanks tho noppid |
#4
|
|||
|
|||
I missed that completely.
Maybe you need... Code:
<bitfield intperm="true" name="name" group="group" phrase="phrase">6</bitfield> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|