vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   General vB Session Guidance (https://vborg.vbsupport.ru/showthread.php?t=52887)

etones 05-13-2003 10:35 AM

General vB Session Guidance
 
Hi all, looking for a little help with vB sessions.

Firstly, it seems to use its own session system, non PHP standard, just wondering how to use it.

If I have a script someaddon.php, how whould I go about using the vb sessions to see if users have been logged in etc?

Any tips or links, is it just a matter of using the inbuilt functions?

Help... the code is far too messey and scary to work out lol :)

Thanks to everyone who replies,
Taz

filburt1 05-13-2003 10:41 AM

All you have to do is add:
PHP Code:

require("./global.php"); 

...which loads everything that a vB page uses including sessions, $bbuserinfo, the database connection, functions.php, etc.

etones 05-13-2003 11:03 AM

hmmm, im actually developing an image gallery script that can run either standalone or with vB.

Now, including a vB global.php could be very over the top, is there any other way, without the bloat?

Taz

filburt1 05-13-2003 01:21 PM

I'm not sure but try including sessions.php. Hopefully that'll create a session, but also IIRC it needs a database connection which can be tedious to create with DB_Mysql_vb (or whatever it's called).

etones 05-14-2003 02:45 PM

well, can you clarify something for me.

Does vb use sessions, cookies or both?

Ie. i know its not using pure sessions with session_start() however there is a sessions table in the db and it can be set to move sessions through the query string.

Alternatively, if it uses cookies, they can be accessed manually as long as you're in the same domain, how would I go about doing this?

Cheers
Taz

filburt1 05-14-2003 02:47 PM

It uses sessions if a user has cookies off in his user CP or if the user is a guest.

Check out http://www.php.net/cookie for how to use cookies.

etones 05-14-2003 03:17 PM

cheers filburt.

will look into reading the vbulletin cookies

Taz


All times are GMT. The time now is 01:41 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.01095 seconds
  • Memory Usage 1,719KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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