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)
-   -   NoSpam! for vBulletin 3.5 (https://vborg.vbsupport.ru/showthread.php?t=133937)

antialiasis 12-12-2006 10:00 PM

NoSpam! for vBulletin 3.5
 
This hack, originally for 3.6, has now finally been fully converted to proper 3.5 format, where it will undoubtedly be even more useful than on 3.6, given the stronger default CAPTCHA protection in 3.6.

Note that this was tested on 3.5.7. If you have an older version and it is not working (or, in fact, if you have 3.5.7 and it's not working), please post in the hack thread at vBulletin.org with the details of what is working, what is not working, and what version you do have.

The method by which this version prevents guests from using Quick Search (to save them from getting a confusing "You answered the NoSpam! question incorrectly" message when they attempt it) is considerably less elegant than on 3.6 where it uses the simple $show['quicksearch'] switch which was only added in 3.6, but it works. Any pointers on improving it would be very much appreciated, however.

To quote from the other thread:

Quote:

This simple hack is meant as a replacement for the default CAPTCHA system in vBulletin. There are two main reasons one might want to do this: firstly, new technology is constantly being developed to crack CAPTCHA images and make spam accounts anyway, and secondly, the more secure the CAPTCHA, the more difficult it is for genuine users to tell what the numbers in the image are. There is also the issue of visually impaired users, and the fact that not all servers are capable of generating CAPTCHA images.

So what does this hack do instead? It asks a question. Any question you want. That's the best part: YOU make up the questions, which means that every forum is unique, which means that it is impossible for spambots to be simply programmed to bypass it at all forums with the hack installed. You can make one or many questions - if you make many, the hack will pick one at random when a guest attempts to register, search, post or send mail through the Contact Us form. Their input is compared with your specified answer, and voil?, if they get it right they're pretty much guaranteed to be human. If they get it wrong, they're given an error message.

It doesn't have to be a complicated question. Heck, you can just make it "Please type 'blah' into this box." Or you can go with inserting a simple image with HTML and ask what is shown on the image. Or you can ask them to tell you two plus two. It's up to you. In fact, this can also be used as a means of forcing people to read the rules by asking for a certain password found there, or if your forum focuses on a specialized subject, ask a question concerning the subject that all your genuine users will be able to answer, but a random troll or "CAPTCHA-sweatshop-reader" will be scratching their head over.

It's simple to install, too: just one product to import, and that's it.


VERSION HISTORY:

3.0: Added functionality to allow users to specify which pages should use NoSpam!.
2.0: Extended the NoSpam! functionality to guest posts, guest searches and guest "Contact Us" in addition to registration. First 3.5 release.
1.1: Made template edit in 3.6 automatic (with thanks to Cole2026), added ability to have more than one answer to each question, and made answers case insensitive. To upgrade, I recommend undoing the template edit so you won't have to worry about it anymore (replace $nospamfield in the template register with $imagereg, or if you added $nospamfield above $imagereg, just remove $nospamfield altogether), and then reimport the product through the Admin CP (making sure that Allow Overwrite is set to On).
1.0: Initial 3.6 release.


INSTALLATION:

1. Import product-nospam-35.xml through the Admin CP product manager.
2. Go to your vBulletin options in the Admin CP and select NoSpam! Settings. Once there, turn the system on and input your questions and answers according to the instructions there.

The system should now be functional and running. :)


UNINSTALLATION:

Just uninstall the product through the Admin CP.


SUPPORT:

Full support will be given in this thread. All suggestions are welcome.

Thank you and please click "Mark as Installed" if you like it.

Rich 12-13-2006 08:49 PM

Hello,

Thanks for porting this for everyone still using 3.5. I actually downloaded the 3.6 and used that one without any issues. (I made a few changes to it manually.) I have experienced GREAT results with the spam activity, or lack of, since I incorporated this. I am actually using this in conjunction with the captcha images.

Thanks again!

PoetJA-1975 12-13-2006 11:12 PM

Yes = thank you very much for this! I just posted in the 3.6.x thread about getting this to work with Quick Register: https://vborg.vbsupport.ru/showthrea...quick+register

Any help will be appreciated!

Excellent excellent vB modification - How can I vote for this as Mod of the Month?

Thanx again!

Jacquii.

antialiasis 12-14-2006 01:05 AM

Okay, I figured out how to make it work with QuickRegister.

Edit the plugin "Generate and insert NoSpam! question" on the hook global_start.

FIND the line

Code:

  if ($nospamdo) {
and MOVE this line to just ABOVE this line a little below:

Code:

      eval('$nospamfield = "' . fetch_template('nospam') . '";');
Now SAVE the plugin.

Now go to the Template Manager and edit the quick_register template. In the template, find these lines:

Code:

    <img src="image.php?$session[sessionurl]type=regcheck&amp;imagehash=$imagehash" alt="$vbphrase[registration_image]" width="100" height="30" border="0" />
  </if>

BELOW them, add this:

Code:

  <if condition="$vbulletin->options['nospam_onoff']">
    <br />$nospamquestion <input type="text" class="bginput" name="nospam" value="Answer here" onFocus="value=''" size="20" /> <input type="hidden" name="nospamnumber" value="$nospamnumber" />
  </if>

Now save the template, and you should be good to go.

And voting Mod of the Month is located in the Mod Options below "Mark as Installed". :)

Sooner95 12-14-2006 01:22 AM

awsome, man I need this. Thx.

PoetJA-1975 12-14-2006 02:09 PM

Quote:

Originally Posted by antialiasis (Post 1138176)
Okay, I figured out how to make it work with QuickRegister.

Edit the plugin "Generate and insert NoSpam! question" on the hook global_start.

FIND the line

Code:

  if ($nospamdo) {
and MOVE this line to just ABOVE this line a little below:

Code:

      eval('$nospamfield = "' . fetch_template('nospam') . '";');
Now SAVE the plugin.

Now go to the Template Manager and edit the quick_register template. In the template, find these lines:

Code:

    <img src="image.php?$session[sessionurl]type=regcheck&amp;imagehash=$imagehash" alt="$vbphrase[registration_image]" width="100" height="30" border="0" />
  </if>

BELOW them, add this:

Code:

  <if condition="$vbulletin->options['nospam_onoff']">
    <br />$nospamquestion <input type="text" class="bginput" name="nospam" value="Answer here" onFocus="value=''" size="20" /> <input type="hidden" name="nospamnumber" value="$nospamnumber" />
  </if>

Now save the template, and you should be good to go.

And voting Mod of the Month is located in the Mod Options below "Mark as Installed". :)

EXCELLENT - Thanx very much!
No I have NoSpam! installed on vBadvanced pages!
Much appreciation and respect for this modification = AWESOME!

Jacquii.

PoetJA-1975 12-14-2006 02:10 PM

Quote:

Originally Posted by antialiasis (Post 1138176)
Okay, I figured out how to make it work with QuickRegister.

Edit the plugin "Generate and insert NoSpam! question" on the hook global_start.

FIND the line

Code:

  if ($nospamdo) {
and MOVE this line to just ABOVE this line a little below:

Code:

      eval('$nospamfield = "' . fetch_template('nospam') . '";');
Now SAVE the plugin.

Now go to the Template Manager and edit the quick_register template. In the template, find these lines:

Code:

    <img src="image.php?$session[sessionurl]type=regcheck&amp;imagehash=$imagehash" alt="$vbphrase[registration_image]" width="100" height="30" border="0" />
  </if>

BELOW them, add this:

Code:

  <if condition="$vbulletin->options['nospam_onoff']">
    <br />$nospamquestion <input type="text" class="bginput" name="nospam" value="Answer here" onFocus="value=''" size="20" /> <input type="hidden" name="nospamnumber" value="$nospamnumber" />
  </if>

Now save the template, and you should be good to go.

And voting Mod of the Month is located in the Mod Options below "Mark as Installed". :)

EXCELLENT - Thanx very much!
No I have NoSpam! installed on vBadvanced pages!
Much appreciation and respect for this modification = AWESOME!

Jacquii.
------------
------------

I hear you like to write? https://vborg.vbsupport.ru/
If so click the link and become part of the JPiC Community ;)

khad 12-15-2006 11:34 AM

This was exactly what I wanted. Was getting so tired of spambots registering, even though I had spambuster which got rid of their posts. Now they can't even register in the first place! Good job. This mod also doubles as an idiot filter if they can't answer whatever question you put. :D

Quarterbore 12-16-2006 05:30 PM

This worked so well for my 3.6 forums and I am so thankful to get this for my last 3.5.x board... The darned spammers have a suprise in store for them!

apnet 01-01-2007 02:31 PM

Great stuff!!!

Used on v3.5.4 with no problems. :)

firewoofer 01-08-2007 09:43 PM

Is it possible to use this to prevent spam on unregistered users posting? Our registration is system is 100% invite only but we have a particular forum where we allow unregistered users to post, but we are getting spammed, how can we use this to prevent that?

noreturn 01-08-2007 11:11 PM

Hi -
I just installed on 3.5.3 and I can not get the question to appear in the quick register. The field for the answer displays, but not the question. Nothing at all in front of the field for the answer.
Can some one tell me what to triple check?

It does display properly in the regular registration for me.

Thanks.

KipLarson 01-13-2007 07:55 PM

Has anyone tried on 3.52? If not I will be doing so soon and will post back my results.

As for the quick register thing... what do you guys mean by that? Is that some other hack? The only way people register on my forums is by clicking the register button. (lol)

noreturn 01-13-2007 08:00 PM

Quote:

Originally Posted by KipLarson (Post 1158321)
Has anyone tried on 3.52? If not I will be doing so soon and will post back my results.

As for the quick register thing... what do you guys mean by that? Is that some other hack? The only way people register on my forums is by clicking the register button. (lol)

Yes it's another hack.
Located Here https://vborg.vbsupport.ru/showthrea...quick+register

KipLarson 01-14-2007 09:10 AM

Tested in 3.52 and it works! Sweet Sweet Hack. I turned off the captcha image thing so it's only being protected by NoSpam! right now, will post back with my results.

noreturn 01-14-2007 12:38 PM

Is there any one who knows about this?

just installed on 3.5.3 and I can not get the question to appear in the quick register. The field for the answer displays, but not the question. Nothing at all in front of the field for the answer.

antialiasis 01-14-2007 05:56 PM

noreturn, did you definitely do the plugin edit and save it? As in did you definitely move the line saying if($nospamdo) { to above that other line I gave?

firewoofer, the hack already displays NoSpam! questions for guest posting as well, so you should have no problems.

noreturn 01-14-2007 06:27 PM

Is this what you are speaking of? Is this correct?


Code:

      $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') . '";');


antialiasis 01-15-2007 05:43 PM

Yes, it should be...

That plugin is definitely on global_start, right?

noreturn 01-15-2007 07:03 PM

Hi - This is what it all look like at my end.

antialiasis 01-17-2007 12:46 AM

Hmm...

Can you give exactly what you put into the questions and answers field?

noreturn 01-17-2007 12:56 AM

Sure. And thanks for your help looking at what I have messed up :)

antialiasis 01-17-2007 09:28 PM

Can you please give me the full text of your "Generate and insert NoSpam! question" plugin on global_start?

noreturn 01-17-2007 09:31 PM

Thanks. Here it is.

Code:

if ($vbulletin->options['nospam_onoff'] AND !$vbulletin->userinfo['userid'])
{
  $nospamdo = true;
  switch (THIS_SCRIPT) {
      case 'register':
        $vbulletin->templatecache['register'] = str_replace('".(($show[\'regimagecheck\']) ? ("', '$nospamfield

".(($show[\'regimagecheck\']) ? ("', $vbulletin->templatecache['register']);
        break;
      case 'sendmessage':
        $vbulletin->templatecache['contactus'] = str_replace('                        </fieldset>
                       
                        <div class=\"fieldset\">', '                        </fieldset>
                        $nospamfield
                        <div class=\"fieldset\">', $vbulletin->templatecache['contactus']);
        break;
      case 'search':
        $vbulletin->templatecache['search_forums'] = str_replace('        </table>
       
        <div align=\"$stylevar[left]\">', '<tr><td colspan=\"2\" align=\"$stylevar[left]\">$nospamfield</td></tr>
        </table>
       
        <div align=\"$stylevar[left]\">', $vbulletin->templatecache['search_forums']);
        break;
      case 'newreply':
        $vbulletin->templatecache['newreply'] = str_replace('<!-- / message area -->', '<!-- / message area -->

$nospamfield', $vbulletin->templatecache['newreply']);
        break;
      case 'newthread':
        $vbulletin->templatecache['newthread'] = str_replace('<!-- / message area -->', '<!-- / message area -->

$nospamfield', $vbulletin->templatecache['newthread']);
        break;
      default:
        $nospamdo = false;
  }






 
      $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') . '";');



  }
  $vbulletin->templatecache['navbar'] = str_replace('<input type=\"text\" class=\"bginput\" name=\"query\" size=\"20\" />&nbsp;$gobutton', '$vbphrase[guests_cannot_use_quicksearch]', $vbulletin->templatecache['navbar']);
  if (THIS_SCRIPT == 'forumdisplay') {
      $vbulletin->templatecache['FORUMDISPLAY'] = str_replace('<input type=\"text\" class=\"bginput\" name=\"query\" size=\"20\" />$gobutton', '$vbphrase[guests_cannot_use_quicksearch]', $vbulletin->templatecache['FORUMDISPLAY']);
  }
  else if (THIS_SCRIPT == 'showthread') {
      $vbulletin->templatecache['SHOWTHREAD'] = str_replace('<input type=\"text\" class=\"bginput\" name=\"query\" size=\"20\" />$gobutton', '$vbphrase[guests_cannot_use_quicksearch]', $vbulletin->templatecache['SHOWTHREAD']);
  }
}


antialiasis 01-17-2007 11:43 PM

Odd...

Okay, this is getting kind of long-winded, but would you mind doing a little experiment for me since I'm unable to replicate this on my test forum? Go to the quickregister template and change the $nospamquestion that you put in to, in turn, $questions[0], $nospamnumber and $qanda[0], for each one writing down what appears in the template where the question should be (if anything). Post the results here (or PM them to me, whichever you prefer).

noreturn 01-18-2007 12:28 PM

I am not sure, is this what you wanted me to try?

Code:

<if condition="$vbulletin->options['nospam_onoff']">
   
    <br>$questions[0]<input type="text" class="bginput" name="nospam" value="Answer here" onFocus="value=''" size="20" /> <input type="hidden" name="nospamnumber" value="$qanda[0]" />
  </if>

And then show you this attached?

antialiasis 01-18-2007 04:03 PM

You don't need to attach it; just tell me whether anything appears or not. Try $nospamnumber, too.

noreturn 01-18-2007 04:37 PM

Nope, nothing should up yet.

antialiasis 01-18-2007 06:10 PM

Hmm. o_O The NoSpam! system is turned on, right?

AddHandler 01-19-2007 08:00 PM

It won't work in version 3.5.4 either....
Nothing shows up for the question...
I do not have QUICK REGISTER INSTALLED.......

I get an error telling me I answered the question WRONG...
because the question does not show up at all...

So it is UNISNTALL TIME and Back To The Drawing Board for me....

Thanks any way....

antialiasis 01-20-2007 01:34 AM

Have you edited the registration template at all? Try manually adding $nospamfield above the CAPTCHA code in the register template.

noreturn 01-20-2007 05:43 AM

Like I mentioned this is not my forte. :) Can you please give me a little better direction on "above" what code in the register template?
I searched for the word CAPTCHA but that did not come up.
Sorry.

F34R 01-21-2007 03:10 AM

Just installed this on 3.5.4... we'll see how it goes lol. Thanks for the script.

antialiasis 01-21-2007 01:41 PM

I was actually talking to AddHandler, not you, noreturn. I asked you if you haven't definitely turned the NoSpam! system on.

noreturn 01-21-2007 07:00 PM

Hi....sorry for misunderstanding there.
I have it off now because there was only the field for answer showing up and not the question. But yes, I have had it on and the question does not appear for me in the quick registration. In the regular registration it does appear when I have it turned on. At post number 26 I showed that it was on, but no question displayed in front of the answer box.

antialiasis 01-23-2007 10:20 PM

Hmm.

Well, this is certainly very strange, because for some reason it does not appear to be setting those variables, which it should do if that plugin is running, which it should do if the system is turned on. :/

If it were happening on my forum, I'd do some more debugging, but I really can't tell you to change everything I can think of for experimentation at your own active forum... and it's running absolutely fine with Quick Register on my 3.5.7 test forum. :/ Any suggestions from coders on what could be going wrong here would be very welcome.

KipLarson 01-25-2007 02:45 PM

9 days without a single bot registration.

NoSpam! = Amazing (and easy for users to register as well)

ThunderVamp9 01-26-2007 10:06 PM

I'm also having a problem with this one. I have installed the mod with no errors, all apears to be OK, but I don't see the question OR an answer box, as shown in problem1.jpg.

However, the mod is active, as shows in problem2.jpg, which you get after going through the registration.

Any ideas why it doesn't show up at all?

antialiasis 01-27-2007 11:47 PM

Try putting $nospamfield into the register template above $imagereg.

ThunderVamp9 01-28-2007 04:18 AM

I'm looking through the register template and don't see a $imagereg anywhere. Am I missing something? What I see is:
Code:

<if condition="$show['regimagecheck']">
<fieldset class="fieldset">
        <legend>$vbphrase[image_verification]</legend>
        <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
                <tr>
                        <td>
                                $vbphrase[enter_text_image_right]
                        </td>
                        <td rowspan="2"><img src="image.php?$session[sessionurl]type=regcheck&amp;imagehash=$imagehash" alt="$vbphrase[registration_image]" width="201" height="61" border="0" /></td>
                </tr>
                <tr>
                        <td><input type="text" class="bginput" name="imagestamp" size="50" maxlength="6" /><input type="hidden" name="imagehash" value="$imagehash" /></td>
                </tr>
                </table>
        </fieldset>
</if>



All times are GMT. The time now is 04:59 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.01485 seconds
  • Memory Usage 1,857KB
  • 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
  • (16)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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