vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Forum Jump (https://vborg.vbsupport.ru/showthread.php?t=206344)

GCC LLC 02-23-2009 01:42 PM

Forum Jump
 
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:
PHP Code:

($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.


All times are GMT. The time now is 06:44 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02867 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete