MyBB Community Forums

Full Version: Help With Changing Layout Based On Setting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys, I'm working on a plugin that will change the postbit layout according to the type of post. I have added a field to the posts table for the type, and I am working on adding some settings to change the type that a post is. The only issue I am having right now is how to change the postbit based on the post type. What exactly would be the best way to do this?

I see that the choice is made in showthread.php based on the "postlayout" setting. If I use the showthread_start hook, would I be able to replace that line? But that would change it for all posts in the thread, instead of the individual posts, correct? And if I use the postbit hooks, I would be forced to replace a decent amount of text as the layout has already been chosen at that point.

Hopefully you understand what I am trying to do. Sorry if some of the questions I ask seem somewhat basic, I am new to mybb. Any help you could give is much appreciated.