The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#4
|
|||
|
|||
![]()
im looking to make a script to help me bridge 2 applications
basically the app im using has a bridge function that when i choose a certain bridge, code gets executed in that bridge file, so there are create, update, delete functions in that bridge. for the purposes of this attempt its create a user im trying to do, assuming getting this working will mean that i can do the others once these issue's are ironed out. there are 2 options i have, use curl code to pass the data to an external file. or execute the vbulletin code in the bridge file, which would be for example, an index.php file, including another file which does an include on the bridge. so its nested inclusions and seems to be causing problems. with curl we lose the nesting and it should work. the above code however isnt, and the code posted by dismounted doesnt seem to work either ERROR0:Please complete the required field "Username". i get that when i try passing data via the address bar jm_adduser.php?username=testing&email=testing@gold enplec.com&password=simple though the data SEEMS to get passed ok using $username = $_REQUEST["username"] etc etc to get the data i can print the variable contents $username and it shows the passed data but $userdm->set('username', $username); returns the error given above. so this is my attempt at using an independent file to add a user to VB and i will curl the data to the file from the bridge file for simplisity any help much appreciated, ive been at this for weeks --------------- Added [DATE]1201414949[/DATE] at [TIME]1201414949[/TIME] --------------- scratch the above i solved it myself just as i wrote the last reply i thought to myself about a problem i had in work recently where data was there one minute, gone the next, and it was due to initialising something else killing the variables because they were only temporary so i moved the setting $username and $password down the script to beside the $userdm->set , well just before that, and wham it works, tried the curl code to call the script and wham that worked from that end too. so now i finally have the script working. although it might be helpful for others to explore what was causing the variables to get emptied between setting them and this code SET THE VARIABLES HERE // switch to vbulletin directory $cwd = getcwd(); chdir('/home3/goldccom/public_html/forum'); // include dependencies require_once('./global.php'); // initialise datamanager $userdm =& datamanager_init('User', $vbulletin, ERRTYPE_ARRAY); // set options GONE BY THE TIME THEY GET HERE $userdm->set('username', $username); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|