Page to reach after login

Discussion forum for MOD Writers regarding MOD Development.
Locked
Haydn1732
Registered User
Posts: 53
Joined: Sat Aug 08, 2009 3:22 pm

Page to reach after login

Post by Haydn1732 » Mon Jun 28, 2010 8:42 am

I searched for this problem but couldn't find it. When someone has logged into my forums, I want the text right now is:
Information

You have been successfully logged in.

Return to the index page
Instead of returning to the index page, I would like to return to the root - /.

I'm sure this is a simple thing to solve, but I can't find it.. :oops:

Thanks for your help.

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: Page to reach after login

Post by tbackoff » Mon Jun 28, 2010 11:45 am

*EDIT* retracted, misread post. :oops:
Last edited by tbackoff on Mon Jun 28, 2010 11:56 am, edited 1 time in total.
Flying is the second best thrill to cheerleaders; being caught is the first.

Comkid
Registered User
Posts: 132
Joined: Thu Mar 25, 2010 5:40 am

Re: Page to reach after login

Post by Comkid » Mon Jun 28, 2010 11:53 am

OPEN: ucp.php

FIND:

Code: Select all

redirect(append_sid("{$phpbb_root_path}index.$phpEx")); 
REPLACE WITH:

Code: Select all

redirect("URL_HERE"); 
Put your URL in place of URL_HERE ;)
I ist Comkid :P

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51695
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Page to reach after login

Post by Brf » Mon Jun 28, 2010 12:12 pm

And how will that help? The redirection is done from login_box(), not from ucp.php.

Haydn1732
Registered User
Posts: 53
Joined: Sat Aug 08, 2009 3:22 pm

Re: Page to reach after login

Post by Haydn1732 » Wed Jun 30, 2010 5:26 am

Brf wrote:And how will that help? The redirection is done from login_box(), not from ucp.php.
What do I change in the login_box function in order to get to the root of my domain, without a link as well?

Thanks.

Comkid
Registered User
Posts: 132
Joined: Thu Mar 25, 2010 5:40 am

Re: Page to reach after login

Post by Comkid » Wed Jun 30, 2010 9:35 am

Try this:

OPEN: includes/functions.php

FIND:

Code: Select all

$redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx"); 
REPLACE WITH:

Code: Select all

$redirect = 'URL HERE'; 
FIND:

Code: Select all

$l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}index.$phpEx" || $redirect === "index.$phpEx") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']); 
REPLACE WITH:

Code: Select all

$l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}index.$phpEx" || $redirect === "index.$phpEx" || $redirect === "URL HERE") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']); 
FIND:

Code: Select all

$redirect = reapply_sid($redirect); 
REPLACE WITH:

Code: Select all

//$redirect = reapply_sid($redirect);  
FIND:

Code: Select all

$redirect = meta_refresh(3, $redirect); 
REPLACE WITH:

Code: Select all

$redirect = meta_refresh(3, $redirect, true); 
REMEMBER to replace URL HERE with your URL
I ist Comkid :P

Haydn1732
Registered User
Posts: 53
Joined: Sat Aug 08, 2009 3:22 pm

Re: Page to reach after login

Post by Haydn1732 » Sat Jul 17, 2010 8:06 am

Thanks a lot, works very nice! :D

Locked

Return to “[3.0.x] MOD Writers Discussion”