vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   HowTo Create Custom Usergroup Permissions (https://vborg.vbsupport.ru/showthread.php?t=82844)

HakkieDEV 06-25-2005 11:33 AM

I've had a look and I see that it also adds a field in the usergroup permissions area.

However, I'd like to know how I could add some extra permission fields in the forum area (admincp/forum.php).

Andreas 06-25-2005 07:39 PM

Not possible without editing the File.

HakkieDEV 06-26-2005 06:13 AM

Ah, okay, thanks.

It was driving me crazy. :)

TitanKing 07-12-2005 07:11 AM

Can anyone please explain to me the forumpermissions bits, how will I get the permissions out of there... thank you...

MrNase 07-27-2005 05:06 PM

1 Attachment(s)
Here's my bitfield_vbgarage.xml and here's the error I get once my custom permissions are in place:


HTML Code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<bitfields product="vBulletin">
        <bitfielddefs>
                <group name="ugp">
                        <group name="canvbgarage">
                        <bitfield name="canenter" group="canvbgarage" phrase="can_enter_vbgarage" install="">1</bitfield>
                        </group>
                </group>
        </bitfielddefs>
</bitfields>


If the file is there and active I get this error when I try to save the permissions. The newly added permissions are not saved and they remain 'no'..

Andreas 07-27-2005 05:27 PM

Make sure you don't have any Plugins enabled and try again.

Edit: install="" might also cause this error

MrNase 07-27-2005 05:33 PM

It's a fresh install without any plugins.. I also removed install="" with no success :(

I added another group and here's the sql error I get now:

HTML Code:

### UPDATE QUERY GENERATED BY fetch_query_sql() ###
        `title` = 'Administrators',
        `description` = '',
        `usertitle` = 'Administrator',
        `opentag` = '',
        `closetag` = '',
        `passwordexpires` = '180',
        `passwordhistory` = '360',
        `canvbgarage` = '',
        `canvbgarage2` = '',
        `forumpermissions` = '1048575',
        `attachlimit` = '0',
        `pmquota` = '50',
        `pmpermissions` = '3',
        `pmsendmax` = '5',
        `calendarpermissions` = '63',
        `wolpermissions` = '31',
        `adminpermissions` = '3',
        `genericpermissions` = '205520831',
        `genericoptions` = '31',
        `profilepicmaxwidth` = '100',
        `profilepicmaxheight` = '100',
        `profilepicmaxsize` = '65535',
        `avatarmaxwidth` = '80',
        `avatarmaxheight` = '80',
        `avatarmaxsize` = '20000'
WHERE usergroupid=6;

You can see that canvbgarage is empty but it shouldn't..

I edited the usergroup #6 via phpmyadmin and changed canvbgarage to 1 and the usergroup manager still says no and my scripts are still not working :(

Andreas 07-27-2005 05:41 PM

Did you rebuild the Bitfield Cache?

Btw:

I'd use a XML like
Code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<bitfields product="garage">
        <bitfielddefs>
                <group name="ugp">
                        <group name="vbgaragepermissions">
                        <bitfield name="canenter" group="vbgarage_permissions" phrase="can_enter_vbgarage" install="">1</bitfield>
                        </group>
                </group>
        </bitfielddefs>
</bitfields>


MrNase 07-27-2005 05:47 PM

Verdammt, ich wusste doch das ich was vergessen hatte *vordenkopfschlag* :D

No I didn't :D

Next question: If Iam using the XML like you suggested, what does this has to look like:
PHP Code:

if ($permissions['canvbgarage'] & $vbulletin->bf_ugp['canvbgarage']['canenter']) 


Andreas 07-27-2005 05:54 PM

Well, it's just variable Names so it's not really important, but IMHO it makes Code more readable :)

PHP Code:

if ($permissions['vbgaragepermissions'] & $vbulletin->bf_ugp['vbgaragepermissions']['canenter']) 



All times are GMT. The time now is 07:02 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01479 seconds
  • Memory Usage 1,744KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete