Advertisement:

Author Topic: Profile as default login page  (Read 15439 times)

Offline falguni1

  • Full Member
  • ***
  • Posts: 652
  • Gender: Female
  • http://beautymakeupdivas.com/
Profile as default login page
« 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

Offline Dragooon

  • Developer
  • SMF Hero
  • *
  • Posts: 6,567
  • Gender: Male
  • I'm batman
    • ShitizGarg on Facebook
    • Dragooon on GitHub
    • dragooon on LinkedIn
    • SMF-Media
Re: Profile as default login page
« Reply #1 on: November 21, 2007, 06:54:01 AM »
In /Sources/LogInOut.php(FIRST MAKE A BACKUP AS I HAVE NOT TESTED IT!)
Find
Code: [Select]
// 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
Code: [Select]
// 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.

Offline - danny

  • Jr. Member
  • **
  • Posts: 287
  • Gender: Male
    • The ThirdEye Concept
Re: Profile as default login page
« Reply #2 on: November 21, 2007, 01:31:03 PM »
i like this idea. if anyone tests it, please post results.

Offline Bulakbol

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,220
  • Gender: Male
  • JohnyB
Re: Profile as default login page
« Reply #3 on: November 27, 2007, 02:56:29 AM »
It works with 1.1.4.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Offline - danny

  • Jr. Member
  • **
  • Posts: 287
  • Gender: Male
    • The ThirdEye Concept
Re: Profile as default login page
« Reply #4 on: November 30, 2007, 11:46:50 AM »
sweet. i tested it and have it in use on 1.1.4. :) thanks!

Offline brianjw

  • SMF Hero
  • ******
  • Posts: 2,154
  • Gender: Male
Re: Profile as default login page
« Reply #5 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

Offline djrem

  • Semi-Newbie
  • *
  • Posts: 90
Re: Profile as default login page
« Reply #6 on: October 04, 2008, 12:04:19 AM »
Works with 1.1.6

Offline nay27uk

  • Full Member
  • ***
  • Posts: 573
  • Gender: Male
    • Lister Hosting
Re: Profile as default login page
« Reply #7 on: October 29, 2008, 08:10:21 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

Offline brianjw

  • SMF Hero
  • ******
  • Posts: 2,154
  • Gender: Male
Re: Profile as default login page
« Reply #8 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

Offline (F.L.A.M.E.R)

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 10,614
  • Gender: Male
  • I am a ninja!
    • adishpatel on Facebook
Re: Profile as default login page
« Reply #9 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.
Need paid assistance for your forum? CLICK ME!
Email: flamer@simplemachines.org (Stop sending me love proposals! I don't do Internet dating :P)

Offline brianjw

  • SMF Hero
  • ******
  • Posts: 2,154
  • Gender: Male
Re: Profile as default login page
« Reply #10 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. ;)