vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - reCAPTCHA!vB (https://vborg.vbsupport.ru/showthread.php?t=151824)

Alibass 07-11-2007 06:03 PM

Quote:

Originally Posted by magnus (Post 1288468)
Wait, what? Why are you trying to execute the patch via SQL? Forget the patch. Remove any and all reference to it. Do not perform Method A, instead do what's listed in Method B. Perform the file edits manually.

Using the GNU patch method should be reserved for those with basic UNIX knowledge and shell access to their hosts. Everyone else should follow the instructions in Method B.

Yep, I did Method B and it works fine. *Installed* works great and thanks! :)

Alibass 07-11-2007 07:39 PM

@magnus

Anyway maybe in your next release you could include the recaptcha to show up when sending mail via clicking "contact us"?

magnus 07-11-2007 07:50 PM

Quote:

Originally Posted by Alibass (Post 1288555)
@magnus

Anyway maybe in your next release you could include the recaptcha to show up when sending mail via clicking "contact us"?


Actually, I have this done already. I'll put up a post with the required file edits.

Smoothie 07-11-2007 08:41 PM

al-righty then, gonna give this a whirl. :)

Alibass 07-11-2007 09:22 PM

Quote:

Originally Posted by magnus (Post 1288562)
Actually, I have this done already. I'll put up a post with the required file edits.

Thanks magnus, looking forward to your post.

TTG 07-11-2007 09:52 PM

Looks like a great addition.
Will it work alongside Ajax Registration ?

magnus 07-11-2007 09:57 PM

Quote:

Originally Posted by TTG (Post 1288677)
Looks like a great addition.
Will it work alongside Ajax Registration ?

There's no reason for it not to. This simply replaces the default CAPTCHA.

Alibass 07-11-2007 10:00 PM

Quote:

Originally Posted by TTG (Post 1288677)
Will it work alongside Ajax Registration ?

I can tell you I am using AjaxReg and No Spam! with this hack and it works with no problems. :)

TTG 07-11-2007 10:16 PM

Quote:

Originally Posted by magnus (Post 1288681)
There's no reason for it not to. This simply replaces the default CAPTCHA.

Installed and working well .. thanks magnus :up:

magnus 07-11-2007 11:04 PM

Perform the following file edits in order to replace the default CAPTCHA displayed to guests when using "Contact Us" with a reCAPTCHA
[hr]-[/hr]
In sendmessage.php - BE SURE TO MAKE A BACKUP BEFORE EDITING!
  1. FIND:
    PHP Code:

        if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == AND $vbulletin->options['regimagetype'])
        {
            require_once(
    DIR '/includes/functions_regimage.php');
            if (!
    verify_regimage_hash($vbulletin->GPC['imagehash'], $vbulletin->GPC['imagestamp']))
            {
                
    $errors[] = fetch_error('register_imagecheck');
            }
        } 

    REPLACE WITH:
    PHP Code:

        if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == AND $vbulletin->options['regimagetype'])
        {
            require_once(
    DIR '/includes/functions_recaptcha.php');
            
    $resp recaptcha_check_answer($vbulletin->options['recaptcha_privatekey'],
                            
    $_SERVER["REMOTE_ADDR"],
                            
    $_POST["recaptcha_challenge_field"],
                            
    $_POST["recaptcha_response_field"]);
            if (!
    $resp->is_valid)
            {
                
    $errors[] = fetch_error('register_imagecheck');
            }
        } 

  2. FIND AND REMOVE:
    PHP Code:

            if ($imagehash)
            {
                
    $db->query_write("DELETE FROM " TABLE_PREFIX "regimage WHERE regimagehash = '" $db->escape_string($imagehash) . "'");
            } 

  3. FIND:
    PHP Code:

        if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == AND $vbulletin->options['regimagetype'])
        {
            require_once(
    DIR '/includes/functions_regimage.php');
            
    $imagehash fetch_regimage_hash();
            eval(
    '$imagereg = "' fetch_template('imagereg') . '";');
        } 

    REPLACE WITH:
    PHP Code:

        if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == AND $vbulletin->options['regimagetype'])
        {
            require_once(
    DIR '/includes/functions_recaptcha.php');
            
    $imagereg recaptcha_get_html($vbulletin->options['recaptcha_publickey']);
        } 

  4. FIND:
    PHP Code:

        // image verification
        
    if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
        {
            require_once(
    DIR '/includes/functions_regimage.php');
            
    $imagehash fetch_regimage_hash();
            eval(
    '$imagereg = "' fetch_template('imagereg') . '";');
        } 

    REPLACE WITH:
    PHP Code:

        // image verification
        
    if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
        {
            require_once(
    DIR '/includes/functions_recaptcha.php');
            
    $imagereg recaptcha_get_html($vbulletin->options['recaptcha_publickey']);
        } 

  5. FIND:
    PHP Code:

        if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
        {
            require_once(
    DIR '/includes/functions_regimage.php');
            if (!
    verify_regimage_hash($vbulletin->GPC['imagehash'], $vbulletin->GPC['imagestamp']))
            {
                
    standard_error(fetch_error('register_imagecheck'));
            }
        } 

    REPLACE WITH:
    PHP Code:

        if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['regimagetype'])
        {
            require_once(
    DIR '/includes/functions_recaptcha.php');

            
    $resp recaptcha_check_answer ($vbulletin->options['recaptcha_privatekey'],
                            
    $_SERVER["REMOTE_ADDR"],
                            
    $_POST["recaptcha_challenge_field"],
                            
    $_POST["recaptcha_response_field"]);

            if (!
    $resp->is_valid)
            {
                
    standard_error(fetch_error('register_imagecheck'));
            }
        } 

  6. FIND AND REMOVE: THERE WILL BE TWO (2) OCCURANCES OF THIS STRING. REMOVE BOTH
    PHP Code:

            'imagestamp'    => TYPE_STR,
            
    'imagehash'     => TYPE_STR



All times are GMT. The time now is 01:52 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.01361 seconds
  • Memory Usage 1,819KB
  • 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
  • (10)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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