Example #1
0
if (!empty($login_error) || $login_required && !is_logged_in()) {
    // ----- LOGIN FAILED ----- OR Login is required and user is not logged in yet
    $Debuglog->add('Login error: ' . $login_error, '_init_login');
    // inskin param is set when the login request come from the front office
    // we need this to decide if we should use display in-skin login from or not
    param('inskin', 'boolean', 0);
    $Debuglog->add('Param inskin: ' . $inskin, '_init_login');
    if ($inskin || use_in_skin_login()) {
        // Use in-skin login
        $Debuglog->add('Trying to use in-skin login', '_init_login');
        if (is_logged_in()) {
            // user is logged in, but the email address is not validated yet
            $login = $current_User->login;
            $email = $current_User->email;
        }
        if (empty($Blog) && init_requested_blog()) {
            // $blog is set, init $Blog also
            $BlogCache =& get_BlogCache();
            $Blog = $BlogCache->get_by_ID($blog, false, false);
        }
        $blog_skin_ID = NULL;
        if (!empty($Blog)) {
            // Blog was set
            $blog_skin_ID = $Blog->get_skin_ID();
        }
        if (!empty($blog_skin_ID)) {
            // Blog exists and skin ID is set
            // Init charset handling:
            init_charsets($current_charset);
            locale_activate($Blog->get('locale'));
            $Messages->add($login_error);
Example #2
0
 *
 * @package main
 */
/**
 * First thing: Do the minimal initializations required for b2evo:
 */
require_once dirname(__FILE__) . '/conf/_config.php';
require_once $inc_path . '_main.inc.php';
$Timer->resume('index.php');
if (!isset($collections_Module)) {
    // The evocore framework is not used as a blog app here / we don't know how to display a public interface...
    header_redirect('admin.php', 302);
    exit(0);
}
// initialize which blog should be displayed, and display default page if blog could not be initialized
if (!init_requested_blog(false)) {
    // No specific blog to be displayed:
    // we are going to display the default page:
    require dirname(__FILE__) . '/default.php';
    exit;
}
// A blog has been requested... Let's set a few default params:
# You could *force* a specific skin here with this setting:
# $skin = 'basic';
# This setting retricts posts to those published, thus hiding drafts.
# You should not have to change this.
# TODO: Check if we still need this and if it's even working (it's probably overidden anyways)
$show_statuses = array();
# Additionnaly, you can set other values (see URL params in the manual)...
# $order = 'ASC'; // This for example would display the blog in chronological order...
$Timer->pause('index.php');
Example #3
0
 *
 * @package main
 */
/**
 * First thing: Do the minimal initializations required for b2evo:
 */
require_once dirname(__FILE__) . '/conf/_config.php';
require_once $inc_path . '_main.inc.php';
$Timer->resume('index.php');
if (!isset($collections_Module)) {
    // The evocore framework is not used as a blog app here / we don't know how to display a public interface...
    header_redirect('admin.php', 302);
    exit(0);
}
// initialize which blog should be displayed, and display default page if blog couldn't been initialized
if (!init_requested_blog()) {
    // No specific blog to be displayed:
    // we are going to display the default page:
    require dirname(__FILE__) . '/default.php';
    exit;
}
// A blog has been requested... Let's set a few default params:
# You could *force* a specific skin here with this setting:
# $skin = 'basic';
# This setting retricts posts to those published, thus hiding drafts.
# You should not have to change this.
$show_statuses = array();
# Additionnaly, you can set other values (see URL params in the manual)...
# $order = 'ASC'; // This for example would display the blog in chronological order...
$Timer->pause('index.php');
// That's it, now let b2evolution do the rest! :)