Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 02-06-2005, 05:51 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Add a column to the user tabled called grpspermissions...
Reply With Quote
  #3  
Old 02-06-2005, 06:16 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks dean.

actually still getting the same error.
Reply With Quote
  #4  
Old 02-06-2005, 07:46 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Argh my bad, I meant usergroup
Reply With Quote
  #5  
Old 02-06-2005, 07:53 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice one, all working
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:00 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04350 seconds
  • Memory Usage 2,206KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete