Reply to thread

I was mistaken, I did a bit of digging, and you can just create a class extension, and just inject the thread_type like this:

[CODE="php"]class DiscussionHandler extends \XF\ForumType\DiscussionHandler

{

    public function getPossibleCreatableThreadTypes(Forum $forum): array

    {

        $types = parent::getPossibleCreatableThreadTypes($forum);

      

        if (!in_array('threadTypeName', $types)) {

            $types[] = 'threadTypeName';

        }

      

        return $types;

    }

}[/CODE]


That did kind of ruin a point I was trying to make. :) But I still agree, even if they don't make the entire process easier. I'd settle for some kind of documentation, to walk you through the process. As the entire process isn't exactly beginner friendly.


Back
Top Bottom