This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

The problems with Russian words
#1

Good afternoon.

I have two problems.

1. In the admin can configure the reserved and forbidden usernames. All this works only if the names are entered in Latin letters. Russian names is also perfectly entered and stored in a file reserved_names.txt, but the script does not account for them when the form is submitted - it allows these names.

2. At the bottom of the comment form are questions to check for bots. Here it is written that the answers are not case sensitive (uppercase or lowercase letters). But again, all this is true only for the responses in Latin. If the answer should be in Russian, it requires necessarily take into account the size of the letters. For example, if you type in the answer instead of "земля" - "Земля", the script complains that the answer is wrong. With the Latin words do not.
How to fix the whole thing?
Reply
#2

Hi,

1. The page that you integrated Commentics into needs to be UTF-8. You can check using Firefox by going to 'Tools -> Page Info' and looking at what it says for 'Text Encoding'.

2. Fixing the above may fix this but if it doesn't then check that your server has the mbstring PHP extension enabled. You can do that by going to 'Reports -> PHP Info' in the Commentics admin panel and searching for "mbstring". If it's not there or it says that it's disabled then this will likely be part of the problem.

Have you completed the interview?
Reply
#3

Hi,

thanks for your reply!

Settings are mbstring:

   

   

My page is set to UTF-8 encoding:

   
Reply
#4

Okay, can you open /upload/includes/functions/processor.php and make these changes:

Replace this:

PHP Code:
<?php 
$regexp
= "/\b$word\b/i";

With this:

PHP Code:
<?php 
$regexp
= "/\b$word\b/iu";

Replace this:

PHP Code:
<?php 
$regexp
= "/$word/i";

With this:

PHP Code:
<?php 
$regexp
= "/$word/iu";

Then in /upload/includes/app/processor.php

Replace this:

PHP Code:
<?php 
$cmtx_user_answer
= trim(strtolower($_POST['cmtx_user_answer']));

With this:

PHP Code:
<?php 
$cmtx_user_answer
= trim(mb_strtolower($_POST['cmtx_user_answer'], 'UTF-8'));

Replace this:

PHP Code:
<?php 
$cmtx_real_answer
= trim(strtolower($_POST['cmtx_real_answer']));

With this:

PHP Code:
<?php 
$cmtx_real_answer
= trim(mb_strtolower($_POST['cmtx_real_answer'], 'UTF-8'));

Have you completed the interview?
Reply
#5
Thumbs Up 

[Image: 119031075_13172924Smaylikaplodismentuy.jpg]  

Bravo, Steven!  Now everything works fine!

Thank you very much for your help!
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Methyus
16-Sep-2015, 10:52 PM
Last Post by angeljs
28-May-2012, 11:19 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)