Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
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
Mod Version: 1.00, by BirdOPrey5 (IB Staff) BirdOPrey5 is offline
Developer Last Online: Jul 2019 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.x Rating: (1 vote - 5.00 average) Installs: 1
Released: 05 Jul 2010 Last Update: Never Downloads: 0
Supported Code Changes Translations  

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: http://www.vbulletin.org/forum/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: http://www.vbulletin.org/forum/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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace with:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

In the code above replace the number 1 in the if ($foruminfo[forumid] == 1) statement with the forum id of what you want to be the "Master Forum" - The forum from which you can view the other forum's posts.
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace With:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Like before change the numbers in the if and where statements to your needs.

Edit 3 (required). Find:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Replace With:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Once again change the numbers in the if and where statements to your needs.

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: http://www.vbulletin.org/forum/attac...4&d=1277758531
SS2: http://www.vbulletin.org/forum/attac...5&d=1277758531

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Forum Display Enhancements All Topic - Master Forums - Shows threads from multiple forums in one forum BirdOPrey5 vBulletin 4.x Add-ons 223 11 Aug 2018 13:41
Forum Display Enhancements All Topic / Master Forums - View Threads from Multiple Forums in a Master Forums BirdOPrey5 vBulletin 3.8 Add-ons 77 25 May 2016 06:31

Comments
  #2  
Old 06 Jul 2010, 05:41
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.
__________________
-Joe
Former vBulletin.org Staff Member

(@BirdOPrey5) Former vb.org Moderator. Fighting for a free & independent vb.org.
BirdOPrey5.com - Exclusive VB Mods! (Formerly Qapla.com) | Joe's Ultimate Off Topic
Note - I do not read my PMs often, do not expect quick replies.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 22:05.

Layout Options | Width: Wide Color: