PDA

View Full Version : Alphabar


iguanairs
11-13-2010, 10:46 AM
I am looking top rewrite the alphabar via the htaccess. Having the URLs rewritten and then adding ltr="letter" looks horrible. I wouldn't mind if they were something like "cattitle/"letter"/

How would I go about doing this? I am not against editing files. lol I bought 2 licenses recently and one of them is a multi-instance. This feature is pretty important for what I am trying to do.

Thanks for any assistance you can provide.

Brian
11-15-2010, 10:54 AM
If you search your dynamics/browsecategory.php file for "ltr=" then you should see where the URL for those is set. You'd just need to change that and then update your .htaccess file to add a new redirect.

Our Sponsors
 

iguanairs
11-16-2010, 09:53 PM
Thanks Brian, I will give this a go and see what I can come up with.

iguanairs
11-20-2010, 10:24 PM
I can't seem to get this right. I have tried several times to get this working but cannot. Could you give me a bit more guuidance please? I think I am screwing up the php file part.

This is what I need to change (I believe):

{
$letterurl_start = 'browsecategory.php?' . $vbulletin->session->vars['sessionurl'] . 'do=' . $_REQUEST['do'];
$letter_nospider = true;
}
else
{
$letterurl_start = dyna_fetch_cat_url(
$catid,
iif($_REQUEST['do'] == 'member' OR ($catinfo['memberscat'] AND $entryuserid),
array('title' => $entryusername, 'userid' => $entryuserid),
array()
),
iif($_REQUEST['do'] == 'member', 'member')
);
}

$letterurl_middle = ($vba_options['dyna_spiderurls'] AND !$letter_nospider AND !$vbulletin->session->vars['sessionurl']) ? '?' : '&';

foreach($alphabet as $lkey => $letter)
{
if ($lkey == 0)
{
$entryletter = '';
}
else if ($lkey == 1)
{
$entryletter = 'nonalpha';
}
else
{
$entryletter = $letter;
}

$letterselected = ($ltr == $entryletter) ? true : false;

$letterurl = $letterurl_start . $letterurl_middle . 'ltr=' . $entryletter . $adv_sorturl_ltr;

I am just not certain how I am supposed to go about changing it.