Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Including JonesCore

JN-Jones edited this page Dec 19, 2014 · 1 revision

Note: This page is wip


This page shows you some steps you need to follow to include JonesCore to your project:

  • Include inc/plugins/jones/core/include.php to your project. This file will handle the automatic installation process of JonesCore
  • Require the above file at the top of your plugin (after the IN_MYBB check of course) and register the package:
require_once MYBB_ROOT."inc/plugins/jones/core/include.php";
if(JB_CORE_INSTALLED === true)
{
    JB_Packages::i()->register("prefix", "vendor", "codename");
}

prefix is the prefix which you use to prefix your classes, vendor is mainly used as folder name and codename is the unique codename for your plugin (should be the same as the plugin file).

  • call jb_install_plugin in your installation file. The function has some parameters:

    • $codename should be your codename
    • $core_minimum: the minimum version of JonesCore that is required; defaults to false which means every version
    • $mybb_minimum: the minimum version code (eg 1803) of MyBB that is required; defaults to false
    • $php_minimum: the minimum php version that is required, defaults to 5.3

    More information about installation can be found on the Installation page

Clone this wiki locally