PDA

View Full Version : usergroup permissions problem


sabret00the
02-06-2005, 05:05 PM
===================
admincp/usergroup.php
===================

Find:
__________________________________________________ _________________________________________

print_table_header($vbphrase['forum_viewing_permissions']);

?????????????????????????????????????????????????? ?????????????????????????????????????????

Above this, add:
__________________________________________________ _________________________________________

// +++ GRPS
print_table_header("GRPS Permissions");
print_yes_no_row("Can View Groups? <dfn>Allowsusergroup to view Groups</dfn>", 'usergroup[groupsview]',$ug_bitfield['groupsview']);
print_yes_no_row("Can Create Groups?<dfn>Allows usergroup to create Groups</dfn>",'usergroup[groupscreate]', $ug_bitfield['groupscreate']);
print_yes_no_row("Can Join Groups? <dfn>Allowsusergroup to join Groups</dfn>", 'usergroup[groupsjoin]',$ug_bitfield['groupsjoin']);
print_yes_no_row("Can Post Messages In Groups?<dfn>Allows usergroup to post in Groups they'vejoined</dfn>", 'usergroup[groupspost]',$ug_bitfield['groupspost']);
print_yes_no_row("Can Edit Messages Posted InGroups?<dfn>Allows usergroup to edit their own messages they postin Groups</dfn>", 'usergroup[groupspostedit]',$ug_bitfield['groupspostedit']);
print_yes_no_row("Can Delete Messages Posted InGroups<dfn>Allows usergroup to delete their own messages theypost in Groups</dfn>", 'usergroup[groupspostdelete]',$ug_bitfield['groupspostdelete']);
print_yes_no_row("Number Of Groups Usergroup CanJoin Limited?<dfn>Allows usergroup join as many Groups as theywant</dfn>", 'usergroup[groupscountlimited]',$ug_bitfield['groupscountlimited']);
print_yes_no_row("Can Moderate Groups?<dfn>This is a global permission to edit and deleteposts</dfn>", 'usergroup[groupsmoderater]',$ug_bitfield['groupsmoderater']);
print_yes_no_row("Can View IP Addresses?<dfn>Allows usergroup to view IP Addresses ofPostee's</dfn>", 'usergroup[groupsviewip]',$ug_bitfield['groupsviewip']);
print_table_break();
// --- GRPS

?????????????????????????????????????????????????? ?????????????????????????????????????????
==============
Save and Close
==============




=================
includes/init.php
=================

Find:
__________________________________________________ _________________________________________

// ----------------------------------------------------------
// ### END PLUGIN USERGROUP PERMISSIONS BITFIELDS HERE ###

?????????????????????????????????????????????????? ?????????????????????????????????????????

Above this, add:
__________________________________________________ _________________________________________

// +++ GRPS
$_BITFIELD['usergroup']['grpspermissions'] = array(
'groupsview' => 1,
'groupscreate' => 2,
'groupsjoin' => 4,
'groupspost' => 8,
'groupspostedit' => 16,
'groupspostdelete' => 32,
'groupscountlimited' => 64,
'groupsmoderater' => 128,
'groupsviewip' => 256
);
// --- GRPS

?????????????????????????????????????????????????? ?????????????????????????????????????????

==============
Save and Close
==============



==========
global.php
==========


Find:
__________________________________________________ _________________________________________

echo "End call of global.php: $aftertime\n";
echo "\n<hr />\n\n";
}

?????????????????????????????????????????????????? ?????????????????????????????????????????

Below this, add:
__________________________________________________ _________________________________________

// +++ GRPS
// Creates general settings for the GRouPS
$grps_permissions = convert_bits_to_array($permissions['grpspermissions'],$_BITFIELD['usergroup']['grpspermissions']);
// --- GRPS

?????????????????????????????????????????????????? ?????????????????????????????????????????
==============
Save and Close
==============

anyway that's what i've done, but when i try and save the permissionsin the usergroup screen, it says Database error in vBulletin3.0.3:

Invalid SQL: UPDATE usergroup SET

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
title = 'Registered',
description = '',
usertitle = 'Registered User',
opentag = '',
closetag = '',
passwordexpires = '0',
passwordhistory = '0',
arcademinposts = '0',
arcademintime = '0',
shoutmaxdaily = '0',
shouthierarchy = '4',
attachlimit = '0',
avatarmaxwidth = '90',
avatarmaxheight = '90',
avatarmaxsize = '20000',
profilepicmaxwidth = '100',
profilepicmaxheight = '100',
profilepicmaxsize = '100000',
pmquota = '250',
pmsendmax = '5',
uttstore_discount = '0',
forumpermissions = '127999',
pmpermissions = '3',
calendarpermissions = '17',
wolpermissions = '1',
adminpermissions = '0',
genericpermissions = '5248071',
genericoptions = '30',
shoutboxpermissions = '15',
arcadepermissions = '19',
grpspermissions = '127'
WHERE usergroupid=2
mysql error: Unknown column 'grpspermissions' in 'field list'

mysql error number: 1054
with this being my first time i'm actually just wondering, what am idoing wrong, was i supposed to great a table/column i'm unaware of?

Dean C
02-06-2005, 05:51 PM
Add a column to the user tabled called grpspermissions...

sabret00the
02-06-2005, 06:16 PM
thanks dean.

actually still getting the same error.

Dean C
02-06-2005, 07:46 PM
Argh my bad, I meant usergroup :)

sabret00the
02-06-2005, 07:53 PM
nice one, all working :)