MyBB Community Forums

Full Version: How to use function from mybb in custom file?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to custom move threads.

I see "move_threads()" functions in class_moderation.php that I want to use.
How do I include it in empty php file?

I tried
include('inc/init.php');
include('global.php');
but it returns "Please make sure IN_MYBB is defined".

How it should be done?
I'd use this instead:

define("IN_MYBB", 1);
require_once MYBB_ROOT."inc/init.php";
require_once "./global.php";
Yep, thanks.

I just realized i could see it in any real php page-file in mybb.