forked from GithubBackups/tinyib
Settings are now stored in a separate file
This commit is contained in:
parent
7ae43625ba
commit
a88d0283f7
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
settings.php
|
15
README
15
README
@ -1,24 +1,25 @@
|
|||||||
TinyIB by tj9991
|
TinyIB by tslocum
|
||||||
http://tj9991.github.com/TinyIB/
|
http://tslocum.github.com/
|
||||||
|
|
||||||
Supports MySQL and flat file database modes.
|
Supports MySQL and flat file database modes.
|
||||||
|
|
||||||
To install:
|
To install TinyIB:
|
||||||
- CD to the directory you wish to install TinyIB
|
- CD to the directory you wish to install TinyIB
|
||||||
- Run the following command:
|
- Run the following command:
|
||||||
--- git clone git://github.com/tj9991/TinyIB ./
|
--- git clone git://github.com/tslocum/TinyIB.git ./
|
||||||
- Edit the configuration at the top of imgboard.php
|
- Rename settings.default.php to settings.php
|
||||||
|
- Configure settings.php
|
||||||
- CHMOD write permissions to the following directories:
|
- CHMOD write permissions to the following directories:
|
||||||
--- /
|
--- /
|
||||||
--- src/
|
--- src/
|
||||||
--- thumb/
|
--- thumb/
|
||||||
--- res/
|
--- res/
|
||||||
--- inc/flatfile/ (if using flatfile mode)
|
--- 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
|
--- Create database structure based on chosen mode
|
||||||
--- Test appropriate directories are writable
|
--- Test appropriate directories are writable
|
||||||
--- Write index.html with a blank image board
|
--- Write index.html with a blank image board
|
||||||
|
|
||||||
To update:
|
To update TinyIB:
|
||||||
- Run the following command:
|
- Run the following command:
|
||||||
--- git pull
|
--- git pull
|
26
imgboard.php
26
imgboard.php
@ -1,8 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
# TinyIB
|
# TinyIB
|
||||||
#
|
#
|
||||||
# http://tinyib.googlecode.com/
|
# https://github.com/tslocum/TinyIB
|
||||||
# http://tj9991.github.com/TinyIB/
|
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
ini_set("display_errors", 1);
|
ini_set("display_errors", 1);
|
||||||
@ -14,28 +13,15 @@ if (get_magic_quotes_gpc()) {
|
|||||||
}
|
}
|
||||||
if (get_magic_quotes_runtime()) { set_magic_quotes_runtime(0); }
|
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) {
|
function fancyDie($message) {
|
||||||
die('<span style="color: red;font-size: 1.5em;font-family: Helvetica;">' . $message . '</span>');
|
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
|
// Check directories are writable by the script
|
||||||
$writedirs = array("res", "src", "thumb");
|
$writedirs = array("res", "src", "thumb");
|
||||||
if ($tinyib['databasemode'] == 'flatfile') { $writedirs[] = "inc/flatfile"; }
|
if ($tinyib['databasemode'] == 'flatfile') { $writedirs[] = "inc/flatfile"; }
|
||||||
|
19
settings.default.php
Normal file
19
settings.default.php
Normal file
@ -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…
x
Reference in New Issue
Block a user