New "Categories" theme, modifications for support.

This commit is contained in:
Michael D. Reiley 2011-09-20 12:49:07 -07:00
parent d51f6a932e
commit d3fb010a8f
5 changed files with 195 additions and 0 deletions

View file

@ -710,6 +710,17 @@
// 'status' => 'http://status.example.org/'
//);
// Categories
// Required for the Categories theme. Array of the names of board groups in order, from $config['boards'].
//$config['categories'] = Array('groupname', 'name', 'anothername', 'kangaroos');
// Custom_categories
// Optional for the Categories theme. Array of name => (title, url) groups for categories with non-board links.
//$config['custom_categories'] = Array( 'Links' =>
// Array('Tinyboard' => 'http://tinyboard.org',
// 'AnotherName' => 'url')
//);
// Set custom locations for stylesheets, scripts and maybe a banner.
// This can be good for load balancing across multiple servers or hostnames.
// $config['url_stylesheet'] = 'http://static.example.org/style.css'; // main/base stylesheet

View file

@ -228,6 +228,16 @@
} else return false;
}
function boardTitle($uri) {
$query = prepare("SELECT `title` FROM `boards` WHERE `uri` = :uri LIMIT 1");
$query->bindValue(':uri', $uri);
$query->execute() or error(db_error($query));
if($title = $query->fetch()) {
return $title['title'];
} else return false;
}
function purge($uri) {
global $config, $debug;
if(preg_match($config['url_match'], $config['root'])) {