The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
Master Forum / All Topics - View Posts from Multiple Forums in a Single Forum Details »» | ||||||||||||||||||||||
Master Forum / All Topics - View Posts from Multiple Forums in a Single Forum
Developer Last Online: Aug 2023
Note: This mod was developed for 3.8.x but I have confirmed it works the same for 3.7.x, visit the 3.8 mod for some extra options: https://vborg.vbsupport.ru/showthread.php?t=245414 it is the same instructions and code.
This is a way to display posts from various forums and/or subforums in a single forum. This is in part based on this article: https://vborg.vbsupport.ru/showthread.php?t=181876 which allows you to view sub-forum posts in the parent forum. This mod goes a step further and lets you view posts from any forum, subforum or not, and only does so for a single forum, not every forum like the original article. See post # 2 in this thread for an option for having multiple master forums. Note: This does not share posts between different sites (domains), merely between forums (categories) on your own site. If you need to share posts between completely different sites check out this mod. (not mine!) Another Note: You need go edit the forumdisplay.php file to do this, I strongly suggest you backup this file by making a copy before editing and calling it forumdisplay.old or such so you can easily switch back if something goes wrong. I also suggest you close your forum while making these changes. This mod adds NO additional queries to the database, it should be very efficient. Open forumdisplay.php in your favorite text editor. There are two to three edits we have to make, the first and last are required, the middle one is optional- I will explain when we get to it. Note: See post #4 in the 3.8 thread for an option to let users choose to enable/disable the system. If you want to do this follow the instructions in post 4 before making the edits. Edit 1. Find: PHP Code:
PHP Code:
Also replace the numbers 1,2,3 in the WHERE forumid IN (1, 2, 3) statement with the forum id's of all the forums you want to be able to view the posts of, you can have as many or as few forum ids here as you want, I have about 18 myself. Be sure you include the number of the "Master Forum" in this set. Separate id's with commas. On to our second edit. This one is a little trickier because it's already inside an IF statement but follow exactly and you'll be OK... This is the optional edit. Make this edit only if you want sticky threads from the other forums to appear as sticky threads in the "Master Forum." This could get ugly if you have stickies in every forum like I do so personally I skipped this step but tested it to make sure it works. Note: If you don't do this sticky threads will not show at all in the "Master Forum" until unstuck from their respective forum. Edit 2 (Optional). Find: PHP Code:
PHP Code:
Edit 3 (required). Find: PHP Code:
PHP Code:
Now wipe the sweat off your face and save and upload the file. Make sure this file has the same chmod (read/write permissions) as your original forumdisplay.php file. I suggest making a few test posts to make sure everything is working like you expect before re-opening your forum. Why would anyone do this you might ask... All I can say is that if you never thought about this you probably don't need it, but I've been looking for this for 2 years with numerous requests for it that went unanswered. I have a mainly off-topic forum but I like to 'file' my posts into various 'on-topic' categories where appropriate. Many users complained about threads being moved because some didn't like browsing sub-forums although I feel it was essential to move them for future reference, archiving, and SEO purposes. This basically solves the problem of people who want one massive OT forum and those who like to keep things neat and apart. I'm sorry all of these are manual edits... if someone can find a way to make these automatic they have my permission to release it as their own mod, for the good of the community. Please remember to mark as installed if you use this. NEW: See posts 6 and 7 in the 3.8 thread for a couple of additional options you may be interested in if using this mod. Screen Shots- The first one is the original forum the post was made in, in this case "Off Topic Light." The second image is the "Master Forum" or "Off Topic," as you can see the the top post from the secondary forum is also listed in the master forum. All posts from the secondary forum are also in the Master forum, just further down the page then the screen shot captures. SS1: https://vborg.vbsupport.ru/attachmen...4&d=1277758531 SS2: https://vborg.vbsupport.ru/attachmen...5&d=1277758531 Show Your Support
|
Comments |
#2
|
||||
|
||||
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:
PHP Code:
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. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|