Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-11-2005, 07:06 PM
t0ny t0ny is offline
 
Join Date: Nov 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Intercepting vB login

Is there a way I can intercept a successful login; so that before the redirecting screen i can quickly pop to another page and then carry on to the redirect screen??
Reply With Quote
  #2  
Old 12-11-2005, 08:56 PM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you just want it when they login, or when someone with cookies visits your site and is "automatically" logged in? (I currently have a plugin that notifies me when anyone logs into admincp or modcp, works really well)
Reply With Quote
  #3  
Old 12-11-2005, 09:08 PM
t0ny t0ny is offline
 
Join Date: Nov 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

What i want to acheive is that when someone logs into the forum it sets an ASP session variable so my main site knows someone has logged in too.

The only way i thought this was possible, was before the redirection screen is displayed, fire an asp page off, then fire the redirection page ????

but sorry YES, i want it for when someone is automatically logged in too!
Reply With Quote
  #4  
Old 12-11-2005, 09:31 PM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If your asp page is in the same domain and your cookie path/domain is set properly you wont need to do what you're suggesting, however I strongly suggest you reconsider using ASP for extensions unless you know what you're doing.
Reply With Quote
  #5  
Old 12-11-2005, 09:37 PM
t0ny t0ny is offline
 
Join Date: Nov 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes it is in the same domain and I can see the cookies from within my ASP page, does the glbals include set the sessions if it finds the cookies?

The whole main site is in ASP, and I only have until the 16th to get this done; so I can't rewrite it in PHP, besides i am not too hot on PHP either..

Just need to make my ASP app aware that a login has occured, I thought i had sussed it with a hidden iFrame, but obviously this renders after the main page which is too late...

I am going to Fail!!!!!
Reply With Quote
  #6  
Old 12-11-2005, 09:51 PM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There should be a cookie called <cookieprefix>session, or the like containing a sessionhash that you can match to the vbulletin session table.

No need to touch php.
Reply With Quote
  #7  
Old 12-11-2005, 09:55 PM
t0ny t0ny is offline
 
Join Date: Nov 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh, so there is a cookie that will tell me the session details, ie login id etc?

What happens if someone has cookies disabled or no remember me ticked? Can vBulletin work without cookies?
Reply With Quote
  #8  
Old 12-11-2005, 10:09 PM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the browser doesnt have cookies enabled you're up shit creek (no paddle) unless you want to start messing with sessionhashes on the url (which ive never looked at), the only thing the cookie will tell you is a sessionhash - youll need to query it from the db and compare the password (in another cookie) against the user database.
Reply With Quote
  #9  
Old 12-11-2005, 10:19 PM
t0ny t0ny is offline
 
Join Date: Nov 2005
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ahh, does vB work with cookies off? i guess it only has to look at its session variables...

So the only way i am going to be able to tell if someone is logged in from ASP is to check that cookie?
Reply With Quote
  #10  
Old 12-11-2005, 10:31 PM
merk merk is offline
 
Join Date: Nov 2001
Location: Canberra, Australia
Posts: 601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vbulletin works fine without cookies, its your script that will break if they are disabled because its not possible for you to know if someone is logged in or not unless vbulletin passes a session hash back to your pages. I dont suspect they will visit the forums before the main site. (That and intergrating a seperate sessionhash into your site is a big job, every url needs to pass one).
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 06:11 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.04305 seconds
  • Memory Usage 2,245KB
  • 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
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete