forked from leftypol/leftypol
a lot more improvements
This commit is contained in:
parent
ac2837c620
commit
a610458720
40 changed files with 986 additions and 271 deletions
|
@ -54,11 +54,11 @@ Requires $config[\'categories\'].';
|
|||
$theme['build_function'] = 'categories_build';
|
||||
$theme['install_callback'] = 'categories_install';
|
||||
|
||||
if(!function_exists('categories_install')) {
|
||||
if (!function_exists('categories_install')) {
|
||||
function categories_install($settings) {
|
||||
global $config;
|
||||
|
||||
if(!isset($config['categories'])) {
|
||||
if (!isset($config['categories'])) {
|
||||
return Array(false, '<h2>Prerequisites not met!</h2>' .
|
||||
'This theme requires $config[\'boards\'] and $config[\'categories\'] to be set.');
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
</legend>
|
||||
{% for board in boards %}
|
||||
<li>
|
||||
<a href="{{ board.uri }}">{{ board.title }}</a>
|
||||
<a href="{{ board.uri }}">{{ board.title|e }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</fieldset>
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
public static function build($action, $settings) {
|
||||
global $config;
|
||||
|
||||
if($action == 'all')
|
||||
if ($action == 'all')
|
||||
file_write($config['dir']['home'] . $settings['file_main'], Categories::homepage($settings));
|
||||
|
||||
if($action == 'all' || $action == 'boards')
|
||||
if ($action == 'all' || $action == 'boards')
|
||||
file_write($config['dir']['home'] . $settings['file_sidebar'], Categories::sidebar($settings));
|
||||
|
||||
if($action == 'all' || $action == 'news')
|
||||
if ($action == 'all' || $action == 'news')
|
||||
file_write($config['dir']['home'] . $settings['file_news'], Categories::news($settings));
|
||||
}
|
||||
|
||||
|
@ -52,10 +52,10 @@
|
|||
|
||||
$categories = $config['categories'];
|
||||
|
||||
foreach($categories as &$boards) {
|
||||
foreach($boards as &$board) {
|
||||
foreach ($categories as &$boards) {
|
||||
foreach ($boards as &$board) {
|
||||
$title = boardTitle($board);
|
||||
if(!$title)
|
||||
if (!$title)
|
||||
$title = $board; // board doesn't exist, but for some reason you want to display it anyway
|
||||
$board = Array('title' => $title, 'uri' => sprintf($config['board_path'], $board));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue