Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
All Topic - Master Forums - Shows threads from multiple forums in one forum Details »»
All Topic - Master Forums - Shows threads from multiple forums in one forum
Version: 2.2, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 4.0.x Rating:
Released: 07-03-2010 Last Update: 06-05-2011 Installs: 102
Uses Plugins Auto-Templates
Code Changes  
No support by the author.

This a complete and total upgrade to version 2.0!

New Version: 2.2

NOTE: VB 4.2.0(and over) Users DO NOT do the Manual File Edit on forumdisplay.php in the directions.

1 manual file edit is required to fix a bug where the thread count may be wrong in the master forum. Details in instructions in zip file.

You can now specify an * to denote "all forums" when creating a master forum. See instructions for details.

In addition this mod will be able to auto edit your templates if you run the standard threadbit template, otherwise there are instructions in the zip file for manual template edits if needed.

New in 2.2: Show or hide sticky threads from slave forums on the master forum.

What does this mod do? - Basically this is only the most awesomest mod ever for vBulletin. You can now view threads from other forums in "Master Forums" you designate.

For example on my site "Off Topic" is my "Master Forum" and virtually all other forums are assigned to the Master Forum offering user's the ability to browse 1 forum while seeing threads from many others.

New in version 2.0: You can now have multiple master forums.

See the screen shots for an example.

All instructions are included in the zip file.

As pointed out by phpdesk you must have at least 1 thread in your master forum for this to work.

I have tested this on VB 4.0.8 and am sure it will work on all 4.0/4.1 versions to date. There is a separate version for VB 3.x.

You can mostly ignore all posts in this thread up to post #25. Old posts are no longer relevant to this new version. (Note: post #7 is still relevant if you have only 1 master forum.)

------------------------------------------------------

Please "Mark as Installed" if you use this.
Donations always appreciated. :up:
Nominate MOTM if you LOVE it!

Download Now

File Type: zip All Topic - Master Forums by BOP5 - VB4v22.zip (5.5 KB, 494 views)

Screenshots

File Type: jpg ss_masterforum_set.jpg (86.0 KB, 0 views)
File Type: jpg ss_masterforum_vb4.jpg (141.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
mikesafl, Muhammad Rahman

Comments
  #72  
Old 06-16-2011, 04:44 PM
Nik S Nik S is offline
 
Join Date: Feb 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
Forum names will now be linked.
Works great, thanks! :up:
Reply With Quote
  #73  
Old 06-18-2011, 04:11 AM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow...
Reply With Quote
  #74  
Old 06-18-2011, 05:23 AM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BirdOPrey5 View Post
Version 2.1 Released

Full instructions in .zip file...

But basically there is now a required manual file edit- there is no way around this in order to get the thread count correct for master forums.

As Jennifer2010 pointed out the master forum would only count as many threads as were originally in the forum. This is especially an issue when the master forum contains very few threads and the slave forums contain many more threads. No page numbers (or not enough) will be produced.

The fix requires deleting 1 line from your forumdisplay.php file.

At approximately line 761 you will find this code:
PHP Code:
    ($hook vBulletinHook::fetch_hook('forumdisplay_query_threadscount')) ? eval($hook) : false;

    
# Include visible IN (0,1,2) in order to hit upon the 4 column index
    
$threadscount $db->query_first_slave("
      SELECT COUNT(*) AS threads,
      (
       SELECT COUNT(*) AS newthread
       FROM " 
TABLE_PREFIX "thread AS thread
       WHERE forumid = 
$foruminfo[forumid]
        AND lastpost > 
$lastread
        AND open <> 10
        AND sticky = 0
        
$prefix_filter
        
$visiblethreads
        
$globalignore
        
$limitothers
        
$datecut
        
$hook_query_where     
      ) AS newthread
        
$hook_query_fields
        FROM " 
TABLE_PREFIX "thread AS thread
        
$tachyjoin
        
$hook_query_joins
        WHERE forumid = 
$foruminfo[forumid]
            AND sticky = 0
            
$prefix_filter
            
$visiblethreads
            
$globalignore
            
$limitothers
            
$datecut
            
$hook_query_where
    "
);
    
$totalthreads $threadscount['threads'];
    
$newthreads $threadscount['newthread']; 
You must delete the 1st instance of: $hook_query_where

So your final code should look like:
PHP Code:
    ($hook vBulletinHook::fetch_hook('forumdisplay_query_threadscount')) ? eval($hook) : false;

    
# Include visible IN (0,1,2) in order to hit upon the 4 column index
    
$threadscount $db->query_first_slave("
      SELECT COUNT(*) AS threads,
      (
       SELECT COUNT(*) AS newthread
       FROM " 
TABLE_PREFIX "thread AS thread
       WHERE forumid = 
$foruminfo[forumid]
        AND lastpost > 
$lastread
        AND open <> 10
        AND sticky = 0
        
$prefix_filter
        
$visiblethreads
        
$globalignore
        
$limitothers
        
$datecut
 
      ) AS newthread
        
$hook_query_fields
        FROM " 
TABLE_PREFIX "thread AS thread
        
$tachyjoin
        
$hook_query_joins
        WHERE forumid = 
$foruminfo[forumid]
            AND sticky = 0
            
$prefix_filter
            
$visiblethreads
            
$globalignore
            
$limitothers
            
$datecut
            
$hook_query_where
    "
);
    
$totalthreads $threadscount['threads'];
    
$newthreads $threadscount['newthread']; 
Save the file and replace your forumdisplay.php file with this one.

Then import/install the new product .xml file version 2.1.

NOTE- You MUST DELETE the entire line, you cannot "comment it out."

Also New in 2.1

You can now use an * to specify "ALL" forums be included in your master forum, such as:
Code:
2|*
Would make a master forum in forum id #2 that contains threads from EVERY forum on your site.
I am running vb4.1.4. This edit killed my forum display. I added the code back and it's fine.

Is there something different with 4.1.4 that's preventing this modification from working?
Reply With Quote
  #75  
Old 06-18-2011, 05:46 AM
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Location: Pensacola, FL
Posts: 772
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay nevermind, that was because I used Alan SP's version.

I disabled and uninstalled his version.

I used the one in the first post. Running fine now.
Reply With Quote
  #76  
Old 07-05-2011, 09:13 PM
kkk333 kkk333 is offline
 
Join Date: Nov 2007
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you for this amazing mod
but does it cause extra queries ? extra load ? because I want use it in big forum
Reply With Quote
  #77  
Old 07-06-2011, 12:40 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are no extra queries- it modifies an existing query. There shouldn't be any noticeable extra load.
Reply With Quote
  #78  
Old 07-09-2011, 02:29 PM
vbandroid vbandroid is offline
 
Join Date: Apr 2011
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey BirdOfPrey, any update on whether you can use prefix instead of forum id to pull threads from forums? or only to a certain prefix from the specified forums?
Reply With Quote
  #79  
Old 07-09-2011, 11:55 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by vbandroid View Post
Hey BirdOfPrey, any update on whether you can use prefix instead of forum id to pull threads from forums? or only to a certain prefix from the specified forums?
The more I think about it the less I think I could or should integrate that into this mod. It might be possible as a separate mod but not a priority right now.
Reply With Quote
  #80  
Old 07-20-2011, 02:53 PM
NovoCiv NovoCiv is offline
 
Join Date: Aug 2010
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm on 4.0.5 still and the forumdisplay.php edit isn't possible. The original appears as:
Code:
	($hook = vBulletinHook::fetch_hook('forumdisplay_query_threadscount')) ? eval($hook) : false;

	# Include visible IN (0,1,2) in order to hit upon the 4 column index
	$threadscount = $db->query_first_slave("
		SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > $lastread AND open <> 10, 1, 0)) AS newthread
		$hook_query_fields
		FROM " . TABLE_PREFIX . "thread AS thread
		$tachyjoin
		$hook_query_joins
		WHERE forumid = $foruminfo[forumid]
			AND sticky = 0
			$prefix_filter
			$visiblethreads
			$globalignore
			$limitothers
			$datecut
			$hook_query_where
	");
	$totalthreads = $threadscount['threads'];
	$newthreads = $threadscount['newthread'];
Removing the $hook_query_where causes database errors. I tried replacing the entire section with the "this is what your code should look like" and the forums run fine until I enable the product. When enabled, it causes this error on forumdisplay:

Quote:
vBulletin Message
Unable to add cookies, header already sent.
File: /home/novoci5/public_html/forums/vb/exception/templatefatalerror.php
Line: 67
Is there a way to make this work without upgrading?
Reply With Quote
  #81  
Old 07-20-2011, 04:06 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In 4.0.5 try just using the original forumdisplay.php without any edits at all.
Reply With Quote
Reply

Thread Tools

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 06:53 AM.


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.05267 seconds
  • Memory Usage 2,372KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • 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