FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » FUDAPI: Creating a forum?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
FUDAPI: Creating a forum? [message #187810] Sun, 10 November 2019 16:02 Go to next message
BugLaden is currently offline  BugLaden   Canada
Messages: 216
Registered: February 2002
Location: Westminster, MD
Karma: 0
Senior Member
I don't see a function in the API to create a forum.
http://cvs.prohost.org/index.php?title=FUDAPI

How hard would it be?


-=BugLaden
Re: FUDAPI: Creating a forum? [message #187816 is a reply to message #187810] Sun, 17 November 2019 03:54 Go to previous messageGo to next message
BugLaden is currently offline  BugLaden   Canada
Messages: 216
Registered: February 2002
Location: Westminster, MD
Karma: 0
Senior Member
So this statement seemed to work in my code:

        //Create the forum
        require_once "/home2/bugladen/cake/tobacconerd/FUDforum/include/GLOBALS.php";
        require_once "/home2/bugladen/cake/tobacconerd/FUDforum/scripts/fudapi.inc.php";
        $id = db_qid('INSERT INTO 
			'. $GLOBALS['DBHOST_TBL_PREFIX'] .'forum (
				cat_id,
                name,
                date_created
            ) VALUES (
            '. GroupsController::FORUM_CATEGORY .',    
            '. _esc($group->name) .',
            now()
			)
		'); 

FORUM_CATEGORY is a constant set to the id of an existing category in the forum

The forum appears in the Admin->Forum Management just fine.

It just doesn't appear in the forum index page at all. Not sure why.


-=BugLaden

[Updated on: Sun, 17 November 2019 03:55]

Report message to a moderator

Re: FUDAPI: Creating a forum? [message #187839 is a reply to message #187816] Mon, 13 January 2020 15:53 Go to previous messageGo to next message
fennecfox is currently offline  fennecfox
Messages: 2
Registered: April 2017
Karma: 0
Junior Member
I was able to create a forum in a script, but it wouldn't show up until I added rebuild_forum_cat_order() afterwards.

That function is in include/cat.inc. Good luck!
Re: FUDAPI: Creating a forum? [message #188059 is a reply to message #187839] Wed, 17 March 2021 09:28 Go to previous message
Lou is currently offline  Lou
Messages: 1
Registered: March 2021
Karma: 0
Junior Member
Thank you all
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: FIX: FUDAPI niggles
Next Topic: Map BBCode
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Mar 28 17:28:25 GMT 2024

Total time taken to generate the page: 0.03670 seconds