From f472c60b18469ff8a06963708174dea1bfc08015 Mon Sep 17 00:00:00 2001 From: Evan O'Connell Date: Sun, 18 Aug 2013 18:29:07 -0400 Subject: Adds untracked changes --- include/classes.php | 4 +-- include/config.example.php | 61 ++++++++++++++++++++++++++++++++++++++++++++++ include/config.ini.example | 50 ------------------------------------- 3 files changed, 63 insertions(+), 52 deletions(-) create mode 100644 include/config.example.php delete mode 100644 include/config.ini.example (limited to 'include') diff --git a/include/classes.php b/include/classes.php index 321e063..65017b6 100644 --- a/include/classes.php +++ b/include/classes.php @@ -97,13 +97,13 @@ class Bayonet_Theme extends Bayonet_Layout class Bayonet_Config { static $ini; + static function init() { decho('Parsing configuration data'); if (file_exists(BAYONET_CONFIG)) { - self::$ini = parse_ini_file(BAYONET_CONFIG, true); - decho(self::$ini); + self::$ini = require_once 'config.php'; } else die(BAYONET_CONFIG . ' not found'); } diff --git a/include/config.example.php b/include/config.example.php new file mode 100644 index 0000000..5854828 --- /dev/null +++ b/include/config.example.php @@ -0,0 +1,61 @@ +. +*/ + +return array( + + 'sql' => array( + 'hostname' => 'localhost', + 'database' => 'bayonet', + 'username' => 'bayonet', + 'password' => 'password' + ), + + 'site' => array( + 'url' => 'http://example.com/', // must have a trailing slash + 'theme' => 'new', + 'favicon' => 'favicon.ico' + ), + + 'modules' => array( + 'default' => 'index', + ), + + 'blocks' => array( + 'spacer' => true + ), + + 'logs' => array( + 'enabled' => true, + 'timezone' => 'EST', + 'dir' => 'logs/' + ), + + 'debug' => array( + 'enabled' => true, + 'show_messages' => true, + 'repeat_messages' => false + ), + + 'product' => array( + 'name' => 'Bayonet CMS', + 'copyright' => 'Copyright © 2007-2010 Joseph Hunkeler & Evan O\'Connell, All rights reserved.', + 'version' => '0.0.1', + 'release' => 'Beta' + ) +); \ No newline at end of file diff --git a/include/config.ini.example b/include/config.ini.example deleted file mode 100644 index 074fc24..0000000 --- a/include/config.ini.example +++ /dev/null @@ -1,50 +0,0 @@ -; -; Bayonet Content Management System -; Copyright (C) 2008 Joseph Hunkeler & Evan O'Connell -; -; This program is free software: you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation, either version 3 of the License, or -; (at your option) any later version. -; -; This program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with this program. If not, see . -; - -[sql] -hostname="localhost" -database="bayonet" -username="bayonet" -password="passwd" - -[site] -theme="gttheme" -favicon="favicon.ico" - -[modules] -default="index" - -[blocks] -spacer=true - -[logs] -enabled=true -timezone="EST" -dir="logs/" - -[debug] -enabled=false -show_messages=true -repeat_messages=false - -[product] -name="Bayonet CMS" -copyright="Copyright © 2007-2010 Joseph Hunkeler & Evan O\'Connell, All rights reserved." -version="2.1" -release="Alpha" - -- cgit