MyBB Community Forums

Full Version: What is best integration wise...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am working on a stand alone CMS script that will be integrated with MyBB and I was wondering what is best:

1) Include the global.php from MyBB and do integration like that. That option allows me to integrate everything much better and also take advantage of the theming.

2) Integrate separately and make separate connections to the MyBB database. This could be a option as the global.php could interfere with the CMS script.

Personally I am leaning to the global.php as it sounds much better and easier but I want to hear the opions from the experts as I am still pretty new to PHP.

Cheers,
Bob
I'm also new to PHP, but I personally would go for the first option. Seems to be the easiest and the most time effective method in my eyes.
(2010-12-14, 03:14 AM)UndiscoveredTalent Wrote: [ -> ]I'm also new to PHP, but I personally would go for the first option. Seems to be the easiest and the most time effective method in my eyes.
Correct although someone more experienced with MyBB and integration wise told me that the main problem is that their would be script conflicts but if you do it well and give other classes that shouldn't be any problems in my opinion.
Here is my answer to you.

1. Generally, you will use 'globals.php', If you're not yet PHP savvy. It would be simpler enough to focus on the standard mybb global syntax if you're still a newbie, BUT if you have another MySQL configuration that is included with 'globals.php'. It would create script conflicts. I would suggest putting ALL other tables that will be integrated to mybb into the mybb database for easier utilization.

2. In this option, you will need more thinking about getting the scripts to work perfectly. I should say it's the best option. This is the main reason why I choose 2.
  • You can customize your script in any way you want.

In option two here are some of the things I've innovated.
- Checking user post count every month -> for my post2host interface
- Linkage of main site & forum accounts
- Update info/options via main site.
Depends on how tightly integrated you want it to be. If it's more like a standalone project, for example only sharing the user authentication, avoid global.php - if it's more like a plugin, using a database table with mybb_ prefix and interacting with MyBB in countless ways (like a CMS <-> forum thread relation), global.php is probably what you want (plugins have it anyway as plugins are loaded by global.php and not the other way around).

Pro global.php: gives you easy access to everything MyBB (database, user authentication, managing threads etc.)
Con global.php: adds a lot of variables and functions and cookies and stuff which you may not need nor want
(2010-12-14, 01:53 PM)n1tr0b Wrote: [ -> ]Here is my answer to you.

1. Generally, you will use 'globals.php', If you're not yet PHP savvy. It would be simpler enough to focus on the standard mybb global syntax if you're still a newbie, BUT if you have another MySQL configuration that is included with 'globals.php'. It would create script conflicts. I would suggest putting ALL other tables that will be integrated to mybb into the mybb database for easier utilization.

2. In this option, you will need more thinking about getting the scripts to work perfectly. I should say it's the best option. This is the main reason why I choose 2.
  • You can customize your script in any way you want.

In option two here are some of the things I've innovated.
- Checking user post count every month -> for my post2host interface
- Linkage of main site & forum accounts
- Update info/options via main site.
The three last things you mentioned are also easily doable with using the global.css

(2010-12-14, 03:06 PM)frostschutz Wrote: [ -> ]Depends on how tightly integrated you want it to be. If it's more like a standalone project, for example only sharing the user authentication, avoid global.php - if it's more like a plugin, using a database table with mybb_ prefix and interacting with MyBB in countless ways (like a CMS <-> forum thread relation), global.php is probably what you want (plugins have it anyway as plugins are loaded by global.php and not the other way around).

Pro global.php: gives you easy access to everything MyBB (database, user authentication, managing threads etc.)
Con global.php: adds a lot of variables and functions and cookies and stuff which you may not need nor want
Thanks for the feedback, my main thought that leads me to the global.css is that I can always go around the variables etc. I will be experimenting with both and see which one fits the best for my script.
first off, do you want your CMS to only work with MyBB or do you want to be able to expand later to bridge/integrate with other forum software?
(2010-12-15, 04:22 AM)pavemen Wrote: [ -> ]first off, do you want your CMS to only work with MyBB or do you want to be able to expand later to bridge/integrate with other forum software?
For now MyBB but perhaps in the future for other softwares but than as you will probably advice it will have to be a full stand alone script Wink.
standalone script but you can build a bridge manager to include the needed functionality for each forum software. just focus on MyBB for now and add more later.

similar to how coppermine works or even how mybb uses database classes with the same function names, but each function utilizes engine specific code
when is ready this plugin?