summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@tinyboard.org>2011-05-21 15:21:45 +1000
committerSavetheinternet <savetheinternet@tinyboard.org>2011-05-21 15:21:45 +1000
commitbdb05b16d84115067acfce2e9e53c699521bc69c (patch)
tree246531948dedccf2be9f6213105312ff34be2408 /inc
parent568761f99c613a1c294095cc81df35a1c6a01d5a (diff)
Automatically check for Tinyboard updates
Diffstat (limited to 'inc')
-rw-r--r--inc/config.php9
-rw-r--r--inc/display.php10
-rw-r--r--inc/functions.php8
3 files changed, 20 insertions, 7 deletions
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 . ')</span></p>' .
// Thumbnail
- '<a href="' . $config['uri_img'] . $this->file.'"><img src="' . $config['uri_thumb'] . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" /></a>';
+ '<a href="' . $config['uri_img'] . $this->file.'"><img src="' . $config['uri_thumb'] . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" alt="" /></a>';
} elseif($this->file == 'deleted') {
- $built .= '<img src="' . $config['image_deleted'] . '" />';
+ $built .= '<img src="' . $config['image_deleted'] . '" alt="" />';
}
$built .= $this->postControls();
@@ -485,7 +485,7 @@
// Filename
$built .= ', ' . $this->filename . ')</span></p>' .
// Thumbnail
- '<a href="' . $config['uri_img'] . $this->file.'"><img src="' . $config['uri_thumb'] . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" /></a>';
+ '<a href="' . $config['uri_img'] . $this->file.'"><img src="' . $config['uri_thumb'] . $this->thumb.'" style="width:'.$this->thumbx.'px;height:'.$this->thumby.'px;" alt="" /></a>';
}
$built .= '<div class="post op"><p class="intro"' . (!$index?' id="' . $this->id . '"':'') . '>';
@@ -531,9 +531,9 @@
// JavaScript cite
'<a class="post_no"' . ($index?'':' onclick="citeReply(' . $this->id . ');"') . ' href="' . ($index ? $this->link('q') : 'javascript:void(0);') . '">'.$this->id.'</a>' .
// Sticky
- ($this->sticky ? '<img class="icon" title="Sticky" src="' . $config['image_sticky'] . '" />' : '') .
+ ($this->sticky ? '<img class="icon" title="Sticky" src="' . $config['image_sticky'] . '" alt="Sticky" />' : '') .
// Locked
- ($this->locked ? '<img class="icon" title="Locked" src="' . $config['image_locked'] . '" />' : '') .
+ ($this->locked ? '<img class="icon" title="Locked" src="' . $config['image_locked'] . '" alt="Locked" />' : '') .
// [Reply]
($index ? '<a href="' . $this->root . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $this->id) . '">[Reply]</a>' : '') .
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']))