Posts: 3
Threads: 1
Joined: Sep 2011
Hello. Instal the script to my site. Everything works. But when to enter comments in Russian displays an error message that is too short, if English is fine. What should I do?
Posts: 535
Threads: 31
Joined: Jul 2010
Hi. Does this occur however much words or characters you have in the comment? You may want to play around with the settings in the admin panel under "settings->processing->comment" and set the value for 'Min words' to 1 or 0, or if that doesn't work, try 'Min characters'. Everything seems to be working with my tests, but the function used to check the amount of characters has changed from 'strlen' to 'mb_strlen' since the last time I looked at the code. You may want to try changing line 486 in "comments/includes/functions/processor.php" from:
PHP Code:
<?php
$comment_number_of_characters = mb_strlen($comment); //number of characters in comment
to:
PHP Code:
<?php
$comment_number_of_characters = mb_strlen($comment,'UTF-8'); //number of characters in comment
I'll be able to help more when you reply.
Russian Translation Wrote:Привет. А это случается не смотря на количество слов/букв в комментарии? Посмотри в администраторской панели под "settings->processing->comment" и попробуй поменять 'Min words' на 1 или 0, и если это не сработает, попробуй то-же с 'Min characters'. У меня вроде-бы всё работает, но функция которая перевирает количество слов поменялась с 'strlen' на 'mb_strlen' с последнего раза я смотрел на код. Ещё можно попробовать поменять строчку 486 в из: PHP Code:
<?php
$comment_number_of_characters = mb_strlen($comment); //number of characters in comment
на:
PHP Code:
<?php
$comment_number_of_characters = mb_strlen($comment,'UTF-8'); //number of characters in comment
Я смогу больше помочь когда вы ответите.
--Static
Posts: 3
Threads: 1
Joined: Sep 2011
Thank you for your reply. Changing the settings of the minimum Number of characters. It did not help, adds comment, but it is empty. Changed the line in the file, the same result. It turns out that the script does not recognize the Russian language. If a user name, which adds a comment, after adding the name of the same empty, the English language are okay
Posts: 535
Threads: 31
Joined: Jul 2010
I don't really understand why it's not working on your website since it works in the demo, and in all of my local tests. You may want to make sure that your <head> tag has
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
in it, and that your file is saved in utf-8 encoding. It probably won't work in other encodings since Commentics uses utf-8 for storing the comment (specifically for multilingual purposes) and sending it as another encoding would probably mess it up, but I haven't tested it that much and this would probably result in gibberish text, not an empty comment. If that doesn't work, a link to the website or a test page would be appreciated if possible.
Russian Translation Wrote:Я не совсем понимаю почему у вас не работает. Оно работает в демо и у меня в моих тестах. Переверте если на вашей страницы <head> имеет Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
, и переверте если файл сохранён в utf-8. Русский наверно что не будет правильно проходить в систему, которая весь текст держит в utf-8 (именно для разноязычия), в других кодировках, но я в это не очень вглядывался и это наверно что показывало бы мусор. Если это не работает, то ссылка на ваш вебсайт или к странице где вы пробуйте скрипт очень помогло бы.
I'm giving you three guesses...
Posts: 32
Threads: 11
Joined: Dec 2010
Hi!
Does this trouble occur also in example.php?
Probably, the character code of the incorporated program file is different.
windows-1251?
---------------------------------------------------
Commentics's Japanese Commentary Site
http://commentics.bbfriend.net/
*Sorry...I am not good at English.
---------------------------------------------------
Posts: 3
Threads: 1
Joined: Sep 2011
Link where installed script
http://ooo-novstal.ru/spravka.htm
My site has a windows-1251, the mysql of this too. Probably not working because of this.
Change the encoding site does not really want.
In example.php tried different encoding. does not help.