Add TINYIB_INDEX - resolves #61
This commit is contained in:
parent
d8d758ae39
commit
629c4a3417
5 changed files with 9 additions and 5 deletions
|
@ -59,7 +59,7 @@ Installing
|
|||
7. Navigate your browser to **imgboard.php** and the following will take place:
|
||||
- The database structure will be created.
|
||||
- Directories will be verified to be writable.
|
||||
- The file **index.html** will be created containing the new image board.
|
||||
- The board index will be written to ``TINYIB_INDEX``.
|
||||
|
||||
Moderating
|
||||
------------
|
||||
|
|
|
@ -540,10 +540,10 @@ if (isset($_POST['message']) || isset($_POST['file'])) {
|
|||
}
|
||||
|
||||
echo managePage($text, $onload);
|
||||
} elseif (!file_exists('index.html') || countThreads() == 0) {
|
||||
} elseif (!file_exists(TINYIB_INDEX) || countThreads() == 0) {
|
||||
rebuildIndexes();
|
||||
}
|
||||
|
||||
if ($redirect) {
|
||||
echo '--> --> --><meta http-equiv="refresh" content="' . (isset($slow_redirect) ? '3' : '0') . ';url=' . (is_string($redirect) ? $redirect : 'index.html') . '">';
|
||||
echo '--> --> --><meta http-equiv="refresh" content="' . (isset($slow_redirect) ? '3' : '0') . ';url=' . (is_string($redirect) ? $redirect : TINYIB_INDEX) . '">';
|
||||
}
|
||||
|
|
|
@ -9,6 +9,9 @@ define('TINYIB_RESPAGE', true);
|
|||
|
||||
// The following are provided for backward compatibility and should not be relied upon
|
||||
// Copy new settings from settings.default.php to settings.php
|
||||
if (!defined('TINYIB_INDEX')) {
|
||||
define('TINYIB_INDEX', 'index.html');
|
||||
}
|
||||
if (!defined('TINYIB_MAXREPLIES')) {
|
||||
define('TINYIB_MAXREPLIES', 0);
|
||||
}
|
||||
|
|
|
@ -475,7 +475,7 @@ function rebuildIndexes() {
|
|||
$htmlposts .= buildPost($thread, TINYIB_INDEXPAGE) . implode('', array_reverse($htmlreplies)) . "\n<hr>";
|
||||
|
||||
if (++$i >= TINYIB_THREADSPERPAGE) {
|
||||
$file = ($page == 0) ? 'index.html' : $page . '.html';
|
||||
$file = ($page == 0) ? TINYIB_INDEX : ($page . '.html');
|
||||
writePage($file, buildPage($htmlposts, 0, $pages, $page));
|
||||
|
||||
$page++;
|
||||
|
@ -485,7 +485,7 @@ function rebuildIndexes() {
|
|||
}
|
||||
|
||||
if ($page == 0 || $htmlposts != '') {
|
||||
$file = ($page == 0) ? 'index.html' : $page . '.html';
|
||||
$file = ($page == 0) ? TINYIB_INDEX : ($page . '.html');
|
||||
writePage($file, buildPage($htmlposts, 0, $pages, $page));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ define('TINYIB_CAPTCHA', ''); // Reduce spam by requiring users to pass
|
|||
define('TINYIB_REQMOD', ''); // Require moderation before displaying posts: files / all (see README for instructions, only MySQL is supported) ['' to disable]
|
||||
|
||||
// Board appearance
|
||||
define('TINYIB_INDEX', 'index.html'); // Index file
|
||||
define('TINYIB_LOGO', ''); // Logo HTML
|
||||
define('TINYIB_THREADSPERPAGE', 10); // Amount of threads shown per index page
|
||||
define('TINYIB_PREVIEWREPLIES', 3); // Amount of replies previewed on index pages
|
||||
|
|
Loading…
Reference in a new issue