vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   User Options Bit Setting Algorithm? (https://vborg.vbsupport.ru/showthread.php?t=153624)

tyler_d 07-28-2007 08:22 AM

User Options Bit Setting Algorithm?
 
Anyone know the function within the vB code that shows the algorithm for how the user bits are set in the 'options' field for the vB database table: '_user'

I'm doing integration work between Joomla Community Builder and vBulletin and need to learn this bit setting algorithm in order to synchronize "invisible user" options between the systems.

thanks for any leads.

I've been looking thru the vB code for a few hours now with no success on how those user option bits are set.

Carnage 07-28-2007 08:29 AM

i'm not 100% certain on this but aren't such options set within the user datamanager?

Andreas 07-28-2007 08:31 AM

class_dm.php

method set_bitfield()

Or basically:

To set a bit
[sql]
UPDATE user SET options = IF ((options & X), options, options + X) WHERE userid = Y
[/sql]

To unset a bit
[sql]
UPDATE user SET options = IF ((options & X), options - X, options) WHERE userid = Y[/sql]

tyler_d 07-28-2007 10:15 AM

thx andreas :)


All times are GMT. The time now is 07:05 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.01491 seconds
  • Memory Usage 1,705KB
  • 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
  • (4)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