Back to vBulletin 3.6 Add-ons

Redirect To Page Viewed Before Login
Mod Version: 1.00, by armatik

This modification is in the archives.
vB Version: 3.6.8 Rating: (0 vote - 0 average) Installs: 12
Released: 25 Sep 2007 Last Update: Never Downloads: 3
Not Supported Code Changes  

This hack simply makes the browser redirect back to the page you were viewing before you logged in when you log in. I myself was getting pretty pissed off when I'd get logged out of the admin panel and log in, to find myself at the bloody forum home. Also useful for login boxes outside of the forums.

Anyway, this is what you do. First, go to login.php and (by default line 136) find:

PHP Code:
exec_header_redirect($vbulletin->options['forumhome'] . '.php'); 
And replace with:

PHP Code:
$vbulletin->input->clean_gpc('s''REQUEST_URI'TYPE_NOHTML);
exec_header_redirect($vbulletin->GPC['REQUEST_URI']); 
I'm not sure exactly if you need to clean the $_SERVER variable, or if I even cleaned it right, but I did it just incase.

Next, go to /includes/functions_login.php, and (by default on line 292) find:

PHP Code:
$vbulletin->url $vbulletin->options['forumhome'] . '.php' $vbulletin->session->vars['sessionurl_q']; 
And replace it with:

PHP Code:
$vbulletin->input->clean_gpc('s''REQUEST_URI'TYPE_NOHTML);
$vbulletin->url $vbulletin->GPC['REQUEST_URI'] . $vbulletin->session->vars['sessionurl_q']; 
And that's it!

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2025