Easily Extensible Thread Types

Wildcat Media

Well-known member
Right now, we have four thread types--discussion, article, question, poll.

Yet there is no easy way that I can see to create new thread types.

I am suggesting a way for use to be able to create a subset of templates so we can create our own thread types. I can think of two or three off the top of my head, where custom layouts would apply to these thread types that I wouldn't necessarily want in any other thread type. For some of these, I could possibly try the resource manager add-on but even there, we only really have layout for a single type of resource.

What I envision is an interface to first create a new thread type (which would include offering it as a selectable option, offer it as part of node where only that thread type is allowed, create "preview" similar to the article preview, and create appropriate permissions where needed), which would then open up a means to either copy over templates from existing thread types for us to modify, or allow us to create our own from scratch. Aside from things like the voting feature in the Questions thread type, or the Poll function, most of these are based on layout changes.

As it is now, I could easily modify templates to change appearance to do what I want for a couple of new thread types I need, but unless I used a crap ton of conditionals based on the node ID (which would be a major kludge), it's not all that easy to do.

With some sort of method to first create/register a new thread type, and offer us a distinct set of templates to customize each of our new thread types, that would help us improve the utility of our forums.

I've considered the resource manager and creating some major template changes for a couple of our use cases, but since we can only have one Resource Manager layout, that is similarly restrictive.
 
Upvote 7
I have an "end user definition" of new thread type.

It's a thread type that could show up like this:

View attachment 326842

as seen in
when you post a thread.

If Xenforo was to take information seriously, communities need more structured options for creating data.

Instead we are paying to try to extract useful data from chitchat threads via AI.
I’m a little confused what you mean exactly.

But when you register a new thread type you have to tell it what forum types it should appear in.

If I remember correctly if you want it to appear you have to add it specifically to a forum types you want it to appear in, check out the forum type discussion or something and you should see a method in there where you define the thread types it uses.

Edit: This is the method

PHP:
    /**
     * Returns a list of thread type IDs that can possibly be (manually) created in this forum
     *
     * @param Forum $forum
     *
     * @return array
     */
    public function getPossibleCreatableThreadTypes(Forum $forum): array
    {
        return ['article', 'poll', 'question'];
    }
 
Last edited:
Back
Top Bottom