OK, it's almost like the forumid isn't available there. Put this at the end:
HTML Code:
Testing:<br>
1 - $forum[forumid]
2 - $foruminfo[forumid]
3 - $thread[forumid]
4 - $threadinfo[forumid]
5 - $forumid<br>
If you don't want that showing in the threads, you could put <!-- at the beginning and --> at the end and it will just show in the page source.