Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-31-2004, 07:19 PM
boiboi boiboi is offline
 
Join Date: Nov 2001
Location: san francisco, ca
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 07-31-2004, 08:31 PM
CarCdr CarCdr is offline
 
Join Date: Apr 2004
Posts: 242
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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));
Reply With Quote
  #3  
Old 08-01-2004, 05:09 PM
boiboi boiboi is offline
 
Join Date: Nov 2001
Location: san francisco, ca
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok that one works. Also can it have a 2 - 3 second delay so that users can see the options.
Reply With Quote
  #4  
Old 08-01-2004, 06:32 PM
technicali taze technicali taze is offline
 
Join Date: Jul 2004
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 08-03-2004, 03:59 AM
boiboi boiboi is offline
 
Join Date: Nov 2001
Location: san francisco, ca
Posts: 133
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone?
Reply With Quote
  #6  
Old 12-20-2005, 12:00 PM
AntonLargiader AntonLargiader is offline
 
Join Date: Dec 2005
Location: Charlottesville, VA
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 10-07-2006, 05:54 PM
psoexplorer psoexplorer is offline
 
Join Date: Sep 2003
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #8  
Old 11-27-2006, 08:50 PM
DarkDraco07's Avatar
DarkDraco07 DarkDraco07 is offline
 
Join Date: Apr 2002
Posts: 414
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

same here <_<
need this for 3.6
Reply With Quote
  #9  
Old 12-05-2006, 08:40 PM
codeMonkey32 codeMonkey32 is offline
 
Join Date: May 2006
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 02-19-2007, 03:03 AM
jasbell jasbell is offline
 
Join Date: Feb 2007
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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();
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:43 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04912 seconds
  • Memory Usage 2,254KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete