コード例 #1
0
ファイル: framework.php プロジェクト: bizanto/Hooked
S2Paths::set($s2_app, 'S2_APP_OVERRIDES', PATH_ROOT . 'templates' . DS . 'jreviews_overrides' . DS);
S2Paths::set($s2_app, 'S2_APP_URL_OVERRIDES', WWW_ROOT . 'templates' . _DS . 'jreviews_overrides' . _DS);
S2Paths::set($s2_app, 'S2_VIEWS_OVERRIDES', S2Paths::get($s2_app, 'S2_APP_OVERRIDES') . 'views' . DS);
S2Paths::set($s2_app, 'S2_HELPERS_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_OVERRIDES') . 'helpers' . DS);
S2Paths::set($s2_app, 'S2_THEMES_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_OVERRIDES') . 'themes' . DS);
S2Paths::set($s2_app, 'S2_JS_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_OVERRIDES') . 'js' . DS);
S2Paths::set($s2_app, 'S2_VIEWS_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_APP_URL_OVERRIDES') . 'views' . _DS);
S2Paths::set($s2_app, 'S2_THEMES_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_URL_OVERRIDES') . 'themes' . _DS);
S2Paths::set($s2_app, 'S2_IMAGES_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_URL_OVERRIDES') . 'images' . _DS);
S2Paths::set($s2_app, 'S2_CSS_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_URL_OVERRIDES') . 'css' . _DS);
S2Paths::set($s2_app, 'S2_JS_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_URL_OVERRIDES') . 'js' . _DS);
S2Paths::set($s2_app, 'S2_ADMIN_VIEWS_OVERRIDES', S2Paths::get($s2_app, 'S2_APP_OVERRIDES') . 'views' . DS . 'admin' . DS);
S2Paths::set($s2_app, 'S2_ADMIN_HELPERS_OVERRIDES', S2Paths::get($s2_app, 'S2_ADMIN_VIEWS_OVERRIDES') . 'helpers' . DS);
S2Paths::set($s2_app, 'S2_ADMIN_VIEWS_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_URL_OVERRIDES') . 'admin' . _DS);
S2Paths::set($s2_app, 'S2_CSS_ADMIN_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_ADMIN_VIEWS_URL_OVERRIDES') . 'css' . _DS);
S2Paths::set($s2_app, 'S2_JS_ADMIN_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_ADMIN_VIEWS_URL_OVERRIDES') . 'js' . _DS);
// Create the file registry
$Configure =& Configure::getInstance($s2_app);
$s2App =& App::getInstance($s2_app);
require_once dirname(__FILE__) . DS . 'config' . DS . 'core.php';
# Set app variable in I18n class
$import = App::import('Lib', 'I18n');
if (!$import) {
    $clear = clearCache('', 'core');
    if (!$clear) {
        echo 'You need to delete the file registry in /components/com_s2framework/tmp/cache/core/';
        exit;
    }
    $page = $_SERVER['PHP_SELF'];
    header("Location: index.php?option=com_jreviews");
    exit;
コード例 #2
0
ファイル: framework.php プロジェクト: atikahmed/joomla-probid
S2Paths::set($s2_app, 'S2_CSS_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_URL_OVERRIDES') . 'css' . _DS);
S2Paths::set($s2_app, 'S2_JS_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_URL_OVERRIDES') . 'js' . _DS);
S2Paths::set($s2_app, 'S2_ADMIN_VIEWS_OVERRIDES', S2Paths::get($s2_app, 'S2_APP_OVERRIDES') . 'views' . DS . 'admin' . DS);
S2Paths::set($s2_app, 'S2_ADMIN_HELPERS_OVERRIDES', S2Paths::get($s2_app, 'S2_ADMIN_VIEWS_OVERRIDES') . 'helpers' . DS);
S2Paths::set($s2_app, 'S2_ADMIN_VIEWS_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_VIEWS_URL_OVERRIDES') . 'admin' . _DS);
S2Paths::set($s2_app, 'S2_CSS_ADMIN_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_ADMIN_VIEWS_URL_OVERRIDES') . 'css' . _DS);
S2Paths::set($s2_app, 'S2_JS_ADMIN_URL_OVERRIDES', S2Paths::get($s2_app, 'S2_ADMIN_VIEWS_URL_OVERRIDES') . 'js' . _DS);
# Set default theme
if (defined('MVC_FRAMEWORK_ADMIN')) {
    $db = cmsFramework::getDB();
    $tables = $db->getTableList();
    $dbprefix = cmsFramework::getConfig('dbprefix');
    if (in_array($dbprefix . 'jreviews_config', $tables)) {
        $db->setQuery("SELECT value FROM #__jreviews_config WHERE id = 'fallback_theme'");
        $fallback_theme = $db->loadResult();
        S2Paths::set($s2_app, 'S2_FALLBACK_THEME', $fallback_theme != '' ? $fallback_theme : 'default');
    }
    unset($db);
}
# Create the file registry
$Configure =& Configure::getInstance($s2_app);
$s2App =& App::getInstance($s2_app);
require_once dirname(__FILE__) . DS . 'config' . DS . 'core.php';
# Set app variable in I18n class
$import = App::import('Lib', 'I18n');
if (!$import) {
    $clear = clearCache('', 'core');
    if (!$clear) {
        echo 'You need to delete the file registry in /components/com_s2framework/tmp/cache/core/';
        exit;
    }