in my opinion you should look at the default templates and files in which they use the varibles in there. and almost all varibles in php files can be used in templates, of course if they are used properly.
for the forum id condition, if you are in forum showing, then $forum[forumid] would be it.