Browse Source

Settings are now stored in a separate file

json
tslocum 12 years ago
parent
commit
a88d0283f7
  1. 1
      .gitignore
  2. 15
      README
  3. 26
      imgboard.php
  4. 19
      settings.default.php

1
.gitignore vendored

@ -0,0 +1 @@ @@ -0,0 +1 @@
settings.php

15
README

@ -1,24 +1,25 @@ @@ -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

26
imgboard.php

@ -1,8 +1,7 @@ @@ -1,8 +1,7 @@
<?php
# TinyIB
#
# http://tinyib.googlecode.com/
# http://tj9991.github.com/TinyIB/
# https://github.com/tslocum/TinyIB
error_reporting(E_ALL);
ini_set("display_errors", 1);
@ -14,28 +13,15 @@ if (get_magic_quotes_gpc()) { @@ -14,28 +13,15 @@ if (get_magic_quotes_gpc()) {
}
if (get_magic_quotes_runtime()) { set_magic_quotes_runtime(0); }
$tinyib = array();
$tinyib['board'] = "b"; // Unique identifier for this board using only letters and numbers
$tinyib['boarddescription'] = "TinyIB"; // Displayed in the logo area
$tinyib['maxthreads'] = 100; // Set this to limit the number of threads allowed before discarding older threads. 0 to disable
$tinyib['logo'] = ""; // Logo HTML
$tinyib['tripseed'] = ""; // Text to use when generating secure tripcodes
$tinyib['adminpassword'] = ""; // Text entered at the manage prompt to gain administrator access
$tinyib['modpassword'] = ""; // Same as above, but only has access to delete posts. Blank ("") to disable
$tinyib['databasemode'] = "flatfile"; // flatfile or mysql
// mysql settings
$mysql_host = "localhost";
$mysql_username = "";
$mysql_password = "";
$mysql_database = "";
$mysql_posts_table = $tinyib['board'] . "_posts";
$mysql_bans_table = "bans";
function fancyDie($message) {
die('<span style="color: red;font-size: 1.5em;font-family: Helvetica;">' . $message . '</span>');
}
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"; }

19
settings.default.php

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
<?php
$tinyib = array();
$tinyib['board'] = "b"; // Unique identifier for this board using only letters and numbers
$tinyib['boarddescription'] = "TinyIB"; // Displayed in the logo area
$tinyib['maxthreads'] = 100; // Set this to limit the number of threads allowed before discarding older threads. 0 to disable
$tinyib['logo'] = ""; // Logo HTML
$tinyib['tripseed'] = ""; // Text to use when generating secure tripcodes
$tinyib['adminpassword'] = ""; // Text entered at the manage prompt to gain administrator access
$tinyib['modpassword'] = ""; // Same as above, but only has access to delete posts. Blank ("") to disable
$tinyib['databasemode'] = "flatfile"; // flatfile or mysql
// mysql settings
$mysql_host = "localhost";
$mysql_username = "";
$mysql_password = "";
$mysql_database = "";
$mysql_posts_table = $tinyib['board'] . "_posts";
$mysql_bans_table = "bans";
?>
Loading…
Cancel
Save