Remove Redirect Messages

Discussion in 'Customization & add-ons' started by angeliech, May 17, 2011.

  1. angeliech

    angeliech New Member

    Joined:
    May 13, 2011
    Messages:
    4
    Hi,

    Is there a way to remove the redirect messages being shown when a user logs-in, logs-out, signs-up, etc? My client feels that it makes the site look like it's from the 1990's and demands to not display them.

    Found that it is the the templates/redirect.html that is being called everytime there is a redirect. I can remove the actual messages being displayed from it but it would just show a blank page.

    Is there a way to remove that part or automatically redirect to the destination url in less than 1 sec? Thanks!

    Angelie
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    you can modify what shows up on the redirect page in this template (amember/templates/redirect.hml) (ie. make it have a more modern feel for your client)

    Otherwise if you still want to remove it, edit common.inc.php and find this function :
    PHP:
    function html_redirect($url$print_header=0$title=''$text=''){
        global 
    $t;
        if (!
    $t$t = &new_smarty();
        
    $t->assign('title'$title);
        
    $t->assign('text'$text);
        
    $t->assign('url'$url);
        
    $t->display('redirect.html');
    }
    change it to:
    PHP:
    function html_redirect($url$print_header=0$title=''$text=''){
        global 
    $t;
        
    header("Location: $url");exit;
    }
  3. angeliech

    angeliech New Member

    Joined:
    May 13, 2011
    Messages:
    4
    Works great! Thanks

Share This Page