Example #1
0
 * OnePanelLib::RequireFileOnce
 * 
 */
require_once realpath(ONE_PANEL_DIR . '/onepanellib.php');
// Include Installer File
OnePanelLib::RequireFileOnce(ONE_PANEL_DIR . '/onepanelinstaller.php');
/*
 *  Include Language File
 *  No need to start it here, it will be started and put into use when required
 *  TODO consider allowing language terms of One Panel to be editable in future,
 *  the object will need to be started here at that point.
 */
OnePanelLib::RequireFileOnce(ONE_PANEL_DIR . '/language.php');
// Include the config class, and create the OnePanelConfig Object
OnePanelLib::RequireFileOnce(ONE_PANEL_DIR . '/onepanelconfig.php');
OnePanelConfig::Start();
// Include Externals
//OnePanelLib::RequireFileOnce( ONE_PANEL_DIR .'/onepanelexternals.php' );
//OnePanelExternals::AddActions();
// THESE ARE BROKEN
/*
 * Create one of two objects depending on which environment we appear
 * to be using. The OnePanelTheme has methods that should be available to
 * theme developers, but do not need to be present in the backend.
 */
if (is_admin() || OnePanelLib::InAjaxMode()) {
    // Log
    OnePanelDebug::Info('Running non AJAX mode in OnePanel.');
    // Instantiate the OnePanel Object
    OnePanelLib::RequireFileOnce(ONE_PANEL_DIR . '/panel/onepanel.php');
    OnePanel::Start();