07-Jan-2011, 06:57 PM
Well, allowing users to add comments is quite nice feature to bring some interactivity to a website
But if I had to choose between "useless comment" and "no cmment"? I would choose "no comment"
What I mean by "useless cmment" is comments like:
veryyyyyy gooood
tra lal laaaaaaa
So is there any mean to detect such comments and block them, displaying an errror message?
Bad comments for me also includes arabic comments written in latin characters!!!
It looks ugly and less professional for my website 
So can I also block any comment written with character other than arabic? (Arabic are like: ا ب ت ج ح خ ....)
Back when I was using phpbb3 forum software, I had the following code to ensure that usernames choosen by new registred members contain only arabic characters plus numerics:
is it possible to reuse it to acheive my goal?
But if I had to choose between "useless comment" and "no cmment"? I would choose "no comment"
What I mean by "useless cmment" is comments like:
veryyyyyy gooood
tra lal laaaaaaa
So is there any mean to detect such comments and block them, displaying an errror message?
Bad comments for me also includes arabic comments written in latin characters!!!


So can I also block any comment written with character other than arabic? (Arabic are like: ا ب ت ج ح خ ....)
Back when I was using phpbb3 forum software, I had the following code to ensure that usernames choosen by new registred members contain only arabic characters plus numerics:
Code:
$regex = '[\p{Arabic}0-9-[\]_+ ]*\p{Arabic}+[\p{Arabic}0-9-[\]_+ ]*';
