Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: falguni1 in November 21, 2007, 02:00:45 VORMITTAG

Titel: Profile as default login page
Beitrag von: falguni1 in November 21, 2007, 02:00:45 VORMITTAG
the default page after we login is the homepage

how do I make the profile the default page after we login in
Titel: Re: Profile as default login page
Beitrag von: Dragooon in November 21, 2007, 06:54:01 VORMITTAG
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.
Titel: Re: Profile as default login page
Beitrag von: - danny in November 21, 2007, 01:31:03 NACHMITTAGS
i like this idea. if anyone tests it, please post results.
Titel: Re: Profile as default login page
Beitrag von: Bulakbol in November 27, 2007, 02:56:29 VORMITTAG
It works with 1.1.4.
Titel: Re: Profile as default login page
Beitrag von: - danny in November 30, 2007, 11:46:50 VORMITTAG
sweet. i tested it and have it in use on 1.1.4. :) thanks!
Titel: Re: Profile as default login page
Beitrag von: brianjw in Dezember 12, 2007, 04:48:38 NACHMITTAGS
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
Titel: Re: Profile as default login page
Beitrag von: djrem in Oktober 04, 2008, 12:04:19 VORMITTAG
Works with 1.1.6
Titel: Re: Profile as default login page
Beitrag von: nay27uk in Oktober 29, 2008, 08:10:21 NACHMITTAGS
Zitat von: brianjw in Dezember 12, 2007, 04:48:38 NACHMITTAGS
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
Titel: Re: Profile as default login page
Beitrag von: brianjw in Oktober 29, 2008, 09:47:25 NACHMITTAGS
Well, since my post in 2007. They have made this possible. ;)
http://custom.simplemachines.org/mods/index.php?mod=1446
Titel: Re: Profile as default login page
Beitrag von: Adish - (F.L.A.M.E.R) in Oktober 30, 2008, 08:44:11 VORMITTAG
http://custom.simplemachines.org/mods/index.php?mod=1443

This seems to be more useful for you i suppose.
Titel: Re: Profile as default login page
Beitrag von: brianjw in Oktober 30, 2008, 04:13:57 NACHMITTAGS
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. ;)