bbAntiSpam: Discuss how to stop web spam

The forum is retired.

bbAntiSpam Forum Index - Textual Confirmation - Interesting little problemo...

Author Message
Kareeser



Joined: 24 Feb 2007
Posts: 13

Posted: Sat Feb 24, 2007 10:28 pm    Post subject: Interesting little problemo...  

I installed textual confirmation, and it works great in the default subSilver template, but the question doesn't appear at all when the other template is used. What's worse is that the user can't enter the answer to the question (since there is no answer box), and can't register! Uh-oh...

Here are the gists of the modified files. I assume that the base files themselves work (since the extension works with subSilver):

profile_add_body.tpl
Code:

...
   </tr>

   <!-- END switch_confirm -->
   
   <!-- BEGIN switch_textual_confirm -->
   <tr>
     <td class="row1"><span class="gen">{TEXTUAL_CONFIRMATION_QUESTION} * </span><br /><span class="gensmall">{L_TEXTUAL_CONFIRMATION_EXPLAIN}</td>
     <td class="row2"><input type="text" class="post" style="width: 200px" name="tc_answer" size="25" value="" /></td>
   </tr>
   <!-- END switch_textual_confirm -->

   <tr>

     <td class="titlebottomwtop" colspan="2">&nbsp;</td>

   </tr>
...


usercp_register.php
Code:

...

$error = TRUE;
         $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
      }
   }
   tc_hook_register();
   if ($board_config['enable_confirm'] && $mode == 'register')
   {

...

   $ini_val = ( phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
   $form_enctype = ( @$ini_val('file_uploads') == '0' || strtolower(@$ini_val('file_uploads') == 'off') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';

   tc_hook_template($mode, $template, $s_hidden_fields, $tc_question);
   $template->assign_vars(array(
      'TEXTUAL_CONFIRMATION_QUESTION' => isset($tc_question) ? $tc_question : '',
      'L_TEXTUAL_CONFIRMATION_EXPLAIN' => isset($lang['tc_explain']) ? $lang['tc_explain'] : '',
      'USERNAME' => isset($username) ? $username : '',
      'CUR_PASSWORD' => isset($cur_password) ? $cur_password : '',
      'NEW_PASSWORD' => isset($new_password) ? $new_password : '',
      'PASSWORD_CONFIRM' => isset($password_confirm) ? $password_confirm : '',
      'EMAIL' => isset($email) ? $email : '',
      'CONFIRM_IMG' => $confirm_image,
...


constants.php
Code:

...
define('SMILIES_TABLE', $table_prefix.'smilies');
define('TEXTUAL_CONFIRMATION_TABLE', $table_prefix.'textual_confirmation');
define('THEMES_TABLE', $table_prefix.'themes');
...


... and I assumed /mytemplate/admin/textual_confirmation.tpl didn't need modifying... so I simply uploaded it to that folder.

Any help? Confused

Oh, while I'm at it... it looks like Visual Confirm isn't even installed... :S That is, in "profile_add_body.tpl", all there is is a little comment that says

Code:

<!-- Visual Confirmation -->


Likewise, Visual Confirmation cannot be turned on in the config page in the admin panel, as it doesn't exist. Does that help?
admin
Site Admin


Joined: 18 Apr 2006
Posts: 805
Location: Saint-Petersburg, Russia

Posted: Sun Feb 25, 2007 2:59 am    Post subject:  

Hi!

Quote:
I installed textual confirmation, and it works great in the default subSilver template, but the question doesn't appear at all when the other template is used. What's worse is that the user can't enter the answer to the question (since there is no answer box), and can't register! Uh-oh...

You should modify the file "profile_add_body.tpl" not only for the subSilver theme, but also for all other themes. As far as I understand, you tried to do so, but got a problem.

Quote:
Oh, while I'm at it... it looks like Visual Confirm isn't even installed... :S That is, in "profile_add_body.tpl", all there is is a little comment that says

Very strange. Probably your forum has a long history of modifications, and something decayed in the way.

I need some more information to say something. Show us the file "profile_add_body.tpl" from the template in which the question doesn't appear.
_________________
Oleg Parashchenko, bbAntiSpam
Do you love our tools? Please sponsor further development!
Kareeser



Joined: 24 Feb 2007
Posts: 13

Posted: Sun Feb 25, 2007 9:53 am    Post subject:  

Hello!

Yep, checked and double checked. The profile_add_body.tpl I pasted in the OP is the excerpt from the file in the custom template. Smile

As for the forum itself, it was a fresh download of files straight from the phpBB website. I just ran update_to_final.php to bring the DB up to standard... but that's irrelevant, I believe...

Anything else? Smile
admin
Site Admin


Joined: 18 Apr 2006
Posts: 805
Location: Saint-Petersburg, Russia

Posted: Tue Feb 27, 2007 4:40 am    Post subject:  

Hi!

Please zip the whole folder with your templates and send it to me (<olepar gmail com>), I'll look at it.
_________________
Oleg Parashchenko, bbAntiSpam
Do you love our tools? Please sponsor further development!
Kareeser



Joined: 24 Feb 2007
Posts: 13

Posted: Tue Feb 27, 2007 5:39 pm    Post subject:  

Thank you, Oleg! The fix worked perfectly.

btw, your advanced textual confirm doesn't accept "oui" for "Are you Human?"

Wink

admin
Site Admin


Joined: 18 Apr 2006
Posts: 805
Location: Saint-Petersburg, Russia

Posted: Wed Feb 28, 2007 5:19 am    Post subject:  

I'm glad the fix worked. Again, best luck to your forum!

Quote:
btw, your advanced textual confirm doesn't accept "oui" for "Are you Human?"

Is it in French? I think I should add it. Thanks for suggestion.

Quote:

Oh, shame on me, I can't answer this question. My math skills are totally forgotten. By the way, here is yet another mind teaser:


_________________
Oleg Parashchenko, bbAntiSpam
Do you love our tools? Please sponsor further development!
Kareeser



Joined: 24 Feb 2007
Posts: 13

Posted: Wed Feb 28, 2007 6:15 pm    Post subject:  

Yikes! Am I supposed to answer that or type it out? Haha...

I noticed that Textual Confirmation comes with two default questions, Are you Human, and Say Hello. Aren't you worried that at some point, after Textual Confirmation becomes popular, that the spammers won't just program the bot to answer those two defaults?

Even if the admin created other questions, if you keep refreshing, you're bound to cross the defaults at some point...
admin
Site Admin


Joined: 18 Apr 2006
Posts: 805
Location: Saint-Petersburg, Russia

Posted: Thu Mar 01, 2007 4:24 am    Post subject:  

Quote:
I noticed that Textual Confirmation comes with two default questions, Are you Human, and Say Hello. Aren't you worried that at some point, after Textual Confirmation becomes popular, that the spammers won't just program the bot to answer those two defaults?

I'm sure the spammers' bots will learn the default questions soon. But I hope that administrators of forums change the default questions to custom questions.

Quote:
Even if the admin created other questions, if you keep refreshing, you're bound to cross the defaults at some point...

...unless the administrator deleted the default questions.
_________________
Oleg Parashchenko, bbAntiSpam
Do you love our tools? Please sponsor further development!
Kareeser



Joined: 24 Feb 2007
Posts: 13

Posted: Sat Mar 03, 2007 7:58 pm    Post subject:  

Hi Oleg...

I figured out why Visual Confirm wasn't being activated. It was my default style, Chunkstyle, which didn't conform to phpBB standards (since visual confirm wasn't standard at the time)

Just letting you know
admin
Site Admin


Joined: 18 Apr 2006
Posts: 805
Location: Saint-Petersburg, Russia

Posted: Sun Mar 04, 2007 2:43 am    Post subject:  

Ah, sorry. I did notice that Visual Confirmation code was not present in the template, but forget to say it. I was happy that the problem with Textual Confirmation was solved, and didn't notice yet another question.

By the way, you don't need Visual Confirmation anymore.
_________________
Oleg Parashchenko, bbAntiSpam
Do you love our tools? Please sponsor further development!

Ok.