Thanks for the suggestions, but still a no-go.
With your suggestion sottwell, it doesn’t seem to work, because after the call for global.php works, global.php has other files included, which dont have the relative path:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
PHP error debug
Error: main(/home/gaia/public_html/new_er/includes/init.php): failed to open stream: No such file or directory
Error type/ Nr.: Warning - 2
File: /home/gaia/public_html/new_er/testvb/global.php
Line: 20
Line 20 source: require_once(CWD . ’/includes/init.php’);
Parser timing
MySQL: 0.0059 s (5 Requests)
PHP: 0.0416 s
Total: 0.0475 s
See where it has the first path in the error? there should be a /new_er/testvb/includes/etc...
I can’t edit my global.php file, because then that would mess up my vBulletin install....
The whole code that i posted above is the only code in the snippet. It is the complete code...
<?php
//Get the global.php file from the vB install
require_once('../new_er/testvb/global.php');
//Fetch the total number of members.
$tmp1 = $vbulletin->db->query_read("SELECT * FROM users");
$members = $vbulletin->db->num_rows($tmp1);
$modx->setPlaceholder('members', $members);
//Fetch the total number of topics
$tmp2 = $vbulletin->db->query_read("SELECT * FROM thread");
$topics = $vbulletin->db->num_rows($tmp2);
$modx->setPlaceholder('topics', $topics);
?>