How to use function from mybb in custom file?
#1
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?
Reply
#2
I'd use this instead:

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)