forked from leftypol/leftypol
New "Categories" theme, modifications for support.
This commit is contained in:
parent
d51f6a932e
commit
d3fb010a8f
5 changed files with 195 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue