Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Show all subforum threads in main forum for vB3.7.x (no extra queries)
hoku
Join Date: May 2006
Posts: 3

 

Show Printable Version Email this Page Subscription
hoku hoku is offline 06-07-2008, 10:00 PM

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
Attached Images
File Type: jpg hack-before.jpg (67.3 KB, 0 views)
File Type: jpg hack-after.jpg (78.3 KB, 0 views)
Reply With Quote
  #32  
Old 09-21-2008, 10:18 PM
Pure Dope Pure Dope is offline
 
Join Date: Dec 2006
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does work with 3.6.8
Reply With Quote
  #33  
Old 09-21-2008, 10:19 PM
Pure Dope Pure Dope is offline
 
Join Date: Dec 2006
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #34  
Old 09-25-2008, 12:00 PM
jawatkin jawatkin is offline
 
Join Date: Apr 2007
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"?
Reply With Quote
  #35  
Old 10-22-2008, 11:19 AM
Marcus_Fenix Marcus_Fenix is offline
 
Join Date: May 2008
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

-edit- it's working
Reply With Quote
  #36  
Old 10-27-2008, 04:18 AM
LuBi LuBi is offline
 
Join Date: Oct 2001
Posts: 416
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jawatkin View Post
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.
Reply With Quote
  #37  
Old 12-15-2008, 09:00 PM
GlamRockTalk's Avatar
GlamRockTalk GlamRockTalk is offline
 
Join Date: Nov 2008
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

But, does as it says, so it's cool with me
Reply With Quote
  #38  
Old 12-26-2008, 08:36 AM
pnosko31 pnosko31 is offline
 
Join Date: May 2006
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #39  
Old 12-26-2008, 02:32 PM
GlamRockTalk's Avatar
GlamRockTalk GlamRockTalk is offline
 
Join Date: Nov 2008
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

pnosko31, can you show an example of what you're referring to. Sounds interesting.
Reply With Quote
  #40  
Old 05-19-2010, 05:04 AM
vBRiP vBRiP is offline
 
Join Date: Feb 2010
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice thanks
Reply With Quote
  #41  
Old 06-24-2010, 09:33 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:54 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.05555 seconds
  • Memory Usage 2,331KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete