diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-09-25 16:34:59 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-09-25 16:34:59 +1000 |
| commit | 1bb87177930758dcf62172793748dd34f55201eb (patch) | |
| tree | 9d9299dc95818a86fea53c318056105dac9b81c5 /inc | |
| parent | e089acd1ebc8c5c5d44429b4b4a9fb2345018f29 (diff) | |
| parent | a59b915b0a94fe621503deeeca5eef17c5fababc (diff) | |
Merge branch 'master' of github.com:savetheinternet/Tinyboard
Diffstat (limited to 'inc')
| -rw-r--r-- | inc/config.php | 11 | ||||
| -rw-r--r-- | inc/functions.php | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/inc/config.php b/inc/config.php index 0a8b982d..1b36f210 100644 --- a/inc/config.php +++ b/inc/config.php @@ -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 diff --git a/inc/functions.php b/inc/functions.php index a5c8a518..7ba2278b 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -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'])) { |
