PDA

View Full Version : Logout Redirect Page


dfc005
01-22-2009, 12:22 AM
Hi,

When you've logged out and then log back in from the...

You have been logged out.

* Return to the page you were previously viewing
* Home


... screen you seem to get redirected to the vbulletin homepage. I'm currently using forum.php as the vBulletin homepage because I have a separate homepage which is index.php.

Now what I want is, if you login from the "You have been logged out" screen, it redirects you to index.php instead.

Any ideas? Is it a simple admincp setting I'm missing?

SEOvB
01-22-2009, 12:44 AM
you could create a plugin at the login_redirect hook with something like

if ($vbulletin->userinfo['userid'] AND THIS_SCRIPT == 'login'){
$vbulletin->url = '' . $vbulletin->options['bburl'] . ";
standard_redirect();
}


I'm not sure if thats the exact syntax for everyhting but it should be pretty close

dfc005
01-22-2009, 01:01 AM
Nope, that doesn't seem to work. Good idea though.

--------------- Added 1232598644 at 1232598644 ---------------

I'm not sure if thats the exact syntax for everyhting but it should be pretty close

Hmmm, was pretty close. I ended up using this instead as my plugin.

if(strpos($_SERVER['HTTP_REFERER'],'logout') > 0) {
$vbulletin->url = 'http://'.$_SERVER['HTTP_HOST'];
}

Shaliza
01-22-2009, 02:37 AM
This works like a charm for me:

$vbulletin->url = 'http://your-forum-url-here';

Dax IX
01-24-2009, 07:05 AM
This is great! I was looking for this.

Now, how about the standard redirect for logging out? I'd like to just send users to the homepage (same as above, I have my forums index as "forums.php" and I want them to be directed to "portal.php", or, actually "/").

Thanks! :)

princeedward
01-24-2009, 07:52 AM
Maybe someone want to try Redirect After Login (https://vborg.vbsupport.ru/showthread.php?t=156992) also After Logout Redirect (https://vborg.vbsupport.ru/showthread.php?t=156840)...it works for me too...



;):up:

Dax IX
01-24-2009, 08:15 AM
The logout script worked AMAZINGLY!

I'll have to try out the login script, too.

BTW, I'm working with vB 3.8.0

Thanks!