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 :)


All times are GMT. The time now is 08:33 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.01071 seconds
  • Memory Usage 1,734KB
  • 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
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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