vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Redirect to a homepage after log out. (https://vborg.vbsupport.ru/showthread.php?t=67837)

boiboi 07-31-2004 07:19 PM

Redirect to a homepage after log out.
 
I'm not using vbhome. what I have is a regular site not integrated with vb. I'd like my vb to redirect to my homepage after users logout.

CarCdr 07-31-2004 08:31 PM

Quote:

Originally Posted by boiboi
I'm not using vbhome. what I have is a regular site not integrated with vb. I'd like my vb to redirect to my homepage after users logout.

This should work...

In login.php, find:
Code:

        $url = fetch_replaced_session_url($url);
        eval(print_standard_error('error_cookieclear'));

}

// ############################### start do login ###############################
if ($_REQUEST['do'] == 'login')

Change the first two lines of it with:
Code:

$url = 'YOUR HOMEPAGE URL GOES HERE';
eval(print_standard_redirect('Logout', false));


boiboi 08-01-2004 05:09 PM

Ok that one works. Also can it have a 2 - 3 second delay so that users can see the options.

technicali taze 08-01-2004 06:32 PM

i would like to use the same thing but can i set it to close window. my forum opens in new window from flash site. id like logout to then close the window.

plz ty

boiboi 08-03-2004 03:59 AM

anyone?

AntonLargiader 12-20-2005 12:00 PM

Same question for 3.5.2.

Different code in the logout section, so I don't want to do it by trial and error. :)

TIA.

psoexplorer 10-07-2006 05:54 PM

Sorry for bumping a 10 month old thread, but it's the only one I found that had the exact same problem I was having.

I'm using 3.5.4 and have the same problem as the guy above - the code is different than the code posted in this thread. How can I redirect to the main site's index.php when logged out?

DarkDraco07 11-27-2006 08:50 PM

same here <_<
need this for 3.6

codeMonkey32 12-05-2006 08:40 PM

Not entirely sure if this is the 'correct' way to handle it, but it works for 3.6.0:

in your login.php file, find:
PHP Code:

process_logout(); 

Immediately after that add:
PHP Code:

header("Location: /url/to/your/redirect/page");
exit(); 

And that'll redirect you right after you click OK in the Alert window confirming you want to log out.

jasbell 02-19-2007 03:03 AM

2 quick questions:

1) Any way to define the url to redirect to without putting it in the code? If yoyu want to redirect to some page in your domain cant you just use variables that represent
the domain
the path
any parameters and aram values

2) Dont I want to put the exit() function at the END of the code. EX:

process_logout();

$vbulletin->url = fetch_replaced_session_url($vbulletin->url);
if (strpos($vbulletin->url, 'do=logout') !== false)
{
$vbulletin->url = $vbulletin->options['forumhome'] . '.php' . $vbulletin->session->vars['sessionurl_q'];
}
$show['member'] = false;
eval(standard_error(fetch_error('cookieclear', create_full_url($vbulletin->url), $vbulletin->options['forumhome'], $vbulletin->session->vars['sessionurl_q']), '', false));

header("Location: /url/to/your/redirect/page");
exit();


All times are GMT. The time now is 12:22 AM.

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.01015 seconds
  • Memory Usage 1,732KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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