Can MiniBB be dynamically integrated into an existing class-based site?

My site is based entirely around the index.php file which uses a class-system to dynamically load each page. This makes the site highly integrated, which means that a simple template for MiniBB wouldn't really cut it.

Can the MiniBB hook System or any other element of it be integrated dynamically into the site? What I mean by that is that I would need to integrate the MiniBB with my existing index.php file which controls the entire site, so I'm looking for a forum that would allow me to essentially include all the elements that make up MiniBB.

For example, within my index.php, I would add the forum page with hooks such as:

$hook->thread(1); //display first thread of MiniBB $hook->thread(2); //display second thread of MiniBB ... $hook->post(1,1) //display first post of first thread

In other words, where I can completely control which unique elements of MiniBB are displayed so I can fully integrate it with my existing class-based site rather than have to have a separate file (other than the existing index.php) for MiniBB. Editing the header.tpl and footer.tpl files would only be a superficial integration of MiniBB within my site, and not a real integration with how the site currently functions and operates.

Is anything like this remotely possible with MiniBB's integration system? If not, do you have any ideas of how I could achieve this type of high-level integration? Otherwise it seems that I'm stuck with hacking the MiniBB code, which I prefer to avoid for obvious reasons.

First of all, I must say that miniBB is not class-based. I would not recommend to use it as a standalone class application or achieve something like that. It's not worth. Let's not forget that any 3rd party software should be opened for easy upgrades. If you tweak it too much, you will use an insecure software for the whole life. That's not the approach we propagate on miniBB.

Additionally to that, I must say that while working for about 15 years in Web industry, I have concluded that "classing" is purely academical approach, which doesn't have anything common to the practice. Classing is nightmare. While in the functional code you can easily follow the logic and restore the points, even if it's not commented, Classing makes the code totally unreadable and understood only for its author. Also, it makes the code dramatically slow. Just for letting you know, that I dislike Classing. But that doesn't mean miniBB can't be integrated into the object-oriented software. Bridge to the Wordpress available from Downloads, proves the otherwise.

miniBB is a standalone app, and it should run as a standalone app. You can adjust miniBB to use your own cookies/session, using customized authorization functions, or tweak it to fit your graphical layout. In both cases, it can be done non-destructive way using only miniBB functions, and not your own functions. You also can't achieve good results in speed and efficiency, if you will "class" miniBB the way you suggest.

Just go otherwise: miniBB should include only your necessary codes, to build its own code, which will some way duplicate your own authorization functions. That's the main method.

Answering your questions:

1) It's not recommended by us and in some ways it's too heavy to load. However it's still possible to include miniBB that way. Layout integration should be completed only from miniBB itself. Then it will work with all of its powers, like it should.

2) It's done in one CSS file and standalone templates.

3) You could program a simple code for that, which will redirect from the default miniBB action to your own page. It's couple lines of code.

Can the 3 points you mentioned be done WITHOUT modifying the Core files?

Yes.

PleaseHelpMe:

Won't all the links point to the MiniBB forum location and not the parent page doing the "include" ?

They will point to the original miniBB URLs. Links do not actually depend on the inclusion method you would use. They are all specified as full URLs in miniBB, and the primary domain to forums is specified under $main_url setting of setup_options.php. All links will point strictly to this domain - but of course, if you won't modify templates a lot and don't change this value ;)

Then whereas in bb_plugins.php you can refer to this value, and build up the logics with forum IDs and posting restrictions, which may be dynamically added to $roForums array, and that way disallow users to post in the certain forum.

Your Reply

?You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.