vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   'Contact Us' - Add "image verification" for registered users, too. (https://vborg.vbsupport.ru/showthread.php?t=99235)

timetunnel 10-24-2005 10:00 PM

'Contact Us' - Add "image verification" for registered users, too.
 
Hello.

For 'Contact Us', to add "image verification" for registered users in addition to the existing 'unregistered users/guests', one method is to do the following:

in "sendmessage.php", search for 'imagecheck'. You'll find this word exists in 2 places.

For each instance, in its associated block of code, modify the following line:

FROM:
====
PHP Code:

if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == AND $vbulletin->options['gdversion']) 

TO:
==
PHP Code:

if (!$vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == AND $vbulletin->options['gdversion']) 

Hope this helps.

(note: this edit added the code here to vb 3.5.0 from the post in vb 3.0.x section)

EDIT: 10/30/05 - Added a text file for downloading code instructions

Snake 10-25-2005 11:37 AM

Thanks!

COBRAws 10-25-2005 09:10 PM

If you wrote the code changes here, you would get more installs :P

great mod tho, but I cant find a use for my board at the moment.

timetunnel 10-25-2005 09:12 PM

Thanks.

I guess I need to find out how to do it...huh :)

EDIT: I mean, find out how to make it so it's 'installable'...

timetunnel 10-26-2005 12:46 AM

I just added code here and I checked the 'code changes' box. Hope it's correct. Will find out later about how the 'install' counter works for hacks like this where someone edits their own code in the file vs. e.g. counter for downloads.

Oblivion Knight 10-26-2005 07:28 AM

Wouldn't removing the first condition completely achieve the same?
Code:

!$vbulletin->userinfo['userid'] AND

timetunnel 10-26-2005 03:06 PM

Yes it would, Oblivian Knight. I tested them both at the time.

The only reason I kept the one above is because I prefer to present to coders, especially, less-experienced coders, the version that maintains some of the original infrastructure. This sometimes makes it easier for those who don't add comments to their code nor comment out the original code and add the revised code before or after it. So if in the future they want to add e.g. a 'new member-type' condition whereby the revised condition no longer applies to 'everyone', they can easily follow the same nomenclature/infrastructure. Just a personal preference, not a requirement.

Glad you noticed!

timetunnel 10-30-2005 02:58 AM

Hello.

I've added a text file to my original post for download which contains the code modification instructions.

ENJOY!

cat4m 04-09-2006 06:12 PM

What does this actually do ??

Roms 04-09-2006 06:22 PM

Thanks :)

incka 07-04-2006 06:52 PM

Hi, I've got a forum running vBulletin v3.0.4 and we've been getting a lot of spam lately. It's been brought to my attention to implement Image Verification into the registration process, but I'm not sure if this code will work with an older version of the software.

Can someone help me? Much appreciated!

snowbird 07-07-2006 12:47 AM

I am using 3.5.4.

In sendmessage.php, instead of finding
Code:

if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == 2 AND $vbulletin->options['gdversion'])
there is:
Code:

        if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == 2 AND ($vbulletin->options['gdversion'] OR $vbulletin->options['magickpath']))
What should be done differently w/ 3.5.4? Thanks.

navjotjsingh 12-13-2006 03:22 AM

Then just change
Code:

if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == 2 AND ($vbulletin->options['gdversion'] OR $vbulletin->options['magickpath']))
to

Code:

if (!$vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == 2 AND ($vbulletin->options['gdversion'] OR $vbulletin->options['magickpath']))
For Versions 3.6.4(not sure whether same is for 3.6.0-3.6.3)
Find this in sendmessage.php
Code:

if (!$vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == 2 AND $vbulletin->options['regimagetype'])
and change to

Code:

if (!$vbulletin->userinfo['userid'] OR $vbulletin->userinfo['userid'] AND $vbulletin->options['contactustype'] == 2 AND $vbulletin->options['regimagetype'])

87GTR 12-24-2006 09:41 AM

can this be modded so that uses with less than X number of post have to use the image block to post?

Chicago_VLNU_4s 02-27-2007 03:25 AM

Installed, but it doesn't show any sign of an image verification when I test it out.

**Nevermind** It works only for guest. Good job, just what I was looking for. I was tired of these damn bots mailing me everyday.


All times are GMT. The time now is 04:43 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.01058 seconds
  • Memory Usage 1,749KB
  • 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
  • (7)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)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