diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-12 17:25:15 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-12 17:25:15 +1100 |
| commit | 3737439338629890598abff0cc9e5c04528c66a9 (patch) | |
| tree | 971a1af242c84be1780e05d24961902762bedd51 /inc/instance-config.php | |
| parent | b57d600c368dafa267e137ec1570b044f7247b65 (diff) | |
Changed config to an array
Diffstat (limited to 'inc/instance-config.php')
| -rw-r--r-- | inc/instance-config.php | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/inc/instance-config.php b/inc/instance-config.php index 88178f2c..864a956c 100644 --- a/inc/instance-config.php +++ b/inc/instance-config.php @@ -11,14 +11,41 @@ // Database stuff
- define('DB_TYPE', 'mysql');
- define('DB_SERVER', 'localhost');
- define('DB_USER', '');
- define('DB_PASSWORD', '');
- define('DB_DATABASE', '');
-
- define('ROOT', '/');
-
-// define('FOO', 'bar');
-
+ $config['db']['type'] = 'mysql';
+ $config['db']['server'] = 'localhost';
+ $config['db']['user'] = '';
+ $config['db']['password'] = '';
+ $config['db']['database'] = '';
+
+ $config['root'] = '/';
+
+
+
+ // The following looks ugly. I will find a better place to put this code soon.
+ $config['post_url'] = $config['root'] . 'post.php';
+
+ $config['url_match'] = '/^' .
+ (preg_match($config['url_regex'], $config['root']) ? '' :
+ (@$_SERVER['HTTPS']?'https':'http') .
+ ':\/\/'.$_SERVER['HTTP_HOST']) .
+ preg_quote($config['root'], '/') .
+ '(' .
+ str_replace('%s', '\w{1,8}', preg_quote($config['board_path'], '/')) .
+ '|' .
+ str_replace('%s', '\w{1,8}', preg_quote($config['board_path'], '/')) .
+ preg_quote($config['file_index'], '/') .
+ '|' .
+ str_replace('%s', '\w{1,8}', preg_quote($config['board_path'], '/')) .
+ str_replace('%d', '\d+', preg_quote($config['file_page'], '/')) .
+ '|' .
+ preg_quote($config['file_mod'], '/') .
+ '\?\/.+' .
+ ')$/i';
+
+ $config['dir']['static'] = $config['root'] . 'static/';
+
+ $config['image_sticky'] = $config['dir']['static'] . 'sticky.gif';
+ $config['image_locked'] = $config['dir']['static'] . 'locked.gif';
+ $config['image_deleted'] = $config['dir']['static'] . 'deleted.png';
+ $config['image_zip'] = $config['dir']['static'] . 'zip.png';
?>
\ No newline at end of file |
