예제 #1
0
 /**
  * Constructor, creates a story, taking a (geeklog) database object.
  *
  * @param $mode   string    Story class mode, either 'admin' or 'submission'
  */
 public function __construct($mode = 'admin')
 {
     \Geeklog\Autoload::load('gltext');
     $this->mode = $mode;
 }
예제 #2
0
// To disable your site quickly, simply set this flag to false
$_CONF['site_enabled'] = true;
// If you have errors on your site, can't login, or can't get to the
// config UI, then you can comment this in to set the root debug option
// on and get detailed error messages. You can set this to 'force' (which the
// Config UI won't allow you to do) to override hiding of password and cookie
// items in the debug trace.
//$_CONF['rootdebug'] = true;
/**
 * Developer mode
 *
 * If you set this mode to true, detailed information will be displayed and/or logged.
 *
 * @var boolean
 * @since 2.1.2
 */
// $_CONF['developer_mode'] = true;
$_CONF['path'] = Tst::$root;
$_CONF['path_system'] = $_CONF['path'] . 'system/';
$_CONF['default_charset'] = 'utf-8';
$_CONF_FCK['imagelibrary'] = '/images/library';
// Useful Stuff
if (!defined('LB')) {
    define('LB', "\n");
}
if (!defined('VERSION')) {
    define('VERSION', '2.1.2');
}
require_once $_CONF['path_system'] . 'classes/Autoload.php';
\Geeklog\Autoload::initialize();
예제 #3
0
        case 'xhtml10transitional':
        case 'xhtml10strict':
        case 'xhtml5':
            define('XHTML', ' /');
            break;
        default:
            define('XHTML', '');
            break;
    }
}
// Set template class default template variables option
/**
 * @global $TEMPLATE_OPTIONS array
 */
$TEMPLATE_OPTIONS = array('path_cache' => $_CONF['path_data'] . 'layout_cache/', 'path_prefixes' => array($_CONF['path_themes'], $_CONF['path'], '/'), 'incl_phpself_header' => true, 'cache_by_language' => true, 'cache_for_mobile' => $_CONF['cache_mobile'], 'default_vars' => array('xhtml' => XHTML, 'site_url' => $_CONF['site_url'], 'site_admin_url' => $_CONF['site_admin_url'], 'layout_url' => $_CONF['layout_url'], 'anonymous_user' => COM_isAnonUser(), 'device_mobile' => $_DEVICE->is_mobile()), 'hook' => array('set_root' => 'CTL_setTemplateRoot'));
\Geeklog\Autoload::load('template');
// Template library contains helper functions for template class
require_once $_CONF['path_system'] . 'lib-template.php';
// Set language
if (isset($_COOKIE[$_CONF['cookie_language']]) && empty($_USER['language'])) {
    $language = COM_sanitizeFilename($_COOKIE[$_CONF['cookie_language']]);
    if (is_file($_CONF['path_language'] . $language . '.php') && $_CONF['allow_user_language'] == 1) {
        $_USER['language'] = $language;
        $_CONF['language'] = $language;
    }
} elseif (!empty($_USER['language'])) {
    if (is_file($_CONF['path_language'] . $_USER['language'] . '.php') && $_CONF['allow_user_language'] == 1) {
        $_CONF['language'] = $_USER['language'];
    }
} elseif (!empty($_CONF['languages']) && !empty($_CONF['language_files'])) {
    $_CONF['language'] = COM_getLanguage();