forked from leftypol/leftypol
Automatically check for Tinyboard updates
This commit is contained in:
parent
568761f99c
commit
bdb05b16d8
4 changed files with 91 additions and 7 deletions
|
@ -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;
|
||||
|
|
|
@ -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>' : '') .
|
||||
|
||||
|
|
|
@ -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']))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue