vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Logout Redirect Page (https://vborg.vbsupport.ru/showthread.php?t=202654)

dfc005 01-22-2009 12:22 AM

Logout Redirect Page
 
Hi,

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

Quote:

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
PHP Code:

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 [DATE]1232598644[/DATE] at [TIME]1232598644[/TIME] ---------------

Quote:

Originally Posted by FRDS (Post 1720720)
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.

PHP Code:

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:

PHP Code:

$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 also After Logout Redirect...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!


All times are GMT. The time now is 10:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01115 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete