List Forums in Option

Robust

Well-known member
I want an option in the ACP to list all forums in a multiple selection (ctrl to select multiple) menu. Previously I've just asked the user for forum IDs, but I'm trying to do a more user friendly approach.

I have this callback that returns an array, but that isn't really going to work. I need a select menu from the options.

Code:
    public static function getForums()
    {
        $forumModel = XenForo_Model::create('XenForo_Model_Forum');
        return $forumModel->getForums();
    }

To get a list of forums that should do it, but how do I get it into the actual menu in the ACP options?

Edit: Think I got it
 
Last edited:
@Chris D Thanks :) I used an add-on for reference in the end. I used what I found out and managed to make my own one for prefixes as well after about 15 minutes of banging my head and looking through XenForo classes. I feel so proud of the overall result I have so far :P Working on a Q&A add-on and so far I have more than half of the back work done, front-end to go. Quite a bit of it was found digging around XF's code, but a lot of it was self coded. Surprised I managed to do a lot of this. Worst part now is the styling, the buttons etc. work but it doesn't really do anything except change a few database values. Worst part is CSS flies right through my head so this will be the much harder part.
 
Top Bottom