vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Getting forumpermission from usergroupid/userid (https://vborg.vbsupport.ru/showthread.php?t=91992)

TitanKing 07-11-2005 03:57 PM

Getting forumpermission from usergroupid/userid
 
People I am so tired, I have tried absolutly everything, if anyone could help me I would be so gratefull and you will be my hero...

If I have a usergroupid/userid how do I get this:

Say I have a userid/groupid of say 5, this user has forumpermission of say forumid 10, 12, 16, 19

usergroupid 4 has forumid permission of 19, 21, 45, 66 etc...

Im sure there must be a simple solution, I cant figure out how on earth vbulletin stores forumpermission information...

Please help me... :nervous:

Marco van Herwaarden 07-11-2005 07:31 PM

I guess the answer is, if i understand the question correct, forum permissions are stored with the usergroup, unless you have defined accessmasks for the user that override the usergroup permissions.

TitanKing 07-12-2005 04:06 AM

Yes it lies in table forumpermission & usergroup, this is not the problem, it gets stored in some wierd 6 digit number, that is what I connot figure out, all I need is this...

usegroupid 7 has permission of forumid 3,9,12,15 etc...

Anybody please help me !

Marco van Herwaarden 07-12-2005 05:08 AM

For each forum/usergroup you will find an entry in the forumpermission, unless the default usergroup permissions are used.

The 'forumpermissions' column is a so called bitfield. A bitfield is stored as an integer, and each bit represents a permission.

For example:
Permission A
Bit: xxxxxxxxxxxxx1
Decimal value: 1

Permission B
Bit: xxxxxxxxxxxx1x
Decimal value: 2

Permission C
Bit: xxxxxxxxxxx1xx
Decimal value: 4

If permissions A & C are on, but B is off, the decimal value for the permission field would be 5 (1 + 100 = 101 binary = 5 decimal)

TitanKing 07-12-2005 05:50 AM

Man oh man oh man ! Your my Hero, im no gay person but ill freakin kiss you for this, thank you very much... damn dont know much about bits etc... but from here ill figure...

Thank you my friend !


All times are GMT. The time now is 03:06 AM.

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.02467 seconds
  • Memory Usage 1,707KB
  • 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)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