From a88d0283f7bffb3548a4d8ff9459ef977261fb97 Mon Sep 17 00:00:00 2001 From: tslocum Date: Mon, 29 Nov 2010 16:24:15 -0800 Subject: [PATCH] Settings are now stored in a separate file --- .gitignore | 1 + README | 15 ++++++++------- imgboard.php | 26 ++++++-------------------- settings.default.php | 19 +++++++++++++++++++ 4 files changed, 34 insertions(+), 27 deletions(-) create mode 100644 .gitignore create mode 100644 settings.default.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3dd1e75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +settings.php \ No newline at end of file diff --git a/README b/README index b3e9220..1b6c25a 100644 --- a/README +++ b/README @@ -1,24 +1,25 @@ -TinyIB by tj9991 -http://tj9991.github.com/TinyIB/ +TinyIB by tslocum +http://tslocum.github.com/ Supports MySQL and flat file database modes. -To install: +To install TinyIB: - CD to the directory you wish to install TinyIB - Run the following command: ---- git clone git://github.com/tj9991/TinyIB ./ -- Edit the configuration at the top of imgboard.php +--- git clone git://github.com/tslocum/TinyIB.git ./ +- Rename settings.default.php to settings.php +- Configure settings.php - CHMOD write permissions to the following directories: --- / --- src/ --- thumb/ --- res/ --- inc/flatfile/ (if using flatfile mode) -- Open a browser and navigate to imgboard.php, which will do the following: +- Open your browser of choice and navigate to imgboard.php, causing the following to take place: --- Create database structure based on chosen mode --- Test appropriate directories are writable --- Write index.html with a blank image board -To update: +To update TinyIB: - Run the following command: --- git pull \ No newline at end of file diff --git a/imgboard.php b/imgboard.php index 98e0f98..451628c 100644 --- a/imgboard.php +++ b/imgboard.php @@ -1,8 +1,7 @@ ' . $message . ''); } +if (!file_exists('settings.php')) { + fancyDie('Please rename the file settings.default.php to settings.php'); +} +require 'settings.php'; + // Check directories are writable by the script $writedirs = array("res", "src", "thumb"); if ($tinyib['databasemode'] == 'flatfile') { $writedirs[] = "inc/flatfile"; } diff --git a/settings.default.php b/settings.default.php new file mode 100644 index 0000000..e1ba4c4 --- /dev/null +++ b/settings.default.php @@ -0,0 +1,19 @@ + \ No newline at end of file