I did a little playing because I felt as if it was not passing globaly...
PHP Code:
$forumsurl = $DB_site->query("SELECT value FROM setting WHERE varname ='forumsurl'");
$forumsurl = $DB_site->fetch_array($forumsurl);
$forumsurl = $forumsurl[value];
Placing that in index.php made it work but then I found out it doesnt pass in other places also. Seems it will pass these variables in header and footer and certain other parts but will not in lastposteby, postbits, etc.
Where would be a good place to place this to make it global since its a little faulty the current way it is.