Jump to content

GL 2.5.1 Forums Edit


Recommended Posts

This small edit will stop the Forum lists appearing on your left menu and there will only be one link to the forums to view all topics and cats


Lines 1 to 31 need editing to that of the below code



    new hook("customMenus", function ($user) {
        if ($user) {

            $forums = $user->db->prepare("SELECT * FROM forums ORDER BY F_sort ASC, F_name Limit 1");

            $allForums = $forums->fetchAll(PDO::FETCH_ASSOC);

            $items = array();

            foreach ($allForums as $forum) {
                $items[] = array(
                    "url" => "?page=forum", 
                    "text" => "View Forums"
            if (!count($items)) return array();
            return array(
                "title" => "Forum", 
				"url" => "?page=forum",
                "items" => $items
        } else {
            return false;



  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...