If statement

Discussion forum for MOD Writers regarding MOD Development.
topthisfact
Registered User
Posts: 146
Joined: Mon Dec 21, 2009 4:15 am

Re: If statement

Post by topthisfact »

Ah thanks for the reply AGC
But let say im redirecting them to a topic
And the topic is viewtopic889034343 and the forum topic inside the same forum
do i use viewtopic889034343.$phpex?

Anyway
If im currently using an auto redirect on login confirm page to index, will it effect the use of this?

calle08
Registered User
Posts: 27
Joined: Tue Mar 11, 2008 3:15 pm

Re: If statement

Post by calle08 »

hmm i tried to make changes now. Edited includes/functions.php in textedior and uploaded it back. But noting happens(still getting to board index) do i need to refresh somthing via admin panel? My own file is called redirect.php and is in my phpBB3 folder.

Code: Select all

if ($result['status'] == LOGIN_SUCCESS)
		{
			$redirect = request_var('redirect', "{$phpbb_root_path}redirect.$phpEx");
			$message = ($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT'];
			$l_redirect = ($admin) ? $user->lang['PROCEED_TO_ACP'] : (($redirect === "{$phpbb_root_path}redirect.$phpEx" || $redirect === "index.$phpEx") ? $user->lang['RETURN_INDEX'] : $user->lang['RETURN_PAGE']);

calle08
Registered User
Posts: 27
Joined: Tue Mar 11, 2008 3:15 pm

Re: If statement

Post by calle08 »

You sure that this is the correct redirect? Is not in the UCP.php or in the forum style header?

Code: Select all

if ($result['status'] == LOGIN_SUCCESS)
      {
 //        $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
 //       $message = ($l_success) ? $l_success : $user->lang['LOGIN_REDIRECT'];
I can do this and still be moved to board index page.

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

Re: If statement

Post by Brf »

All you are doing there is blanking out the message, and ignoring the "redirect" variable. The default is to the index.

calle08
Registered User
Posts: 27
Joined: Tue Mar 11, 2008 3:15 pm

Re: If statement

Post by calle08 »

But where can i change the default redirect then?

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

Re: If statement

Post by Brf »

This statement you commented out:

Code: Select all

        $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
Put a different address in there than index.

calle08
Registered User
Posts: 27
Joined: Tue Mar 11, 2008 3:15 pm

Re: If statement

Post by calle08 »

Must be somewhere else to change? I put this in my phpBB3/functions.php and uplaod it back. But still getting to the forum index page. I have mypage.php in the phpBB3 directory. But must i canges somthing else to?

Code: Select all

if ($result['status'] == LOGIN_SUCCESS)
		{
			$redirect = request_var('redirect', "{$phpbb_root_path}mypage.$phpEx");

calle08
Registered User
Posts: 27
Joined: Tue Mar 11, 2008 3:15 pm

Re: If statement

Post by calle08 »

Still dont think this is right. Somone can try to se if they can get it to work?

Locked

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

cron