Posts: 535
Threads: 31
Joined: Jul 2010
No problem!
The comments below in the link you gave me say something about Russian not being detected properly. Did you see that one?
I'm giving you three guesses...
Posts: 2,889
Threads: 59
Joined: Jun 2010
It's okay because I'm not using mb_detect_encoding() to try to detect Russian characters, I'm using it to check whether it's ASCII or not. I just tested with Russian characters and it works fine.
Have
you completed
the interview?
Posts: 2,889
Threads: 59
Joined: Jun 2010
It turned out that counting the string length when entering unicode was in fact a big problem as the script was banning the user for exceeding the maximum field length. Simple solution: use the function mb_strlen() instead of strlen().
http://php.net/manual/en/function.mb-strlen.php
Have
you completed
the interview?
Posts: 2,889
Threads: 59
Joined: Jun 2010
I just added the pagination anchor text feature. That's working well.
Have
you completed
the interview?
Posts: 535
Threads: 31
Joined: Jul 2010
Wow, progress seems to be moving on quite well. Are you sure there isn't anything I can work on?
EDIT: the ban feature seems to need improvement.
I'm giving you three guesses...
Posts: 2,889
Threads: 59
Joined: Jun 2010
It's okay thanks, everything is going well with development (so far).
Why do you think the ban feature needs improvement?
Have
you completed
the interview?
Posts: 535
Threads: 31
Joined: Jul 2010
The banning mechanism checks for the 'banned' cookie. If it is found, then the user gets a "you have previously been banned" message, despite the admin deleting the ban. Another row in the 'banned' table which is checked whether the user should be unbanned might work. How does the banning feature work when the cookie is expired and the ban is not deleted yet?
I'm giving you three guesses...
Posts: 2,889
Threads: 59
Joined: Jun 2010
If the ban is not deleted yet and the banning cookie has expired then you are still banned. By then though, the person's IP Address has probably changed. That's one of the reasons for the task that can automatically delete old bans.
Have
you completed
the interview?
Posts: 535
Threads: 31
Joined: Jul 2010
So how about having the cookie deleted if the admin wants it to? If someone was accidentally banned, then they shouldn't have to wait 30 days.
I'm giving you three guesses...
Posts: 2,889
Threads: 59
Joined: Jun 2010
Yeah that would be a good improvement. The best solution of course would be to make sure that no one gets accidentally banned.
Have
you completed
the interview?