I rewrote nearly all of the code within this to do the following things, select latest topics from all forums that are open to users with groupid 1. It also writes to a .js file and the code should have been
Code:
<script language="JavaScript" src="http://yourdomain/forums/latest_topics.js"></script>
the language was missed out
also the ? needs escaped for both php and javascript so you need \\?
i done this in my version and also made it work with ./global.php instead of connected within the file.
New attachment two posts below.