vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Checkbox Profile Fields (https://vborg.vbsupport.ru/showthread.php?t=91489)

Adrian Schneider 07-02-2005 02:19 AM

Checkbox Profile Fields
 
[vb 3.0.7]
How do these work exactly? I can't seem to figure out the relationship between what you select and the data in the db. Can someone point me in the right direction?

Reeve of shinra 07-02-2005 03:09 AM

if its like the select box in anyway, it puts a # in the database that corresponds to your choices. So choice a would be 1, choice b would be 2 and so on.

Adrian Schneider 07-02-2005 07:48 PM

I don't think it is because I still can't see any relationship. :)

Counterstrike
Diablo
Diablo II
Starcraft *
Starcraft: BW *
Warcraft I *
Warcraft II *
Warcraft III *
Warcraft III: FC *

* represents being checked

In the database it shows: "504"

Andreas 07-02-2005 08:05 PM

Well ...
Well, its just binary arithmetics :)

Code:

Counterstrike                2^0 = 1
Diablo                        2^1 = 2
Diablo II                2^2 = 4
Starcraft *                2^3 = 8
Starcraft: BW *                2^4 = 16
Warcraft I *                2^5 = 32
Warcraft II *                2^6 = 64
Warcraft III *                2^7 = 128
Warcraft III: FC *        2^8 = 256

Now sum up the values for all selected entries: 8+16+32+64+128+256=504 :)

Adrian Schneider 07-02-2005 08:05 PM

Thank you sir. :)


All times are GMT. The time now is 03:03 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.00983 seconds
  • Memory Usage 1,717KB
  • 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
  • (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