vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Human Verification Options variable (https://vborg.vbsupport.ru/showthread.php?t=201175)

veenuisthebest 01-09-2009 02:00 PM

Human Verification Options variable
 
1 Attachment(s)
Hii..

With 3.8.0, the Human verification options have been changed to checkboxes from option buttons, as in the attached pic.

Earlier, to check if register option was enabled I simply used $vbulletin->options['hvcheck_registration'], but this variable isn't available anymore.

There is just one variable for the whole setting which is $vbulletin->options['hvcheck']. So, how do I check if register option is check marked.

Thanks

Dismounted 01-11-2009 04:22 AM

It's now a bitfield. There is a nice function which you can use to check. It is fetch_require_hvcheck() (find it in functions.php).

veenuisthebest 01-11-2009 12:32 PM

So how do I deal with bitfields? Here is the function:

** Too many lines of vBulletin code **

Earlier, I just used the following to check if register option is checked or not:

PHP Code:

if($vbulletin->options['hvcheck_registration'])
{
//do this



How do I achieve similar using bitfield now?

Thank you

Bellardia 01-11-2009 02:44 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=166940&highlight=bitfields" target="_blank">https://vborg.vbsupport.ru/showt...ight=bitfields</a>

veenuisthebest 01-11-2009 03:12 PM

I have seen that already, but i have no idea how to get it started.

I just need to know how do I check if register option is checked or not in $vbulletin->options['hvcheck']

Thanks

Dismounted 01-12-2009 03:33 AM

It's as easy as before...
PHP Code:

if (fetch_require_hvcheck('register'))
{
    
// it is enabled




All times are GMT. The time now is 11:04 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.00979 seconds
  • Memory Usage 1,716KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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