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 - NoSpam! - an alternative to CAPTCHA images (https://vborg.vbsupport.ru/showthread.php?t=124828)

phill2003 01-16-2007 06:25 PM

Quote:

Originally Posted by antialiasis (Post 1160627)
There is a solution for this in the 3.5 thread, which at a glance I can't see why wouldn't work just fine for 3.6 too (assuming the quickregister template is about the same). Ask if there's a problem, though.


The box for the answer shows up but the question doesnt :( lol its a tad hard to get it right then :)

antialiasis 01-17-2007 05:49 PM

Hmm.

This is rather funny because as far as I can see, the variable is set...

Does the Quick Register form show on the normal registration page? If so, does the NoSpam! question appear in it there? If not, does it appear on the search page for guests or the guest post page?

phill2003 01-17-2007 06:49 PM

Quote:

Originally Posted by antialiasis (Post 1161576)
Hmm.

This is rather funny because as far as I can see, the variable is set...

Does the Quick Register form show on the normal registration page? If so, does the NoSpam! question appear in it there? If not, does it appear on the search page for guests or the guest post page?


The question appears as it should on the registration page but nowhere else :(

thuffner 01-17-2007 07:06 PM

I have been having a huge problem with spam lately and came across this hack.

Nevertheless, spam no more!

Amazing hack, worked like a charm. Well done! :)

antialiasis 01-17-2007 09:31 PM

Quote:

Originally Posted by phill2003 (Post 1161613)
The question appears as it should on the registration page but nowhere else :(

Hmm...

Okay, can you give me the full text of that plugin? "Generate NoSpam! question" on the hook global_start?

Ordovicium 01-19-2007 11:55 AM

Quote:

Originally Posted by antialiasis (Post 1152028)
So the NoSpam! question is not actually appearing on the search page?

This is the one most vulnerable to template edits, so something going wrong with it is not too unlikely. If it's not appearing, you might want to make the automatic template edit manually:

FIND

Code:

        <if condition="$imagereg">
REPLACE it with

Code:

        <if condition="$imagereg OR $vbulletin->options['nospam_onoff']">
Then FIND

Code:

            <td align="$stylevar[left]" valign="top" colspan="2">$imagereg</td>
REPLACE it with

Code:

            <td align="$stylevar[left]" valign="top" colspan="2">$nospamfield

$imagereg</td>


I can't find the template for these changes.

sportsoutlaw 01-19-2007 12:50 PM

Have had this installed for almost a week now, and it seems to have completely eliminated my bot spam. (Which was about 5-8 registrations and posts per day)

Great Job!

phill2003 01-19-2007 01:29 PM

Quote:

Originally Posted by antialiasis (Post 1161699)
Hmm...

Okay, can you give me the full text of that plugin? "Generate NoSpam! question" on the hook global_start?

here it is.

Code:

if ($vbulletin->options['nospam_onoff'] AND !$vbulletin->userinfo['userid'])
{
  $nospamdo = true;
  switch (THIS_SCRIPT) {
      case 'register':
        $thetemplate =& $vbulletin->templatecache['register'];
        break;
      case 'sendmessage':
        $thetemplate =& $vbulletin->templatecache['contactus'];
        break;
      case 'search':
        $vbulletin->templatecache['search_forums'] = str_replace(array('$imagereg</td>', '($imagereg)'), array('$nospamfield\n\n$imagereg</td>', '($imagereg OR $vbulletin->options[\'nospam_onoff\'])'), $vbulletin->templatecache['search_forums']);
        break;
      case 'newreply':
        $thetemplate =& $vbulletin->templatecache['newreply'];
        break;
      case 'newthread':
        $thetemplate =& $vbulletin->templatecache['newthread'];
        break;
      default:
        $nospamdo = false;
  }

  if ($thetemplate)
  {
      $thetemplate = str_replace('$imagereg', '$nospamfield\n\n$imagereg', $thetemplate);
  }

 
      $questions = explode("\n", $vbulletin->options['nospam_questions']);
      $nospamnumber = array_rand($questions);
      $qanda = explode(":",$questions["$nospamnumber"]);
      $nospamquestion = $qanda[0];
if ($nospamdo) {
      eval('$nospamfield = "' . fetch_template('nospam') . '";');
  }
}

as you can see i have done the edit you stated was needed to get the nospam into the quick register template but from what i can see it is as it should be otherwise.

thincom2000 01-19-2007 04:24 PM

I would recommend creating separate options fields for questions and answers. Each field could still separate questions and answers by line breaks, but now you could allow colons to be used in at least the questions. To allow them in answers, I would recommend using a string to separate answers instead of just a colon - maybe :|: since it is even more unlikely someone would want that in their answers. :)

mamedo73 01-19-2007 04:39 PM

thanks my friend.


All times are GMT. The time now is 02:13 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.01643 seconds
  • Memory Usage 1,752KB
  • 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
  • (5)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)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