miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /  
 

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

 
Author PleaseHelpMe
Guest
#1 | Posted: 25 Nov 2011 20:37 
Hello,

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.

Thanks!

Author Guest
~
#2 | Posted: 27 Nov 2011 17:55 
Minibb could be integrated with almost everything.Look up for the synchronizing guide in downloads and refer to minibb customer services.

Author PleaseHelpMe
Guest
#3 | Posted: 28 Nov 2011 00:14 
Guest:
Minibb could be integrated with almost everything.Look up for the synchronizing guide in downloads and refer to minibb customer services.
Hi Guest, thanks for your response, but I need a more specific answer than that.

I am deciding between using Phorum or MiniBB and I need to fully understand how easy each forum is to integrate, synchronize, and embed on my site.

I hope to receive a more complete answer from the MiniBB team about how this would work. I need to analyze that so that I can make an informed decision about which platform to embed in my site.

Author Paul
Lead Developer 
#4 | Posted: 28 Nov 2011 11:02 
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.

Search forums already may give you some tips:

Using existing site username/password session variables

Integration with external DB and Session management

Author PleaseHelpMe
Guest
#5 | Posted: 28 Nov 2011 14:20 
Thanks for your thorough reply, Paul.

To be clear, I do NOT need to convert MiniBB to a class. I can simply PHP "include" the files, this isn't a problem.

I know that MiniBB can do username/password/session integration quite easily, but I am looking for something more than that.

I need to be able to:

1) Incorporate the MiniBB body into a page on my site, rather than incorporating my site header/footer into MiniBB

2) Customize the look and feel of MiniBB so it matches my existing site.

3) Change specific elements, such as linking the username in posts to the user's profile on my site rather than the profile on MiniBB.

Can MiniBB do all 3 above without having to change/alter the core files?

Author Paul
Lead Developer 
#6 | Posted: 28 Nov 2011 17:18 
PleaseHelpMe:
I can simply PHP "include" the files, this isn't a problem.
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.

Author PleaseHelpMe
Guest
#7 | Posted: 29 Nov 2011 15:37 
Paul,

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

Also, if miniBB is "included" in the way you described, how does the navigation work? Won't all the links point to the MiniBB forum location and not the parent page doing the "include" ?

Author Paul
Lead Developer 
#8 | Posted: 29 Nov 2011 16:57 
PleaseHelpMe:
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 ;)

Author PleaseHelpMe
Guest
#9 | Posted: 6 Dec 2011 03:07 
Can I limit access to certain forums/sub-forums based on criteria from my main site without changing the core files?

Author Paul
Lead Developer 
#10 | Posted: 6 Dec 2011 17:30 
It depends actually on what you call "limit" and how would you like to do that.

Author PleaseHelpMe
Guest
#11 | Posted: 7 Dec 2011 02:46 
Paul:
It depends actually on what you call "limit" and how would you like to do that.
For example, my users have an internal number form 1 - 100 representing Karma, and I would like to limit posting in certain sub-forums to users with a Karma score of at least 50.

Would I be able to do that without changing the core files?

Author Paul
Lead Developer 
#12 | Posted: 7 Dec 2011 13:03 
Yes. You should add the value of Karma to bb_cookie.php, f.e. as
$GLOBALS['user_karma']='YOUR_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.

Specific miniBB Support Forums / Specific /
 Can MiniBB be dynamically integrated into an existing class-based site?
 Share Topic's Link

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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑