miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

How can I add a new forum from outside code?

Author dekelver
Registered
#1 | Posted: 27 Apr 2007 15:19 
I've integrated miniBB into my site (unique code set here by the way... ;-) ) and have all the user information set up correctly and working.

Now I'm ready to try the next step. On my site, you've got the ability to make a team/group of users. What I want to do is when one of them is created I want to also create a private forum for that group. I've got the private forum code up and running, but what I want to do is create the forum and get the ID back at the same time as the group is created.

Question: Do you have an API or function that I can use to create a forum from my other code, or do I have to go against the DB directly? I'd prefer a method, but if one's not available (I couldn't find one), then I'll write the db code.

Thank you for your help. Once I get the answer to this one, I've got another question that's even more fun!

Jeff

Author Paul
Lead Developer
#2 | Posted: 30 Apr 2007 03:18 
There is no API and I guess what you need to do when the group is created, is:

a) create a new forum record in DB
b) get ID of the newly created forum
c) get IDs of all users you want to be allowed for that forum
d) program a function that modifies bb_specials.php and fills $clForums and $clForumsUsers arrays in the proper format.

Author dekelver
Registered
#3 | Posted: 1 May 2007 20:53 
That's what I thought I would have to do. I've already got that implemented and working just fine. I was hoping that there would be an interface so that upgrading wouldn't be as big of an issue. I guess that I'm integrating things a little bit more than most would do.

Thank you for the reply!

Jeff

Author Paul
Lead Developer
#4 | Posted: 2 May 2007 07:11 
upgrading wouldn't be as big of an issue

- well, this modification should not affect the upgrades at all. bb_specials.php is your own custom file which should not be upgraded when you upgrade the main miniBB core.

Specific miniBB Support Forums / Specific / How can I add a new forum from outside code? Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB