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

Reply
 
Thread Tools
All Topic / Master Forums - View Threads from Multiple Forums in a Master Forums Details »»
All Topic / Master Forums - View Threads from Multiple Forums in a Master Forums
Version: 2.1, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.8.x Rating:
Released: 06-27-2010 Last Update: 03-02-2011 Installs: 48
Supported Uses Plugins Auto-Templates
Translations  

This a complete and total upgrade to version 2.0!

This mod is now an importable product, there are no more manual file edits.

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.

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 3.8.6 and am sure it will work on all 3.8 versions. I also strongly believe it will work as far back as VB 3.6 but can't test it myself.

This will not work for vBulletin 4.0, do not try to install it. The VB4 Version is here.

If you used the old version revert your forumdisplay.php file back to it's original condition before installing.

Please Mark as Installed if you use this.

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

Upgrade to Version 2.1 (March 3, 2011)
Fixes a bug where the master forum wouldn't display as many pages as there were posts.

Download Now

File Type: zip All Topic - Master Forums by BOP5v21.zip (4.0 KB, 194 views)

Screenshots

File Type: jpg ss_masterforum_set.jpg (86.0 KB, 0 views)
File Type: jpg ss_masterforum_vb3.jpg (137.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 07-01-2010, 12:53 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well anything is possible but to do what you ask would mean adding an additional field to the thread table specifying if the thread had ever been moved, then the query to list threads would have to be updated to reflect on threads from the main forum or threads from other forums where "hasbeenmoved" = 1 or such... plus we'd need to edit the move command to set that flag- maybe other changes too- so yes it's possible but I doubt I could program such a mod let alone make it easy to install.

I am looking into making this an installable product, if I figure it out I will update this with an install file option but from what I've read so far performance will be best the way I have it now, as a direct file edit.
Reply With Quote
  #13  
Old 07-01-2010, 08:23 PM
James T Brock James T Brock is offline
 
Join Date: Sep 2004
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for releasing this! Awesome job.
Reply With Quote
  #14  
Old 07-03-2010, 05:23 PM
vat0r vat0r is offline
 
Join Date: Aug 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm trying to get this working with 3.8.5 and all I'm getting is a white screen on forumdisplay. I tried disabling all other mods and switching themes with no luck. I've done the edits several times to make sure I had no typos as well. I used only the required edits in the first post. As far as I can tell the relevant code to be replaced is the same as in your guide. Any ideas?
Reply With Quote
  #15  
Old 07-03-2010, 05:42 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 upgraded to 3.8.5 last night and still working great after I redid the edits... sending you a PM that might help with the edits... If that still doesn't work please let me know what mods you are using and will see what I can do...

Also if you have a link to your forum I can see if anything looks like it may interfere.
Reply With Quote
  #16  
Old 07-03-2010, 09:37 PM
vat0r vat0r is offline
 
Join Date: Aug 2005
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks to you I got it cleared up. Much appreciated.
Reply With Quote
  #17  
Old 07-06-2010, 04:37 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was asked in another thread if this could be adopted to have multiple 'master forums' and yes it can, 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.
Reply With Quote
  #18  
Old 07-06-2010, 08:14 AM
sinpin sinpin is offline
 
Join Date: Jan 2008
Location: Paradise
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great idea,
I did those steps correctly, but it didn't work for me (vb 3.8.2)

Do I must write my forum Ids manually?
If so, it's a bad way (hard code) and it's better to use a recursive function to retrieve hierarchical data automatically.

temporary uninstalled...

I think it must be as default feature in vb
Reply With Quote
  #19  
Old 07-06-2010, 01:20 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes you must write the forum ID's manually... I have this working down on 3.7 so I'm 99.9% sure it should work on 3.8.2 with the correct code edits. I am familiar with recursive functions but honestly don't see how it would apply here. I debated making the forum id's a declaration in only 1 place but I thought the code was neater this way, obviously if you know what you're doing you could do it either way, the crux of this code is merely the placement of the "If" statements and the WHERE clause.
Reply With Quote
  #20  
Old 07-08-2010, 03:46 AM
sinpin sinpin is offline
 
Join Date: Jan 2008
Location: Paradise
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sinpin View Post
it's better to use a recursive function to retrieve hierarchical data automatically.
I checked the Forum's table again,
in fact no need to use recursive function;
while there are 2 handy fields in this table that simplify the work:
1- childlist: stores list of all childs
2- parentlist: stores list of all parents
Reply With Quote
  #21  
Old 07-13-2010, 07:49 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 can confirm this still works in 3.8.6 with the same changes.

If you are updating to 3.8.6 from 3.8.5 you can keep using your 3.8.5 file provided you make the following small change:

Find the two instances of:
PHP Code:
IF(displaygroupid=0user.usergroupiddisplaygroupid) AS displaygroupidinfractiongroupid 
and replace them both with:

PHP Code:
IF(user.displaygroupid=0user.usergroupiduser.displaygroupid) AS displaygroupidinfractiongroupid 
f you can't 'find' the text above via 'find/replace' you probably have an extra blank space at the end of the text, it IS there in 3.8.5.
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 09:13 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.05073 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
  • (4)bbcode_php
  • (1)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
  • (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
  • (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
  • 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