1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

List Forums in Option

Discussion in 'XenForo Development Discussions' started by Robust, Apr 22, 2015.

  1. Robust

    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.

        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: Apr 22, 2015
  2. Chris D

    Chris D XenForo Developer Staff Member

  3. Robust

    Robust Well-Known Member

    @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.

Share This Page