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 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....


All times are GMT. The time now is 02:23 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.01081 seconds
  • Memory Usage 1,738KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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