SOLVED Login And Redirect To Current Page


Subject: Login And Redirect To Current Page
after the login, it redirects you to forum.php


I would want that redirect to current page before login.

I have found this code for the login.php, but I think it is for phpbb2


Spoiler: [ Show ]



I found this similar topic, but I cannot find a solution... :cry:
www.icyphoenix.com/viewtopic.php?f=35&t=598

Subject: Re: Login And Redirect To Current Page
I found this:

www.phpbbhacks.com/download/550


in particular redirect_outside.txt and redirect_register.txt

I tried, but no good results... :roll:

Subject: Re: Login And Redirect To Current Page
Hi

My icy phoenix redirects to the current page after login now.... sorry am I miss understanding you question...

Subject: Re: Login And Redirect To Current Page
look at: http://www.pugliabaila.it/discograf...compilation.php

if you login there, you'll be redirect to index.php

Last edited by Gianni PB on Thu 28 Jan, 2010 11:39; edited 1 time in total
Subject: Re: Login And Redirect To Current Page
Any ideas?

Subject: Re: Login And Redirect To Current Page
Hey Gianni

take a look at this codelines:

Code: [Download] [Hide] [Select]
if ( !$userdata['session_logged_in'] )
{
redirect(append_sid(LOGIN_MG . '?redirect=YOUR_SITE.' . PHP_EXT, true));
}


with this code you can set the page after login

Subject: Re: Login And Redirect To Current Page
Where can I put it?

Subject: Re: Login And Redirect To Current Page
I don't know if this is the best solution, but:

Code: [Download] [Hide] [Select]
echo "<a href='" . $_SERVER['PHP_SELF'] . "?&$ascolta_login=true'><font size=\'5\'>Ascolta Album!</font></a><br>";
if($_GET['$ascolta_login'] && !$userdata['session_logged_in'])
redirect(append_sid(LOGIN_MG . '?redirect=' . $_SERVER['PHP_SELF'], true));



and it works... :P


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 0.0825s (PHP: 21% SQL: 79%)
SQL queries: 11 - Debug Off - GZIP Enabled