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 03-28-2003, 10:46 AM
poi@nwdnb poi@nwdnb is offline
 
Join Date: Sep 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How vBulletin handles sessions - integrating into main site

I've currently got my forums running, and i've also built the main site on the same domain, that runs using ASP. The ASP pages check the forum cookies etc to verify that a user is logged in, and i have extended the vBulletin database to incorporate all the extra information to be displayed on the main site.

So i can do things like, on the main ASP site, run a query which checks how many people are browsing the forums (by looking at the session table) etc.

What I would like to do though, is to have the ASP page update the session table each time a user moves about the site, so that users who are just browsing the site, and have not visited the forum, appear online aswell.

Can anyone give me some pointers on the steps i should take to update the session table? I've looked through the PHP code and its quite complex, i'm not fussed about it recording WHERE the user is browsing (the session table stores URLs etc) - i just want it to show the user as online..

Any help greatly appreciated.
Reply With Quote
  #2  
Old 03-28-2003, 12:18 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Im not very schooled in ASP, but, if you can include/require global.php in your asp pages somehow it will take care of everything for you
Reply With Quote
  #3  
Old 03-28-2003, 12:21 PM
poi@nwdnb poi@nwdnb is offline
 
Join Date: Sep 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your reply, but i dont think i can make it work in that way. I'll have another look into it, but i cant see how i can call global.php and have the user interact with the updates it performs, without redirecting the user to global.php itself.

Can anyone help with the database transactions behind the sessions?

I'm still on version 2 of vBulletin by the way.
Reply With Quote
  #4  
Old 03-28-2003, 12:27 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

(keep in mind I speaking from my experance in php coding only )

well..i re read your post, and to my understanding your just looking to have the who's online update when a user is on your site pages. That way you will get the 'real' number of online users.

If you include global.php (from the /forum folder, not /forum/admin) it will check for sessions and do all the work of updating the table. However, im not sure if you can include .php scripts in a .asp page...

if that is so you can have a look at sessions.php (if you already have you know what a mess that file is! ). Ill take a peek in a minute and see if i cant extract the query's for you. For now i must eat breakfast and take a shower
Reply With Quote
  #5  
Old 03-28-2003, 12:31 PM
poi@nwdnb poi@nwdnb is offline
 
Join Date: Sep 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't include a .php script to be parsed, from within a ASP page;
I can, though, tell the ASP script to "get" global.php, but then it would be the webserver loading the script, as opposed to the users browser, so i dont think this would update anything.

I think i'm just gonna have to bite the dirt and try and work out how sessions.php works! :ermm:
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 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03624 seconds
  • Memory Usage 2,194KB
  • 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)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