View Full Version : Forum Jump
GCC LLC
02-23-2009, 01:42 PM
Asked this over at vb.com and was told to come here.
I was wondering if anyone knows how to remove forums being used at categories from the Forum Jump drop down?
Lynne
02-23-2009, 02:16 PM
The menu is defined in the function construct_forum_jump which is in functions.php. There is a foreach loop at the top the defines what goes into the list. Inside that is an if statement with a condition that results in just 'continue'... you can add in a condition to check if the forum is a category and if so, continue. You'll have to play with it yourself, but I'm sure you can figure it out.
GCC LLC
02-26-2009, 12:26 PM
I tried adding any condition I could think of in there, but they either removed the category AND all of it's subforums (which is not what I want, I just want the category removed), or it whitescreened my site completely.
Does anyone have any idea what the conditional would be? I'd think if anyone knows what the PHP condition would be to check and see if a forum allows posts or not would work. I tried $vbulletin->bf_ugp_forumpermissions['cancontainposts'] but that didn't seem to work. Any help is appreciated!
Thanks!
Lynne
02-26-2009, 03:13 PM
You need to read the code. If you look at the if statement there, you'll see you can't just use use $vbulletin->bf_ugp_forumpermissions['cancontainposts'] (which is wrong, btw, it's $vbulletin->bf_ugp_forumpermissions['cancontainthreads']), you need to use it in conjunction with the options for the forum, like this:
($vbulletin->forumcache["$forumid"]['options'] & $vbulletin->bf_misc_forumoptions['cancontainthreads'])
And, if you stick it in the if statement and it evals to true for a category and then continues, then it will never go through the loop to get the forums in that category. So, you need to eval it in the else. If it evals to true for a category, then skip the eval for the jumpforumbits.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.