veenuisthebest
06-14-2008, 07:31 AM
hii..
plz see the screenshot
https://vborg.vbsupport.ru/attachment.php?attachmentid=82282&d=1213432232
i want to create an alphabetical search menu for one of my custom pages exactly like we see in any vB site's memberlist page.
I looked at memberlist.php and found this that has a role in generating this menu but am not able to get it work. I am definitely missing more of code or something.
$ltr = $vbulletin->input->clean_gpc('r', 'ltr', TYPE_NOHTML);
if ($ltr != '')
{
if ($ltr == '#')
{
$condition = "username NOT REGEXP(\"^[a-zA-Z]\")";
}
else
{
$ltr = chr(intval(ord($ltr)));
$condition = 'username LIKE("' . $db->escape_string_like($ltr) . '%")';
}
}
$selectedletter =& $ltr;
// build letter selector
// start with non-alpha characters
$currentletter = '#';
$linkletter = urlencode('#');
$show['selectedletter'] = $selectedletter == '#' ? true : false;
eval('$letterbits = "' . fetch_template('memberlist_letter') . '";');
// now do alpha-characters
for ($i=65; $i < 91; $i++)
{
$currentletter = chr($i);
$linkletter =& $currentletter;
$show['selectedletter'] = $selectedletter == $currentletter ? true : false;
eval('$letterbits .= "' . fetch_template('memberlist_letter') . '";');
}
$sortaddon .= ($ltr != '') ? 'ltr=' . urlencode($ltr) . '&' : '';
$sortaddon .= ($urladd != '') ? $urladd : '';
$sortaddon = preg_replace('#&$#s', '', $sortaddon);
$sorturl = 'memberlist.php?' . $vbulletin->session->vars['sessionurl'] . $sortaddon;
I hope someone can help me get it done !! thank you
plz see the screenshot
https://vborg.vbsupport.ru/attachment.php?attachmentid=82282&d=1213432232
i want to create an alphabetical search menu for one of my custom pages exactly like we see in any vB site's memberlist page.
I looked at memberlist.php and found this that has a role in generating this menu but am not able to get it work. I am definitely missing more of code or something.
$ltr = $vbulletin->input->clean_gpc('r', 'ltr', TYPE_NOHTML);
if ($ltr != '')
{
if ($ltr == '#')
{
$condition = "username NOT REGEXP(\"^[a-zA-Z]\")";
}
else
{
$ltr = chr(intval(ord($ltr)));
$condition = 'username LIKE("' . $db->escape_string_like($ltr) . '%")';
}
}
$selectedletter =& $ltr;
// build letter selector
// start with non-alpha characters
$currentletter = '#';
$linkletter = urlencode('#');
$show['selectedletter'] = $selectedletter == '#' ? true : false;
eval('$letterbits = "' . fetch_template('memberlist_letter') . '";');
// now do alpha-characters
for ($i=65; $i < 91; $i++)
{
$currentletter = chr($i);
$linkletter =& $currentletter;
$show['selectedletter'] = $selectedletter == $currentletter ? true : false;
eval('$letterbits .= "' . fetch_template('memberlist_letter') . '";');
}
$sortaddon .= ($ltr != '') ? 'ltr=' . urlencode($ltr) . '&' : '';
$sortaddon .= ($urladd != '') ? $urladd : '';
$sortaddon = preg_replace('#&$#s', '', $sortaddon);
$sorturl = 'memberlist.php?' . $vbulletin->session->vars['sessionurl'] . $sortaddon;
I hope someone can help me get it done !! thank you