The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
hi all!
I'm trying to develop a little cms based on vbulletin... I wish know how can I do to insert a user in the session table... example.. the user enter in the home of the forum and automatically appears a record in the table... but if the user go on my main page doesn't appear in session... how can I do this? ![]() thanks |
#2
|
|||
|
|||
![]()
Just include global.php in your script and a session will be done automatically.
|
#3
|
||||
|
||||
![]() Quote:
PHP Code:
Code:
Fatal error: Call to a member function on a non-object in /home/admin/domains/test/public_html/forum/includes/functions_user.php on line 263 thanks again:up: |
#4
|
|||
|
|||
![]() Quote:
![]() Just to add to the information pool, I also get this error sometimes when trying to do the same thing: warning: array_keys(): The first argument should be an array in /var/www/forums/includes/functions.php on line 3699. warning: Invalid argument supplied for foreach() in /var/www/forums/includes/functions.php on line 3699. |
#5
|
||||
|
||||
![]() PHP Code:
|
#6
|
|||
|
|||
![]() Quote:
I've noticed it usually works okay if your file is in the same directory as vBulletin, but if you aren't in the same directory then problems arise quickly. A fix is to use chdir() to set the right working directory before including the file. It works all fine and dandy until I try to add all of it into a function (my CMS uses functions for nearly everything so it has to go in a function). I've been pulling my hair out trying to make it work. I'm going to try including the login file with an include via http. I'll declare the username and password variables global so they are available outside of the scope. HOPEFULLY that will work, but at this point it seems to be wishful thinking ![]() |
#7
|
|||
|
|||
![]()
I use
<?php chdir("vbforum/"); require('./global.php'); chdir("../"); ?> and it works fine |
#8
|
|||
|
|||
![]() Quote:
PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|