diff --git a/inc/config.php b/inc/config.php index 800996c5..7fa9da2d 100644 --- a/inc/config.php +++ b/inc/config.php @@ -26,8 +26,12 @@ 'custom_capcode' => Array(), 'dnsbl' => Array() ); - // Database stuff + // Database stuff + // Automatically check if a newer version of Tinyboard is available when an administrator logs in + $config['check_updates'] = true; + // How often to check for updates + $config['check_updates_time'] = 43200; // 12 hours // SQL driver ("mysql", "pgsql", "sqlite", "dblib", etc) // http://www.php.net/manual/en/pdo.drivers.php @@ -46,6 +50,9 @@ // Timeout duration in seconds (not all drivers support this) $config['db']['timeout'] = 5; + // Shows some extra information at the bottom of pages. Good for debugging development. + // Also experimental. + $config['debug'] = false; // Optional Memcached server for more cache/optimization (currently at debug state) $config['memcached']['enabled'] = false; diff --git a/inc/display.php b/inc/display.php index 965356da..38ab67a6 100644 --- a/inc/display.php +++ b/inc/display.php @@ -342,9 +342,9 @@ $built .= ', ' . $this->filename . ')
' . // Thumbnail - '';
@@ -531,9 +531,9 @@
// JavaScript cite
''.$this->id.'' .
// Sticky
- ($this->sticky ? '' : '') .
+ ($this->sticky ? '
' : '') .
// Locked
- ($this->locked ? '
' : '') .
+ ($this->locked ? '
' : '') .
// [Reply]
($index ? '[Reply]' : '') .
diff --git a/inc/functions.php b/inc/functions.php
index d3be5d1c..20118599 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -9,7 +9,7 @@
loadConfig();
function loadConfig() {
- global $board, $config, $__ip;
+ global $board, $config, $__ip, $debug;
require 'config.php';
if (file_exists('inc/instance-config.php')) {
@@ -19,6 +19,12 @@
require $board['dir'] . '/config.php';
}
+ if($config['debug']) {
+ if(!isset($debug))
+ $debug = Array('sql');
+ $debug['start'] = time();
+ }
+
if(!isset($config['url_stylesheet']))
$config['url_stylesheet'] = $config['root'] . 'style.css';
if(!isset($config['url_javascript']))
diff --git a/mod.php b/mod.php
index ce486525..4b62a434 100644
--- a/mod.php
+++ b/mod.php
@@ -82,6 +82,7 @@
'Administration' => '',
'Themes' => '',
'Search' => '',
+ 'Update' => '',
'Logout' => ''
);
@@ -155,6 +156,9 @@
if($mod['type'] >= $config['mod']['rebuild']) {
$fieldset['Administration'] .= '
' . $body . '
', + 'mod'=>true + )); } elseif(preg_match('/^\/rebuild$/', $query)) { if($mod['type'] < $config['mod']['rebuild']) error($config['error']['noaccess']);