vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   usergroup permissions problem (https://vborg.vbsupport.ru/showthread.php?t=75847)

sabret00the 02-06-2005 05:05 PM

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?

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 :)


All times are GMT. The time now is 08:08 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.01012 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete