MyBB Community Forums

Full Version: What do I need to include(); or require(); in a PHP file?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Like I'm writing a file to get the post activity of a user in all the different forums. I have a good understanding of how to do this, but what files do I need to include in order to use all the functions that MyBB provides?

Like:
require_once('config.php');

etc...

I've never developed anything for MyBB, so I'm at a dead halt. :|

Sorry if I'm not explaining this very well...

Thanks everyone!
Is this your first plugin? If so, we have a good tutorial here :

http://community.mybb.com/thread-123172.html

https://github.com/leefish/PluginTemplate << template I forked from Euantor
I made a small little "protip" here: http://coderwall.com/p/nms1kg

Basically what you need to do is have this:

define('IN_MYBB', 1);
require_once("global.php");
I wouldn't really call what I am making a plugin, as I am the only person going to be using this. Unless it turns out as a major success, and considering the fact that I have yet to find a "plugin" like this, I won't release it.

I might though to see what the community thinks. Smile

Y'all both answered my question perfectly, thank you!