aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2013-08-19 09:41:19 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2013-08-19 09:41:19 -0400
commitc5eb569f5122d4140952bd5cc7ad4fdc5fbf8a23 (patch)
tree37024ec14fde9fef92eef8e9f997f72731e5155d /include
parent41d7bde950d6166a6cc414a48d0fa57f3fd9a512 (diff)
parent50f14f6bee7e1efaac5971579fc2e76c728ecad6 (diff)
downloadbayonetcms-master.tar.gz
Merge pull request #3 from eoconnell/masterHEADmaster
Some more stuff
Diffstat (limited to 'include')
-rw-r--r--include/classes.php4
-rw-r--r--include/config.example.php61
-rw-r--r--include/config.ini.example50
3 files changed, 63 insertions, 52 deletions
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 @@
+<?php
+/**
+* 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 <http://www.gnu.org/licenses/>.
+*/
+
+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 &copy; 2007-2010 Joseph Hunkeler &amp; 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 <http://www.gnu.org/licenses/>.
-;
-
-[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 &copy; 2007-2010 Joseph Hunkeler &amp; Evan O\'Connell, All rights reserved."
-version="2.1"
-release="Alpha"
-