Sorry, that's my fault. There is no variable $categoryid, that was just an example. For instance if you want to check if the current forum is a child of forum 15, then you'd do this:
Code:
if (in_array($foruminfo['forumid'], split(',',$vbulletin->forumcache[15]['childlist'])))
I should also mention that each forum is in its own childlist, so if you didn't want to include forum 15 in your condition then you'd have to check for that (although if 15 is a non-posting forum then it won't matter).