The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
hello.
i've searched this forum extensively for hints to figure out how to use 3.5 sessions. i've read through the vb_Session class code as well but i am still unable to simply set a session variable that is saved on the next page reload. i accessed the set function in the class using $vbulletin->session->set(...) and the variable was inserted into the vars array but was not saved. it appears that the only variables that are ever saved are in the db_fields array but i can't modify this for a general code plugin. can someone please explain how to save a session variable without reverting to the session_start() mechanism? thanks, jason. |
#2
|
||||
|
||||
![]()
Assuming you've altered the session table:
PHP Code:
|
#3
|
|||
|
|||
![]()
that seems rather excessive just to save a few session variables. is it just me or is this method of session handling rather rigid?
if there's no other way i'll just have to pollute the execution time with another database query. |
#4
|
||||
|
||||
![]()
Hmm, which problem do you see exactly with sessions?
|
#5
|
|||
|
|||
![]()
here's my problem: i have a settings table for my modification. i thought i might try to query the table once per session to avoid unnecessary db querying but it seems like i would just be putting the settings in the session table as session variables anyway.
i see no benefit to writing db script code on top of my mod code just to support using the session that is dependent upon the database. maybe the guys who wrote this up are trying to make it more difficult to just throw variables into the session. |
#6
|
||||
|
||||
![]()
The session table is (well, almost) queried always; vBulletin settings are also always loaded.
So why not just use them? |
#7
|
|||
|
|||
![]()
it makes more sense to me just to query my own settings table instead of using both my settings table and the session table.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|