• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Custom Tabs

Custom Tabs 1.6.3

No permission to download

Ludachris

Well-known member
@Ludachris, try this code (replace the uriMatch method):
PHP:
public static function uriMatch($uri)
    {
        $requestPaths  = XenForo_Application::get('requestPaths');
        $requestUri    = $requestPaths['requestUri'];
        $fullUri       = $requestPaths['fullUri'];
        $noBasePathUri = substr($requestUri, strlen($requestPaths['basePath']), strlen($requestUri));

        if ($uri == $requestUri
            || $uri == $fullUri
            || $uri == $noBasePathUri
            || preg_match('/[?&]/', $noBasePathUri) && preg_match('@^/?' . preg_quote($uri) . '@', $noBasePathUri))

        {
            return true;

        }
    }
This will work with routes, not full URLs.
That didn't seem to work either. If I create a child tab for each filtering option the tab will stay selected because the URL matches. But that isn't ideal, as there will eventually be a LOT of filtering options, and creating child tabs for all of them doesn't make sense.

Here's an example of a filtered URL that isn't working:
http://www.dsmtuners.com/timeslips/filter?transmission_type=Automatic&case=timeslips