PDA

View Full Version : Display subforum threads in parent forumdisplay thread list


mchll9898
01-14-2017, 12:49 AM
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
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 :

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

Plugin is Active: Yes

mchll9898
01-14-2017, 02:24 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 :

$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:

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
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?

mchll9898
01-14-2017, 04:30 AM
Do you have any other plugins hooked at that same location?

No, I don't have any other plugins that have forumdisplay_query as the hook location.

MarkFL
01-14-2017, 05:23 PM
I have published a more general purpose product based on your request, and I have cited you as a co-author/supporter:

Show Subforum Threads (https://vborg.vbsupport.ru/showthread.php?t=324203)

This is more complete, and gets the correct thread count and threadids, and modifies different queries than the plugin I posted above.

Please give this a try and let me know if it works for you, and if so, if you would like any additional features. :)

mchll9898
01-14-2017, 08:20 PM
I have published a more general purpose product based on your request, and I have cited you as a co-author/supporter:

Show Subforum Threads (https://vborg.vbsupport.ru/showthread.php?t=324203)

This is more complete, and gets the correct thread count and threadids, and modifies different queries than the plugin I posted above.

Please give this a try and let me know if it works for you, and if so, if you would like any additional features. :)

Wow! Thank you so much!!! It works! :) :up::up::up:

The only thing I found wrong was that the child forum icon displays next to all threads including those posted in the parent forum.

MarkFL
01-14-2017, 10:19 PM
Wow! Thank you so much!!! It works! :) :up::up::up:

The only thing I found wrong was that the child forum icon displays next to all threads including those posted in the parent forum.

I have attached a tentative update, version 1.1, of this product. Please download and install it and let me know if the subforum icon issue is resolved. :)

If it is, then I will update the published product.

mchll9898
01-14-2017, 10:55 PM
I have attached a tentative update, version 1.1, of this product. Please download and install it and let me know if the subforum icon issue is resolved. :)

If it is, then I will update the published product.

This fixed the issue! You're awesome! Thank you so much! :D

MarkFL
01-14-2017, 11:01 PM
This fixed the issue! You're awesome! Thank you so much! :D

Thanks for your feedback! :)

I've updated the published product. ;)

Visual010
01-16-2019, 06:15 AM
Hello,

I installed this plugin but it doesn't expand the threads at all.
If I select the option to hide sub forums though, it does hide them as intended.

I'm using vBulletin 4.2.2.

Regards,
Visual