Esempio n. 1
0
    Elie `woe` BLETON
*/
?>

<html>

<head>
<title>proto</title>
</head>

<body>
<h2>bBlog 0.8 prototype</h2>

<?php 
require './lib/bBlog.class.php';
$bBlog = new bBlog();
?>

<pre>
<b><u>Init:</u></b>

<?php 
$returnValue = $bBlog->LoadCodeFile('./ext/ext.foo.php');
if ($returnValue != 0) {
    echo "<b>Error</b>: Unable to load extension foo (error code: {$returnValue})";
}
?>

<b><u>Operation:</u></b>
<?php 
$bBlog->Call("extFoo", "Init");
Esempio n. 2
0
define('T_LINKS', TBL_PREFIX . 'links');
define('T_CATEGORIES', TBL_PREFIX . 'categories');
define('T_RSS', TBL_PREFIX . 'rss');
// legacy
define('C_BLOGURL', BLOGURL);
// prevent errors when _open_basedir is set
ini_set('include_path', './:../');
define('SMARTY_DIR', BBLOGROOT . 'libs/');
// include  needed files
include BBLOGROOT . 'libs/Smarty.class.php';
include BBLOGROOT . 'libs/ez_sql.php';
include BBLOGROOT . 'inc/bBlog.class.php';
include BBLOGROOT . 'inc/functions.php';
include BBLOGROOT . 'inc/templates.php';
// start your engines
$bBlog = new bBlog();
$mtime = explode(" ", microtime());
$bBlog->begintime = $mtime[1] + $mtime[0];
// this is only here until I work out the best way to do theming.
//$bBlog->clear_compiled_tpl();
$bBlog->template_dir = BBLOGROOT . 'templates/' . C_TEMPLATE;
$bBlog->compile_dir = BBLOGROOT . 'compiled_templates/';
if (defined('IN_BBLOG_ADMIN')) {
    $bBlog->compile_id = 'admin';
} else {
    $bBlog->compile_id = C_TEMPLATE;
}
$bBlog->plugins_dir = array(BBLOGROOT . 'bBlog_plugins', BBLOGROOT . 'smarty_plugins');
$bBlog->use_sub_dirs = FALSE;
// change to true if you have a lot of templates
define('BBLOG_VERSION', "0.7.6");