pligg is one of most promising content managment systems. it is an open source digg clone.  it has a very good development team. still it will need more time to reach its golden age.

i am using pligg for many of my web projects. this is one of them: http://www.alegabat.net/

it is working on an arabized version of pligg, which i translated myself.

the problem is that when user submit a new link, he/she will need to write the english comma between tags (,) where arabic has its own comma charchter (،). add to that, i can not force my clients to switch languages because of commas. so i decided to add the arabic comma as a separator for the tags.

the trick is so simple, here we go:

consider this line of tags:

multi,separators-for،pligg+1.0,tags

pligg will tokenize them as following:

  • multi
  • separators-for،pligg+1.0
  • tags

this is just a big problem and this is the my solution:

open “submit.php”, and find this line:

$linkres->tags = tags_normalize_string(sanitize($_POST['tags'], 3));

change it to:

//dimw, add arabic comma as a tags seperator
//step1, convert  to the arabic comma to english comma
$tmp=str_replace("،",",",sanitize($_POST['tags'], 3));
//uncomment next line to add + as a tags sperator, you can add more ...
//$tmp=str_replace("+",",",sanitize($_POST['tags'], 3));
//step2, add the tags line
$linkres->tags = tags_normalize_string($tmp);
//dimw, end

explain it:

we told pligg to convert all the characters we want to use as tags separators to the english comma (,). after this everything will work as if users used the (,) when they insert their desierd tags.

all the best :)