Browse Source
Merge pull request #138 from nonmakina/news
adds news to front page
gitIgnore1
towards-a-new-leftypol
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
3 deletions
-
templates/themes/catalog/theme.php
-
templates/themes/categories/news.html
-
templates/themes/categories/theme.php
|
|
@ -27,7 +27,7 @@ |
|
|
|
$b->build($settings, $board); |
|
|
|
} |
|
|
|
} |
|
|
|
if($settings['has_overboard']) { |
|
|
|
if(isset($settings['has_overboard']) && $settings['has_overboard']) { |
|
|
|
$board = $settings['overboard_location']; |
|
|
|
$action = generation_strategy("sb_catalog", array($board)); |
|
|
|
if ($action == 'delete') { |
|
|
|
|
|
@ -1,9 +1,10 @@ |
|
|
|
{% filter remove_whitespace %} |
|
|
|
{{ boardlist.top }} |
|
|
|
<div class="content"> |
|
|
|
{{ boardlist.top }} |
|
|
|
<header> |
|
|
|
<h1>{{ settings.title }}</h1> |
|
|
|
<div class="subtitle">{{ settings.subtitle }}</div> |
|
|
|
<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}"> |
|
|
|
</header> |
|
|
|
|
|
|
|
<div class="ban"> |
|
|
|
|
|
@ -28,13 +28,15 @@ |
|
|
|
// Build homepage |
|
|
|
public static function homepage($settings) { |
|
|
|
global $config; |
|
|
|
|
|
|
|
$query = query("SELECT * FROM ``news`` ORDER BY `time` DESC") or error(db_error()); |
|
|
|
$news = $query->fetchAll(PDO::FETCH_ASSOC); |
|
|
|
return Element( |
|
|
|
'themes/categories/frames.html', |
|
|
|
Array( |
|
|
|
'config' => $config, |
|
|
|
'settings' => $settings, |
|
|
|
'categories' => Categories::getCategories($config), |
|
|
|
'news' => $news, |
|
|
|
'boardlist' => createBoardlist(false) |
|
|
|
|
|
|
|
) |
|
|
|