OK, I unearthed some detail about this, at
http://wiki.modxcms.com/index.php/API:DBAPI:constructor. Essentially, it says...
"To set your own values (for example, to connect to another database), you simply need to create a new instance of the DBAPI class."
...and gives this example...
$mydb = new DBAPI(’host’, ’database’, ’username’, ’password’, ’table_prefix’, ’character_set’ );
$mydb->connect();
...so I ammended my code in my SMF template page - index.template.php - to this...
’;
$path = ’C:\\XAMPP\\htdocs\\max\\’;
include_once($path.’modxapi.php’);
$mydb = new DBAPI(’localhost’, ’modx_db’, ’modx_username’, ’modx_password’, ’modx’, ’ISO-8859-1’ );
$mydb->connect();
$modx = new MODxAPI();
$html = $modx->executeDocument(42);
echo $html;
echo’
And now I’m getting the following error...
Fatal error: Class ’DBAPI’ not found in C:\XAMPP\htdocs\max\forum\Sources\Load.php(1726) : eval()’d code on line 227
:’(
I’m trying to figure this out, but if anyone out there has some idea as to what this issue may be, I’d be totally, utterly, completely grateful.
Cheerio,
Olly.