ohadpartuck
05-17-2012, 02:22 PM
hi.
I am trying to enable search by my own language letters in the http://www.s-maof.com/Forum/memberlist.php .
so i added this code to memberlist.php at line 504
The thing is that my letters are in hebrew.
The code seems to have problems with that
for ($i=128; $i < 154; $i++)
{
//$currentletter = $i;
$currentletter = chr($i);
$linkletter =& $currentletter;
$show['selectedletter'] = $selectedletter == $currentletter ? true : false;
$templater = vB_Template::create('memberlist_letter');
$templater->register('currentletter', $currentletter);
$templater->register('linkletter', $linkletter);
$templater->register('ltrurl', $ltrurl);
$templater->register('perpage', $perpage);
$templater->register('sortfield', $sortfield);
$templater->register('sortorder', $sortorder);
$templater->register('usergrouplink', $usergrouplink);
$letterbits .= $templater->render();
}
which is the same for the english letters but just different ascii values.
the thing is the code in line 350
$condition .= " AND username LIKE(\"" . $db->escape_string_like($ltr) . "%\")";
doesn't search for the right letter. This is a coding problem.
The advanced serach in my language works. I just don't know how does it do it..!
I am trying to enable search by my own language letters in the http://www.s-maof.com/Forum/memberlist.php .
so i added this code to memberlist.php at line 504
The thing is that my letters are in hebrew.
The code seems to have problems with that
for ($i=128; $i < 154; $i++)
{
//$currentletter = $i;
$currentletter = chr($i);
$linkletter =& $currentletter;
$show['selectedletter'] = $selectedletter == $currentletter ? true : false;
$templater = vB_Template::create('memberlist_letter');
$templater->register('currentletter', $currentletter);
$templater->register('linkletter', $linkletter);
$templater->register('ltrurl', $ltrurl);
$templater->register('perpage', $perpage);
$templater->register('sortfield', $sortfield);
$templater->register('sortorder', $sortorder);
$templater->register('usergrouplink', $usergrouplink);
$letterbits .= $templater->render();
}
which is the same for the english letters but just different ascii values.
the thing is the code in line 350
$condition .= " AND username LIKE(\"" . $db->escape_string_like($ltr) . "%\")";
doesn't search for the right letter. This is a coding problem.
The advanced serach in my language works. I just don't know how does it do it..!