Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: falguni1 on November 21, 2007, 02:00:45 AM

Title: Profile as default login page
Post by: falguni1 on November 21, 2007, 02:00:45 AM
the default page after we login is the homepage

how do I make the profile the default page after we login in
Title: Re: Profile as default login page
Post by: Dragooon on November 21, 2007, 06:54:01 AM
In /Sources/LogInOut.php(FIRST MAKE A BACKUP AS I HAVE NOT TESTED IT!)
Find
// Double check the cookie...
elseif (isset($_GET['sa']) && $_GET['sa'] == 'check')
{
// Strike!  You're outta there!
if ($_GET['member'] != $ID_MEMBER)
fatal_lang_error('login_cookie_error', false);

// Some whitelisting for login_url...
if (empty($_SESSION['login_url']))
redirectexit();
else
{
// Best not to clutter the session data too much...
$temp = $_SESSION['login_url'];
unset($_SESSION['login_url']);

redirectexit($temp);
}
}

replace with
// Double check the cookie...
elseif (isset($_GET['sa']) && $_GET['sa'] == 'check')
{
// Strike!  You're outta there!
if ($_GET['member'] != $ID_MEMBER)
fatal_lang_error('login_cookie_error', false);

// Some whitelisting for login_url...
if (empty($_SESSION['login_url']))
redirectexit($scripturl . '?action=profile');
else
{
// Best not to clutter the session data too much...
$temp = $_SESSION['login_url'];
unset($_SESSION['login_url']);

redirectexit($temp);
}
}

Make sure to BACKUP the file before doing this. This is 100% untested.
Title: Re: Profile as default login page
Post by: - danny on November 21, 2007, 01:31:03 PM
i like this idea. if anyone tests it, please post results.
Title: Re: Profile as default login page
Post by: Bulakbol on November 27, 2007, 02:56:29 AM
It works with 1.1.4.
Title: Re: Profile as default login page
Post by: - danny on November 30, 2007, 11:46:50 AM
sweet. i tested it and have it in use on 1.1.4. :) thanks!
Title: Re: Profile as default login page
Post by: brianjw on December 12, 2007, 04:48:38 PM
I think that would annoy users sometimes but that's my opinion...
However, is it possible to make something for the first time they login to the forum ever, it directs them to their profile and only that one time...

brianjw
Title: Re: Profile as default login page
Post by: djrem on October 04, 2008, 12:04:19 AM
Works with 1.1.6
Title: Re: Profile as default login page
Post by: nay27uk on October 29, 2008, 08:10:21 PM
Quote from: brianjw on December 12, 2007, 04:48:38 PM
I think that would annoy users sometimes but that's my opinion...
However, is it possible to make something for the first time they login to the forum ever, it directs them to their profile and only that one time...

brianjw

Yeah i agree If this was made so when people join they was redirected to fill in their profile then that's cool. maybe someone could do this for us
Title: Re: Profile as default login page
Post by: brianjw on October 29, 2008, 09:47:25 PM
Well, since my post in 2007. They have made this possible. ;)
http://custom.simplemachines.org/mods/index.php?mod=1446
Title: Re: Profile as default login page
Post by: Adish - (F.L.A.M.E.R) on October 30, 2008, 08:44:11 AM
http://custom.simplemachines.org/mods/index.php?mod=1443

This seems to be more useful for you i suppose.
Title: Re: Profile as default login page
Post by: brianjw on October 30, 2008, 04:13:57 PM
The difference is, is that the mod I posted only transfers to profile once and that is right after you register. It doesn't continue when you login. ;)