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 02-11-2004, 05:30 PM
DigitalCrowd's Avatar
DigitalCrowd DigitalCrowd is offline
 
Join Date: Nov 2001
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Understanding vb3 Sessions

I am building a site that Vb3 is just one part of the big puzzle. Through reading threads on this site and other places, I have managed to create my system where registration happens outside vbulletin, and creates accounts in vbulletin, posts can be made to vbulletin outside of it. Vb3 is the primary user account system though, and I base everything off of it for my primary user base, but don't use it directly.

I designed it so that I can grow w/ vb3 modifications, but at the same time I am not dependent upon it for everything, so for example, I don't use Vb3 global files in all my scripts, cause it's not needed except when required by a script directly interfacing with Vb3.

ISSUE:

My system works great for users who login and use cookies, whether inside or outside the vb software. My question is... how does Vb3 use session handling for users w/o bbuserid and bbpassword cookies stored. I'd like to be able to peak at this session information when they are on other areas of the site to add that information to my $_SESSION array for the rest of my site's systems. I'd also like for people to be able to login outside of VB3 and I'd like to be able to create the necessary session information for VB3 to finish up this seamless experience.

Any hints or ideas would be helpful.
Reply With Quote
  #2  
Old 02-11-2004, 05:53 PM
DigitalCrowd's Avatar
DigitalCrowd DigitalCrowd is offline
 
Join Date: Nov 2001
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I might actually figure this one out myself... if you login and don't choose "remember" me, then it does create a session cookie called "sessionhash" which I assume is related to the session table... so there probably is a fucntion for that somewhere that I can decode and complete what I need to.

Anyhow, if anyone has any pointers, I am still open... but progress is being made.
Reply With Quote
  #3  
Old 02-11-2004, 06:07 PM
DigitalCrowd's Avatar
DigitalCrowd DigitalCrowd is offline
 
Join Date: Nov 2001
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
<?

include("global.php");

// below variables passed on by login script
$bbuserid="";
$bbpassword="";

// build vbsession w/ remember me!
fetch_sessionhash();
build_session($bbuserid, $bbpassword);

?>
Okay, for those who might do this down the road... passing the bbuserid and bbpassword to this script will create the session setting for vbulletin3 to read. Now I just have to look at the individual functions to reverse engineer it so that I can read those sessions with my scripts to "keep the session alive" for the rest of my site.
Reply With Quote
  #4  
Old 02-23-2004, 05:59 PM
bradsears's Avatar
bradsears bradsears is offline
 
Join Date: Aug 2003
Location: Toronto
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am interested in this as well. I'd like to keep the session alive as well for people with cookies disabled.

I have a bunch of forms on my site and I would like to pass the sessionhash around with the forms but I don't fully understand how vb3 uses the session hash.
Reply With Quote
  #5  
Old 02-24-2004, 12:40 PM
shazzy shazzy is offline
 
Join Date: Feb 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the past I have used...

setcookie("bbuserid","-1", time()-(3600 *24*7*365),"/","domain.com");
setcookie("bbpassword","-1", time()-(3600 *24*7*365),"/","domain.com");

In VB3 this dosent work, do I just change it to:

setcookie("bbuserid","-1", time()-(3600 *24*7*365),"/","domain.com");
setcookie("bbpassword","-1", time()-(3600 *24*7*365),"/","domain.com",LICENCENO);
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 08:02 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.03558 seconds
  • Memory Usage 2,197KB
  • Queries Executed 11 (?)
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)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_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