The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Datamanager Example Assistance
Hello all,
I'm working with vB3.6B4. This is my first attempt at working with the datamanager api and I am having some difficulting in understanding it. I've created a very simple code snippit as an example to play with and I just can't get this to work right, I was hoping some professional eyes might be able to shed some experience on this for me. Code:
$styleid = "4"; $dataman =& datamanager_init('User', $vbulletin); $dataman->set_existing($vbulletin->userinfo); $dataman->set('styleid', $styleid); $dataman->pre_save(); if (!empty($dataman->errors)) { $errorlist = ''; foreach ($userdata->errors AS $index => $error) { $errorlist .= "<li>$error</li>"; } } else { $vbulletin->userinfo['styleid'] = $styleid = $dataman->save(); $styleid = $vbulletin->userinfo['styleid']; echo "STYLEID: $styleid"; } Code:
require_once('./global.php'); require_once('./includes/init.php'); As it works now, the user -> styleid table is updated with the correct styleid, however $vbulletin->userinfo['styleid'] seems to always display '1'. Am I over looking something? Thank you for your asistance. Max Sorry to waste your time. I've found the problem in my code and now have my example working correctly. Max |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|