The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Attempting Create Thread outside of vB using Data Manager, error with bootstrap
Greetings,
I have a script that's trying to create a new thread from a page outside vBulletin. The error I'm getting is from global.php on line 20 when its storing $specialtemplates in bootstrap: [Notice] Undefined variable: specialtemplates Code:
Source 11 \*======================================================================*/ 12 13 error_reporting(E_ALL & ~E_NOTICE); 14 15 require('./includes/class_bootstrap.php'); 16 17 define('VB_AREA', 'Forum'); 18 19 $bootstrap = new vB_Bootstrap_Forum(); 20 $bootstrap->datastore_entries = $specialtemplates; 21 $bootstrap->cache_templates = vB_Bootstrap::fetch_required_template_list( 22 empty($_REQUEST['do']) ? '' : $_REQUEST['do'], 23 $actiontemplates, $globaltemplates 24 ); 25 26 $bootstrap->bootstrap(); PHP Code:
|
#2
|
|||
|
|||
and what's the error?
|
#3
|
|||
|
|||
Whoops....
[Notice] Undefined variable: specialtemplates |
#4
|
|||
|
|||
You can get rid of those by defining the variable:
PHP Code:
before including global.php. (It looks like you'll get the same message for $actiontemplates and $globaltemplates, and maybe some others). Those variables control which templates and datastore values are cached. You can look at som of the vb scripts to see how they're used. (e.g. showthread.php). |
#5
|
|||
|
|||
Thanks That worked!
Now having an issue with the code no seeming to execute, at least it isn't making a thread, nothing in the database, no errors appear via the page or in the error_log. Unsure whats going on at this point. I just don't think my function is getting called. I think. |
#6
|
||||
|
||||
Hopefully this helps you out a bit
This is from one of my modifications (Staff Application) where it creates the threads PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|