b2evolution PHP Cross Reference Blogging Systems

Source: /index.php - 62 lines - 2022 bytes - Summary - Text - Print

Description: This is the main public interface file. IF YOU ARE READING THIS IN YOUR WEB BROWSER, IT MEANS THAT PHP IS NOT PROPERLY INSTALLED ON YOUR WEB SERVER. IF YOU DON'T KNOW WHAT THIS MEANS, CONTACT YOUR SERVER ADMINISTRATOR OR YOUR HOSTING COMPANY.

   1  <?php
   2  /**
   3   * This is the main public interface file.
   4   *
   5   * IF YOU ARE READING THIS IN YOUR WEB BROWSER, IT MEANS THAT PHP IS NOT PROPERLY INSTALLED
   6   * ON YOUR WEB SERVER. IF YOU DON'T KNOW WHAT THIS MEANS, CONTACT YOUR SERVER ADMINISTRATOR
   7   * OR YOUR HOSTING COMPANY.
   8   *
   9   * This file is NOT mandatory. You can delete it if you want.
  10   * You can also replace the contents of this file with contents similar to the contents
  11   * of a_stub.php, a_noskin.php, multiblogs.php, etc.
  12   *
  13   * b2evolution - {@link http://b2evolution.net/}
  14   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  15   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
  16   *
  17   * {@internal Note: we need at least one file in the main package}}
  18   *
  19   * @package main
  20   */
  21  
  22  /**
  23   * First thing: Do the minimal initializations required for b2evo:
  24   */
  25  require_once dirname(__FILE__).'/conf/_config.php';
  26  
  27  require_once $inc_path.'_main.inc.php';
  28  
  29  $Timer->resume('index.php');
  30  
  31  if( ! isset($collections_Module) )
  32  {    // The evocore framework is not used as a blog app here / we don't know how to display a public interface...
  33      header_redirect( 'admin.php', 302 );
  34      exit(0);
  35  }
  36  
  37  // initialize which blog should be displayed, and display default page if blog couldn't been initialized
  38  if( !init_requested_blog() )
  39  { // No specific blog to be displayed:
  40      // we are going to display the default page:
  41      require dirname(__FILE__).'/default.php';
  42      exit();
  43  }
  44  
  45  // A blog has been requested... Let's set a few default params:
  46  
  47  # You could *force* a specific skin here with this setting:
  48  # $skin = 'basic';
  49  
  50  # This setting retricts posts to those published, thus hiding drafts.
  51  # You should not have to change this.
  52  $show_statuses = array();
  53  
  54  # Additionnaly, you can set other values (see URL params in the manual)...
  55  # $order = 'ASC'; // This for example would display the blog in chronological order...
  56  
  57  $Timer->pause('index.php');
  58  
  59  // That's it, now let b2evolution do the rest! :)
  60  require $inc_path.'_blog_main.inc.php';
  61  
  62  ?>

title

Description

title

Description

title

Description

title

title

Body