Search code examples
phpforumcategoriesphpbb3

phpBB3 - creating forum categories


I want to automate the process of creating a forum category with the phpBB library. I know how to post topics and forums by using the submit_post() function but I don't know how you make the forum into a category in which more forums/topics can be added.

submit_post() function: http://wiki.phpbb.com/Function.submit_post

There is no mention in the documentation here about making the forum into a category, so I'm assuming there is a different function for that.

To create a forum category in the ACP you'd go to create new forum, enter the name, and select category from the Forum Type drop-down list. However there is no definition of forum type in the function above, so I assume its a different function.

Having some trouble tracking it down though. If anyone knows the function I need please share.


Solution

  • I found one solution here. It requires writing directly to the database in places but does utilize some of the phpBB library classes: http://www.phpbb.com/community/viewtopic.php?f=71&t=758985

    I did find an alternative which is purely phpBB library classes: http://www.phpbb.com/community/viewtopic.php?f=46&t=1289975

    However this second solution requires you to have a 'System' user setup, which wouldn't work with the implementation I have. As I assume the system user would need to be authenticated.