Ejemplo n.º 1
0
define('AKPATH_BASE', AKPATH_ROOT . '/base');
define('AKPATH_HELPERS', AKPATH_ROOT . '/helpers');
define('AKPATH_COMPONENT', AKPATH_ROOT . '/component');
define('AKPATH_FORM', AKPATH_ROOT . '/form');
define('AKPATH_HTML', AKPATH_ROOT . '/html');
define('AKPATH_LANGUAGE', AKPATH_ROOT . '/language');
define('AKPATH_LAYOUTS', AKPATH_ROOT . '/layouts');
define('AKPATH_ASSETS', AKPATH_ROOT . '/assets');
define('AKPATH_TABLES', AKPATH_COMPONENT . '/tables');
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
// Include joomla api
// ========================================================================
jimport('joomla.html.toolbar');
jimport('joomla.filesystem.folder');
jimport('joomla.filesystem.file');
include_once AKPATH_BASE . "/proxy.php";
include_once AKPATH_HELPERS . "/akhelper.php";
// Set Default helper prefix for AKProxy
AKHelper::setPrefix('AKHelper');
AKHelper::addIncludePath(AKPATH_HELPERS);
function akLoader($uri, $option = null)
{
    return AKHelper::_('loader.import', $uri, $option);
}
include_once AKPATH_ADMIN . "/toolbar.php";
include_once AKPATH_BASE . "/text.php";
// Load Language
$lang = JFactory::getLanguage();
$lang->load('lib_windwalker', JPATH_BASE, null, false, false) || $lang->load('lib_windwalker', AKPATH_ROOT, null, false, false) || $lang->load('lib_windwalker', JPATH_BASE, $lang->getDefault(), false, false) || $lang->load('lib_windwalker', AKPATH_ROOT, $lang->getDefault(), false, false);
Ejemplo n.º 2
0
        $app->redirect('index.php', $message);
    }
}
// Include WindWalker from libraries or component self.
// ===============================================================
if (!defined('AKPATH_ROOT')) {
    $inner_ww_path = JPATH_ADMINISTRATOR . "/components/com_remoteimage/windwalker";
    $lib_ww_path = JPATH_LIBRARIES . '/windwalker';
    if (file_exists($lib_ww_path . '/init.php')) {
        // From libraries
        $ww_path = $lib_ww_path;
    } else {
        // From Component folder
        $ww_path = $inner_ww_path;
    }
    // Init WindWalker
    // ===============================================================
    if (!file_exists($ww_path . '/init.php')) {
        $message = 'Please install WindWalker Framework libraries.';
        throw new Exception($message, 500);
    }
    include_once $ww_path . '/init.php';
} else {
    include_once AKPATH_ROOT . '/init.php';
}
include_once JPath::clean(JPATH_ADMINISTRATOR . "/components/com_remoteimage/helpers/remoteimage.php");
include_once JPath::clean(JPATH_ADMINISTRATOR . "/components/com_remoteimage/includes/loader.php");
// Set Component helper prefix, and AKProxy can use component helper first.
// If component helper and methods not exists, AKProxy will call AKHelper instead.
AKHelper::setPrefix('RemoteimageHelper');
AKHelper::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_remoteimage/helpers');
Ejemplo n.º 3
0
    $inner_ww_path = JPATH_ADMINISTRATOR . "/components/com_webgallery/windwalker";
    $lib_ww_path = JPATH_LIBRARIES . '/windwalker';
    if (file_exists($lib_ww_path . '/init.php')) {
        // From libraries
        $ww_path = $lib_ww_path;
    } else {
        // From Component folder
        $ww_path = $inner_ww_path;
    }
    // Init WindWalker
    // ===============================================================
    if (!file_exists($ww_path . '/init.php')) {
        $message = 'Please install WindWalker Framework libraries.';
        throw new Exception($message, 500);
    }
    include_once $ww_path . '/init.php';
} else {
    include_once AKPATH_ROOT . '/init.php';
}
// Define
// ========================================================================
define('WEBGALLERY_SITE', JPATH_ROOT . "/components/com_webgallery");
define('WEBGALLERY_ADMIN', JPATH_ADMINISTRATOR . "/components/com_webgallery");
define('WEBGALLERY_SELF', $app->isAdmin() ? WEBGALLERY_ADMIN : WEBGALLERY_SITE);
// Get Helper
include_once JPath::clean(JPATH_ADMINISTRATOR . "/components/com_webgallery/helpers/webgallery.php");
include_once JPath::clean(JPATH_ADMINISTRATOR . "/components/com_webgallery/includes/loader.php");
// Set Component helper prefix, then AKProxy can use component helper first.
// If component helper and methods not exists, AKProxy will call AKHelper instead.
AKHelper::setPrefix('WebgalleryHelper');
AKHelper::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_webgallery/helpers');