The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Get userid & username from Non-vB page ?
In order to get OakGallery to work with vB 3.0.3 it would be really great if someone could help me with a PHP script.
The only thing i need to know how i can find out the userid & username for the user that runs the PHP script. Anyone who can help me out ? Please. |
#2
|
|||
|
|||
Quote:
PHP Code:
|
#3
|
|||
|
|||
We have tested the following with no luck
require('./global.php'); and i dont think that require_once('./global.php'); will do any diffrence. The first one worked fine with ver 2.3.0 version of the forum but after upgrade to 3.0.3 it does not work anymore. Maybe its something in 3.0.3´s global.php that makes the error. But i will test the require_once thing when i comes home in 3 hours. |
#4
|
||||
|
||||
that shoudn't make a difference. You might have to adjust the path if the script is in a different directory than the vBulletin root folder.
|
#5
|
|||
|
|||
Strange, my scripts finds the global.php and also loads it but it doesnt seem to find the id and name. It also makes the OakGallery unfunctional ... probably there is something in global.php that messes tha gallery up. Dont know what though.
http://217.215.89.49/fiskesnack/fotogalleri/index.php |
#6
|
|||
|
|||
Use this:
require_once('../forum/global.php'); |
#7
|
|||
|
|||
Didnt work either ... it seems that a lot of variables (set in OakGallery) is resetted by global.php or some include-script.
|
#8
|
|||
|
|||
When i remarken the Init.php script inclusion all variables was back ... dont understand how that one works.
|
#9
|
|||
|
|||
Now i know what the problem are ... its the following section in Init.php that disables all neccessary variables for the OakGallery. Is it "safe" do disable it ?
------------------------------------------------------------------------------- // ################################################## ########################### // set which variables can pass through globals filter $_allowedvars = array( 'GLOBALS', // of course '_GET', // } '_POST', // } system variables '_COOKIE', // } '_REQUEST', // } '_SERVER', // } '_ENV', // | '_FILES', // } 'specialtemplates', // special templates from datastore table 'globaltemplates', // used for template cacheing 'actiontemplates', // templates for specific script actions 'phrasegroups', // phrase groups (in addition to 'global') //'actionphrases', // phrase groups for specific actions 'noheader', // used to suppress the default vB headers 'nodb', // suppress database connection 'nozip', // suppress gzipping 'steptitles', // step titles for upgrade scripts 'pagestarttime', // microtime() from top of page '_allowedvars', // this array :-) '___db_user', // lycos has special variables '___db_host', // lycos has special variables ); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|