News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

change login landing page

Started by snazster, March 28, 2010, 09:54:08 AM

Previous topic - Next topic

snazster

Hi,

I'd like users to login from any page but be redirected upon successful login to a page called index33.php.

Where and how do I make these changes - I've looked through sources/loginout.php and tried a couple of changes to no avail - can anyone suggest anything? 
We're all here to learn!

Kays

Hi, something to try. In LoginOut.php look for:


// Set the login URL - will be used when the login process is done.
if (isset($_SESSION['old_url']) && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0)
$_SESSION['login_url'] = $_SESSION['old_url'];
else
unset($_SESSION['login_url']);


and add the following after it. Change index33.php to the full url to that page. the http://  needs to be there.


  $_SESSION['login_url'] = 'index33.php';

If at first you don't succeed, use a bigger hammer. If that fails, read the manual.
My Mods

snazster

Hi,

Thanks for ttrying. 

That didn't do it for me.  The url still ends up being ...index.php?PHPSESSID=4648083f5ec750558be832ec8e795ccc;action=forum

Any ideas? 
We're all here to learn!

snazster

This has become quite important for me now but I see to be going round and round in circles trying to solve the problem - does anyone else have any ideas? 

We're all here to learn!

Antechinus

Do you still need help with this?

Advertisement: