DJ Homer Posted August 3, 2010 Share Posted August 3, 2010 hi all, im wondering is there a way that i can redirect someone to a different page when they logout?? (e.g. user logs out from client area "http://www.host-the-most.co.uk/client/clientarea.php" and instead of going to "http://www.host-the-most.co.uk/client/logout.php" they go to "http://www.host-the-most.co.uk/") is this possible?? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted August 4, 2010 WHMCS Support Manager Share Posted August 4, 2010 Not quite, but you can edit the logout.tpl file and change the URL clients are taken to. 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted August 4, 2010 Share Posted August 4, 2010 Add the following code in your header.tpl file {if !$loggedin && $filename eq "logout" } <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.host-the-most.co.uk/"> {/if} I hope it will work 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted August 4, 2010 Share Posted August 4, 2010 You could also write a small addon using the "ClientLogout" action hook. 0 Quote Link to comment Share on other sites More sharing options...
DJ Homer Posted August 4, 2010 Author Share Posted August 4, 2010 Not quite, but you can edit the logout.tpl file and change the URL clients are taken to. ok thanks ill have a go at this now You could also write a small addon using the "ClientLogout" action hook. i wouldnt know where to start or what to do Add the following code in your header.tpl file {if !$loggedin && $filename eq "logout" } <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.host-the-most.co.uk/"> {/if} I hope it will work wouldnt this just add another logout button? ill try the method that John gave and see how that goes... ill let you all know how i get on thanks all 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted August 4, 2010 Share Posted August 4, 2010 The code that Slum Host posted will automatically redirect the user to another page after they have logged out. They will still go to the regular logout page, but it will "REFRESH" right away (0 seconds) to the new page. 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted August 4, 2010 Share Posted August 4, 2010 wouldnt this just add another logout button? No this code will NOT add any button, It's just a simple HTML code to redirect. Add that code inside <head> </head> tags (in header.tpl). It will do what you want. 0 Quote Link to comment Share on other sites More sharing options...
DJ Homer Posted August 4, 2010 Author Share Posted August 4, 2010 ok ill ask for your views if this is what you were wanting to do which one of the above methods would you use?? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted August 4, 2010 Share Posted August 4, 2010 I actually use this in my header.tpl in the <head> ... </head> section {if $smarty.server.PHP_SELF == '/logout.php'}<meta HTTP-EQUIV="REFRESH" content="0; url=/">{/if} does exactly the same as SlumHost sugestion 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted August 4, 2010 Share Posted August 4, 2010 (edited) Both have same function right? Edited August 4, 2010 by b.ahmed 0 Quote Link to comment Share on other sites More sharing options...
DJ Homer Posted August 4, 2010 Author Share Posted August 4, 2010 Add the following code in your header.tpl file {if !$loggedin && $filename eq "logout" } <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.host-the-most.co.uk/"> {/if} I hope it will work thanks i used the code above and it works fantastic thanks all for your help 0 Quote Link to comment Share on other sites More sharing options...
b.ahmed Posted August 4, 2010 Share Posted August 4, 2010 Welcome 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.