Jump to content

WarpConduit Computing

Senior Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About WarpConduit Computing

  • Rank
    Junior Member
  1. WarpConduit Computing

    Turn off "Hide Inactive Clients" for good?

    Please try this updated code if you need support for pagination: add_hook( 'AdminAreaPage', 1, function ( $vars ) { if ( $vars['filename'] == 'clients' && $_GET['show_hidden'] != '1' ) { $url_parts = parse_url(html_entity_decode($_SERVER['REQUEST_URI'])); parse_str($url_parts['query'], $query_vars); $query_vars['show_hidden'] = 1; $url_parts['query'] = http_build_query($query_vars); $redirect_url = ((isset($url_parts['path']) ? "{$url_parts['path']}" : '') . (isset($url_parts['query']) ? "?{$url_parts['query']}" : '') . (isset($url_parts['fragment']) ? "#{$url_parts['fragment']}" : '')); header( 'Location: '.$redirect_url, true, 307 ); } } ); Also, if you have a more complex URL structure this longer version is for you: add_hook('AdminAreaPage', 1, function($vars){ if ($vars['filename'] == 'clients' && $_GET['show_hidden'] != '1'){ $current_url = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http').'://'.$_SERVER['SERVER_NAME'].html_entity_decode($_SERVER['REQUEST_URI']); $url_parts = parse_url($current_url); parse_str($url_parts['query'], $query_vars); $query_vars['show_hidden'] = 1; $url_parts['query'] = http_build_query($query_vars); $redirect_url = ((isset($url_parts['scheme']) ? "{$url_parts['scheme']}:" : ''). ((isset($url_parts['user']) || isset($url_parts['host'])) ? '//' : ''). (isset($url_parts['user']) ? "{$url_parts['user']}" : ''). (isset($url_parts['pass']) ? ":{$url_parts['pass']}" : ''). (isset($url_parts['user']) ? '@' : ''). (isset($url_parts['host']) ? "{$url_parts['host']}" : ''). (isset($url_parts['port']) ? ":{$url_parts['port']}" : ''). (isset($url_parts['path']) ? "{$url_parts['path']}" : ''). (isset($url_parts['query']) ? "?{$url_parts['query']}" : ''). (isset($url_parts['fragment']) ? "#{$url_parts['fragment']}" : '')); header('Location: '.$redirect_url, true, 307); } });
  2. Welcome to WHMCS.Community WarpConduit Computing! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated