Did you insure that
global.php is being included in the file
file-x.php?
Chances are the non-member object it's referring to is
$DB_site.
If it is included at the top of the file, then try this instead:
Replace:
PHP Code:
$forumd = $DB_Site->query("SELECT title FROM forum WHERE forumid='$thread_info[originalforumid]'");
With:
PHP Code:
$forumd = $DB_Site->query_first("SELECT title FROM forum WHERE forumid='$thread_info[originalforumid]'");
And I'm just curious by the way, but what is the point of this query:
PHP Code:
$forumd = $DB_Site->query("SELECT title FROM forum WHERE forumid='$thread_info[originalforumid]'");
It's usually never good to put a query inside a while loop, as it will generate many many queries..