I've made it possible for my members to purchase the ability to customize their profiles through the shop. When the proper items have been bought it is in fact possible for them to change their css values, they get a response saying the changes were saved, but in fact they're not. So I checked where the settings are being saved and found this in vb/profilecustomization.php:
As you can see the user permissions are being sent to that function, but when I added a var_dump(self::$permissions) at the bottom of that function all the permissions were 0.
I'm guessing your cache_permissions aint being called when the ajax.php is being loaded..
... Just saw that in your cache_permissions.php hook file, you do not add the purchased permissions when ajax is enabled.. why is this?
Also I'm still having problems with the pm space. My users purchased a larger inbox, and they did get it.. It says they can have 2000 messages but the users still cant PM them unless they have the ignore PM quota permission!
PHP:
<?php
/*** This loads the permission variables
*
* @param mixed permissions array, optional
*
***/
public static function setPermissions($permissions = false)
{
if (!$permissions)
{
$permissions = vB::$vbulletin->userinfo['permissions']['usercsspermissions'];
}
//Initially we are commenting out "theme" permissions.
if (!isset($vbulletin->bf_ugp_usercsspermissions['canusetheme']))
{
self::$permissions['canusetheme'] = false;
}
else
{
self::$permissions['canusetheme'] = $permissions & vB::$vbulletin->bf_ugp_usercsspermissions['canusetheme'];
}
self::$permissions['cancustomize'] = $permissions & vB::$vbulletin->bf_ugp_usercsspermissions['cancustomize'];
self::$permissions['caneditfontfamily'] = $permissions & vB::$vbulletin->bf_ugp_usercsspermissions['caneditfontfamily'];
self::$permissions['caneditfontsize'] = $permissions & vB::$vbulletin->bf_ugp_usercsspermissions['caneditfontsize'];
self::$permissions['caneditbgimage'] = $permissions & vB::$vbulletin->bf_ugp_usercsspermissions['caneditbgimage'];
self::$permissions['caneditcolors'] = $permissions & vB::$vbulletin->bf_ugp_usercsspermissions['caneditcolors'];
self::$permissions['caneditborders'] = $permissions & vB::$vbulletin->bf_ugp_usercsspermissions['caneditborders'];
}
?>
As you can see the user permissions are being sent to that function, but when I added a var_dump(self::$permissions) at the bottom of that function all the permissions were 0.
I'm guessing your cache_permissions aint being called when the ajax.php is being loaded..
... Just saw that in your cache_permissions.php hook file, you do not add the purchased permissions when ajax is enabled.. why is this?
Also I'm still having problems with the pm space. My users purchased a larger inbox, and they did get it.. It says they can have 2000 messages but the users still cant PM them unless they have the ignore PM quota permission!
Last edited: