View Full Version : Blasted bitfields
Chris M
07-11-2005, 09:04 PM
:p
Ah the days you could modify code...
Anyway:
// Get the Smilie Permissions for Users
if ($permissions['smiliepermissions'] & $vbulletin->bf_ugp['smiliepermissions']['cansmilielimit']) {
$vbulletin->options['maximages']= $vbulletin->bf_ugp['smiliepermissions']['smilieintset'];
}
I created a bitfield for smilie permissions to be set on a 'per usergroup' basis - Problem is I cannot get the code above to set the maximages based on the usergroup value :disappointed:
Any help? :p
I hate bitfields :p
Satan
Marco van Herwaarden
07-12-2005, 03:27 AM
If i understand you, you want to set a max number of smilies? A bitfield can only be true or false, no other values.
Chris M
07-12-2005, 09:07 AM
If i understand you, you want to set a max number of smilies? A bitfield can only be true or false, no other values.
I believe you can set an integer value using bitfields :)
Satan
Never mind I got it working :)
Satan
Marco van Herwaarden
07-12-2005, 09:21 AM
I believe you can set an integer value using bitfields
No!
(unless you mean the integer representation of all combined permissions in that bitfield)
Chris M
07-12-2005, 11:04 PM
No!
(unless you mean the integer representation of all combined permissions in that bitfield)
Then please explain how my latest Extension works :p
Satan
Marco van Herwaarden
07-13-2005, 12:45 AM
Post i alink and i will have a look tomorrow.
Paul M
07-13-2005, 01:41 AM
Then please explain how my latest Extension works :p
SatanMagic ?
They are called bitfields for a very good reason - they are one bit, 1 or 0, true or false. :)
Chris M
07-13-2005, 01:49 AM
Magic ?
They are called bitfields for a very good reason - they are one bit, 1 or 0, true or false. :)
Indeed - However in the .xml file you upload to the /includes/xml/ folder, if you add intperm="true" to the <bitfield> tag, it allows you to have an integer value in the specified area...
While technically this isn't a bitfield, it still is added the same way as one, and I was trying to figure out how to call it :p
I got it figured that it's:
$vbulletin->options['maximages']= $vbulletin->userinfo['permissions']['groupsmilielimit'];
;)
Satan
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.