Adding board name to title of catalog theme

This commit is contained in:
Benjamin Southall 2016-12-10 18:33:52 +09:00
parent 0e7577f4ea
commit a5c79ff638
2 changed files with 11 additions and 7 deletions

View File

@ -7,6 +7,7 @@
var active_page = "catalog"
, board_name = "{{ board }}";
</script>
<title>{{ settings.title }} ( /{{ board }}/ )</title>
{% include 'header.html' %}
</head>
<body class="8chan vichan {% if mod %}is-moderator{% else %}is-not-moderator{% endif %} theme-catalog active-catalog" data-stylesheet="{% if config.default_stylesheet.1 != '' %}{{ config.default_stylesheet.1 }}{% else %}default{% endif %}">
@ -41,7 +42,7 @@
<option value="large">{% trans 'Large' %}</option>
</select>
</div>
<br></br>
<div class="threads">
<div id="Grid">
{% for post in recent_posts %}

View File

@ -15,7 +15,7 @@
// - post-thread (a thread has been made)
if ($action === 'all') {
foreach ($boards as $board) {
$b = new Catalog();
$b = new Catalog($settings);
$action = generation_strategy("sb_catalog", array($board));
if ($action == 'delete') {
@ -27,7 +27,7 @@
}
}
} elseif ($action == 'post-thread' || ($settings['update_on_posts'] && $action == 'post') || ($settings['update_on_posts'] && $action == 'post-delete') && in_array($board, $boards)) {
$b = new Catalog();
$b = new Catalog($settings);
$action = generation_strategy("sb_catalog", array($board));
if ($action == 'delete') {
@ -148,10 +148,13 @@
/**
* Build and save the HTML of the catalog for the given board
*/
public function build($board_name) {
if (!openBoard($board_name)) {
error(sprintf(_("Board %s doesn't exist"), $post['board']));
}
public function build($settings, $board_name) {
global $config, $board;
if ($board['uri'] != $board_name) {
if (!openBoard($board_name)) {
error(sprintf(_("Board %s doesn't exist"), $board_name));
}
}
if (array_key_exists($board_name, $this->threadsCache)) {
$threads = $this->threadsCache[$board_name];