vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Display subforum threads in parent forumdisplay thread list (https://vborg.vbsupport.ru/showthread.php?t=324198)

mchll9898 01-14-2017 12:49 AM

Display subforum threads in parent forumdisplay thread list
 
I would like subforum threads to be displayed along with the main forum's threads in forumdisplay. Is there any setting that could accomplish this? I have tried searching for a mod that can do this but could only find one for vb 3.6.8 here https://vborg.vbsupport.ru/showthread.php?t=158760

Inked_Mono 01-14-2017 01:08 AM

Try something like this?

http://i.imgur.com/I8PCX1f.png

mchll9898 01-14-2017 01:13 AM

Quote:

Originally Posted by Inked_Mono (Post 2580829)
Try something like this?

http://i.imgur.com/I8PCX1f.png

I tried that, even set the 1's to 0s' and nothing changed?

MarkFL 01-14-2017 01:27 AM

Create a plugin as follows:

Product: vBulletin

Hook Location : forumdisplay_query

Title: Display subforum threads in parent forumdisplay thread list

Execution order: 5

Plugin PHP Code :

PHP Code:

$hook_query_where 'OR thread.forumid IN (' implode(',',$foruminfo['childlist']) . ')'

Plugin is Active: Yes

mchll9898 01-14-2017 02:24 AM

Quote:

Originally Posted by MarkFL (Post 2580832)
Create a plugin as follows:

Product: vBulletin

Hook Location : forumdisplay_query

Title: Display subforum threads in parent forumdisplay thread list

Execution order: 5

Plugin PHP Code :

PHP Code:

$hook_query_where 'OR thread.forumid IN (' implode(',',$foruminfo['childlist']) . ')'

Plugin is Active: Yes

This broke my site so I deactivated it. Is there anything wrong with the code?

MarkFL 01-14-2017 02:34 AM

I tested it on my local dev site first and it works perfectly...the only thing I would try adding is to put this line of code above the existing code:

PHP Code:

global $foruminfo


mchll9898 01-14-2017 02:53 AM

I don't know why it breaks my site :/

https://vborg.vbsupport.ru/external/2017/01/15.png

MarkFL 01-14-2017 02:56 AM

Quote:

Originally Posted by mchll9898 (Post 2580840)
I don't know why it isn't working on my site :/

https://vborg.vbsupport.ru/external/2017/01/15.png

You haven't reset the plugin as active, according to your screenshot. :)

What version of vB are you running?

mchll9898 01-14-2017 03:46 AM

Oh no no haha :p. It was activated, but I set it to inactive after it broke the site. I took the screen shot after I had already tried it and then deactivated it. I have vb 4.2.

MarkFL 01-14-2017 04:01 AM

Do you have any other plugins hooked at that same location?


All times are GMT. The time now is 05:02 PM.

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.01335 seconds
  • Memory Usage 1,737KB
  • 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
  • (3)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete