View Single Post
  #1  
Old 02-06-2005, 05:05 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default usergroup permissions problem

Code:
===================
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
Code:
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?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01162 seconds
  • Memory Usage 1,793KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete