Thank you. I feel kinda silly. My internet connection died right when I was typing a response that I had searched for more threads by you with search terms like "forumcache" and found out the answer somewhat. What you have just told me is WAY more exact though.
Thanks.
EDIT:
Is there some sort of shortcut to figuring out who has permissions for what? I just print_r'd vbulletin->userinfo['permissions'] and it looks like i'd have a do a comparison of every forum permissions to each users permissions manually (a for-each thing). We have a lot of different usergroups (such as premium users, probationary, etc) and I want to write something that doesn't need to be added to each time we create or delete a usergroup.
[high]* carcomp goes to read the vbulletin API some more.[/high]
Edit:
OK awesome, its working so far. I can get a list of forums based on user permissions. Now I just have to figure out if a forum is a child or not (so the menus can cascade!)
Code:
$find = '$hoobajoob';
$simple_array = array();
foreach ($vbulletin->forumcache as $forumid => $forum)
{
if($vbulletin->userinfo['forumpermissions'][$forumid] & $vbulletin->bf_ugp_forumpermissions['canview']) {
$simple_array[$forumid] = $forum['title'];
$huh = $huh . '<br /> ' . $forum['title'];
}
}
$vbulletin->templatecache['navbar'] = str_replace($find, '<pre>' . $huh . '</pre>' . $find, $vbulletin->templatecache['navbar']);