vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Show all subforum threads in main forum for vB3.7.x (no extra queries) (https://vborg.vbsupport.ru/showthread.php?t=181876)

hoku 06-07-2008 10:00 PM

Show all subforum threads in main forum for vB3.7.x (no extra queries)
 
1 Attachment(s)
Was looking for such hack but couldn't find one for 3.7.x, so I made my own, I hope this will save some time for the next guy.

Edit forumdisplay.php

find (3 of them):
PHP Code:

WHERE forumid $foruminfo[forumid

change all of them to:
PHP Code:

WHERE forumid IN ($foruminfo[forumid]," . implode(',',$foruminfo['childlist'])  . "




Note:
Remember to set the main forum to allow posting new threads, otherwise you won't see the thread list in forumdisplay.

If you don't want to allow posting of new threads in the main forum, but still want to display all the subforum threads, then make this additional change, beware that this quick method applies to all forums:

Edit forumdisplay.php (you only need this IF you have set the main forum to not allow posting new threads)
Find:
PHP Code:

if ($foruminfo['cancontainthreads']) 

change to:
PHP Code:

if (== 1


RedTrinity 06-08-2008 08:53 AM

Would appreciate a screenshot or demo :)

silver surfer 06-08-2008 08:59 AM

yup...screeny, please

kollam003 06-08-2008 12:45 PM

yup screens please

furst 06-08-2008 02:54 PM

Demo please.

suiz 06-08-2008 03:32 PM

Demo please.

MikeHolohan 06-08-2008 05:14 PM

Screenshot?

saviola8x 06-08-2008 06:50 PM

oh my god.... @@"

i need demo :|

bornoffire 06-08-2008 08:14 PM

screenshot?

Freekurd 06-08-2008 08:19 PM

screens please?

Hornstar 06-08-2008 10:04 PM

o_O ive never seen so many requests for screenshots and demos before lol, i think he gets the point. lol

Anyway, I'll check back when you do have that demo or screenshot up ^^

hoku 06-10-2008 11:08 AM

wow... okok!!! screenshots added to main post

it is a fresh installation
left pic is before-hack, right pic is after-hack

in the after-hack pic, the threads you see in the main forum are from the subforums, the main forum has no threads by itself.

saviola8x 06-10-2008 06:02 PM

oh my god...
i love it :x
Thanks

pcoskat 06-10-2008 10:21 PM

Love This! :d

vBarab 06-11-2008 04:27 PM

woooooooooow hoku

nando99 06-12-2008 12:33 PM

this is a great mod - would this work for 3.6.8?

gwerzal 06-12-2008 05:47 PM

Can this be done for specific forums or is it site wide.

mad@Max 07-08-2008 06:21 PM

Oh yes! Very was needed!!!

TheInsaneManiac 07-26-2008 11:27 AM

Now does this do this for ALL forums or is there a way we can specify only certain ones?

gwerzal 07-30-2008 12:06 AM

I need to know that as well.

Would be very useful for a certain section of my site.

pnosko31 08-31-2008 03:10 AM

1st: yes it would be good to specify by forum

2nd

Code:

WHERE forumid = $foruminfo[forumid]
is nowhere in forumdisplay.php

nando99 09-09-2008 06:45 PM

Is there anyway to get this to work on a per forum basis? I want to allow all the subforum posts to show but I dont want the main forum being posted to directly. I can't use it on global level though. Thanks in advance - this is something I wanted for a very long time.

gwerzal 09-11-2008 12:37 AM

i no i need this but only for a few forums and definately not all of them.

Leo Brazil 09-11-2008 06:05 PM

Did someone here already install this mod and mind to share a link as a demo ?

Cheers

Pure Dope 09-15-2008 05:08 AM

This this would work w/3.6.8??? ?=x

gwerzal 09-19-2008 03:28 AM

I did install it but un-installed it as it is not forum specific. If it was it would be a great mod

Baldilocks 09-19-2008 03:36 AM

Could come in quite handy. :)

gwerzal 09-19-2008 11:25 AM

Very handy.

Does nobody want to have another go.

pnosko31 09-20-2008 11:38 PM

I actually did find a way to use this on my forum and just for a specific category. Thanks.

Pure Dope 09-21-2008 10:03 PM

if (1 == 1) could be if(1) i believe

Pure Dope 09-21-2008 10:18 PM

does work with 3.6.8

Pure Dope 09-21-2008 10:19 PM

i believe to be forum specific you would have to do this

WHERE forumid IN ($foruminfo[forumid]," . implode(',',$foruminfo['childlist']) . ")

change that to

WHERE forumid IN (x, y, z)

where x y and z are forumIds. dont quote me on this....just try it. if not...then its probably a problem w/the sql.

jawatkin 09-25-2008 12:00 PM

Not sure I understand this... Why have subforums, then? Couldn't something similar be achieved without subforums, requiring prefixes in the forum that are choice "subforum 1" "subforum 2" and "subforum 3"?

Marcus_Fenix 10-22-2008 11:19 AM

-edit- it's working ;)

LuBi 10-27-2008 04:18 AM

Quote:

Originally Posted by jawatkin (Post 1629989)
Not sure I understand this... Why have subforums, then? Couldn't something similar be achieved without subforums, requiring prefixes in the forum that are choice "subforum 1" "subforum 2" and "subforum 3"?

I haven't tried this mod yet but I plan on it later tonight. I'll use this are an organizational tool believe it or not. This will bring attention to threads in subforums the average user might not participate in. All this while still providing organization to those who wish to visit the subforum. For example, think of a general forum.. inside that general forum there is a subforum for new members. Most long time members won't waste time in the new members subforum. With this mod they might see a thread title that peeks their interest and in turn will reply. The only concern with this mod I would have is if people would stop using the subforum itself confusing the main forum with it and starting off-forum new threads.

As for prefixes, it might just be me but I hate how vB handles them. The original prefix hacks from previous versions of vB were much better.

GlamRockTalk 12-15-2008 09:00 PM

If someone can get this working for only certain forums, it would be 'the balls' :D

But, does as it says, so it's cool with me :)

pnosko31 12-26-2008 08:36 AM

I have a forum with a large number of images in different categories - i use this so that members can click a link that says new images and this pulls the list of images from all categories.

GlamRockTalk 12-26-2008 02:32 PM

pnosko31, can you show an example of what you're referring to. Sounds interesting.

vBRiP 05-19-2010 05:04 AM

nice thanks

BirdOPrey5 06-24-2010 09:33 PM

This is great- any ideas on how it might be adapted to work on other forums within the same site, not subforums... example if I have the following top level forums:
-Off Topic
-Health
-Cars
-Poker
-Home Improvement

As is people usually post topics only in "Off Topic" and I move them to the appropriate forum... it would be great if even after being moved the thread would continue to be viewable in Off Topic but the thread is physically located for lack of a better term in a different forum, and posts/replies to the thread from either forum get added to the original thread.


All times are GMT. The time now is 06:26 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01297 seconds
  • Memory Usage 1,789KB
  • 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_code_printable
  • (4)bbcode_php_printable
  • (1)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
  • (40)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