Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

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
  #2  
Old 07-03-2010, 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

I made an optional update to this mod...
This will give users the option of turning this mod off if they would rather not see all the forums you've chosen in a 'master' forum. Install this ONLY if you want to give users a choice.

First in Admin CP go to the menu on the left and choose "Add New User Profile Field" under "User Profile Fields."

Choose "Single Selection Radio Box" from the drop down menu...

On the next screen set the following...

Title: All Topic
Description: Use this setting to enable or disable the 'All Topics' system. [or whatever description you want obviously]
Options:
Code:
Yes
No
Field Required: Yes, at registration and...
Private/Field Searchable.../Display on... All "No"
Display Page: Options: Thread Viewing
Leave all other settings to default and hit "Save" to create the profile field.

Inform users the option now exists... The code below is designed so even if a user doesn't make a selection it is enabled by default so they only need to change it to 'opt out.'

Now we'll make the forumdisplay.php edits mentioned in the top post of this thread. Make those same edits except change all the IF statements to the one below:

PHP Code:
if (($foruminfo[forumid] == 2) && ($vbulletin->userinfo['field5'] != "No")) 
Replace the number 2 of course with the forumid of your "master" forum... Replace 'field5' with the profile field name that was auto created when added the profile field above. Go to "User Profile Field Manager" to see the name the field was given.

And that's that, you now have an "All Topics" system that can be turned on or off by each member.
Reply With Quote
  #3  
Old 07-04-2010, 01:08 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One more mod I suggest if you use this is to modify your "Quick Navigation" menu to add a quick link back to your master forum, perhaps on top of your menu... to do this modify your forumjump template and add a standard html link to your master forum... Just put it wherever works best for your site and style.
Reply With Quote
  #4  
Old 07-04-2010, 05:00 AM
Trek Trek is offline
 
Join Date: Sep 2003
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kinda cool. =) I'm looking for something that allows for each user to select which ones they want. But I think that's a 3.8 mod that I haven't seen for 4.0 yet.

Anyway, nice work, I can see how this could be useful to many. =)
Reply With Quote
  #5  
Old 07-04-2010, 05:05 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks... working on a couple additional options for this that I have for 3.8 but going nuts on the new template variables in vb4, never saw them before today.
Reply With Quote
  #6  
Old 07-04-2010, 03:54 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks to the guy who rated this 1 star...
Reply With Quote
  #7  
Old 07-05-2010, 05:01 AM
sticky sticky is offline
 
Join Date: Sep 2003
Posts: 934
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This would be a dream mod for me if it was possible to select the threads individually to mirror across multiple forums and not just selecting an entire forum as master.
Reply With Quote
  #8  
Old 07-05-2010, 05:08 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, unfortunately that would require a database modification and new interface to use it, and it currently beyond my abilities but if I ever figure it out I will post a link here. If someone else with that knowledge wants to use this as a foundation they are welcomed to do so.
Reply With Quote
  #9  
Old 07-06-2010, 02:08 AM
TyPenn613 TyPenn613 is offline
 
Join Date: Dec 2006
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I apologize if this is me asking for too much, and I'm not too tech savvy to have any idea what it would take.

Can you run multiple versions of this at the same time? For instance, I run a sports site where team boards are grouped together by sport, conference/division, etc. I'd love to find a way where I could set up regional boards. As in, all the forums in the New York area are fed into one, all Chicago area into another, etc. Is this possible?

As if I'm not asking enough, I assume there is no way that a user can create a thread in the Master forum, and select it to be placed on one of the secondary forums is there?

Great work on this mod nonetheless. It's tagged and I'll likely use it.
Reply With Quote
  #10  
Old 07-06-2010, 04:25 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What you ask can be done... you can have multiple 'master forums' - so a master forum for NY, one for Chicago, etc... what you can't do is filter so that some posts from one forum go to master forum "A" and other posts go to master forum "B" - but if you just need multiple master forums do the following mod to the code... I shied away from sharing this because I didn't want to make it too daunting looking for most users who only need 1 master forum.

To have multiple master forums simply add an "elseif" statement below the if { } code and above the else { } code... for example in the first edit add to the middle:
PHP Code:
elseif ($foruminfo[forumid] == 7) {  
    
$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 IN (7, 8, 9, 10) 
            AND sticky = 0 
            
$prefix_filter 
            
$visiblethreads 
            
$globalignore 
            
$limitothers 
            
$datecut 
            
$hook_query_where 
    "
); 

This would make the entire code for the first edit look like:

PHP Code:
   //Edit added if-else statement  
if ($foruminfo[forumid] == 2) {  
    
$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 IN (2, 3, 4, 5) 
            AND sticky = 0 
            
$prefix_filter 
            
$visiblethreads 
            
$globalignore 
            
$limitothers 
            
$datecut 
            
$hook_query_where 
    "
); 

elseif (
$foruminfo[forumid] == 7) {  
    
$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 IN (7, 8, 9, 10) 
            AND sticky = 0 
            
$prefix_filter 
            
$visiblethreads 
            
$globalignore 
            
$limitothers 
            
$datecut 
            
$hook_query_where 
    "
); 
}
else { 
    
$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 
    "
); 

In this case you'd change the number 7 to your second master forum id, and 7,8,9,10 to your secondary forum id's (and your master).

You can add as many elseif { } statements as you need for various master forums, and you can even have secondary forums be shared between multiple master forums so forumid '10' for example can be a secondary forum of master forum 2 and 7, there is no problem doing this.

Once you make this elseif{} addition for the first edit you need to make similar edits for the second (optional) and third (required) edits. Just copy the entire 'if' statement for each starting with "if" and ending with "}" then copy and paste it below the if statement, change it from "if" to "elseif" and set the forum id numbers as needed.

It sounds more complicated then it is but can get messy quick if you have a lot of master forums... on the plus side conditionals are very efficient as coding goes and there should be no noticeable decrease in performance no matter how many you realistically have.

Let me know if I can be of further help... and if this isn't what you needed maybe it can at least help someone else.
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 10:48 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.04514 seconds
  • Memory Usage 2,365KB
  • Queries Executed 24 (?)
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
  • (1)bbcode_code
  • (3)bbcode_php
  • (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
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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