mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-19 17:28:41 +01:00
Catalog 8chan fixes
This commit is contained in:
parent
89fd0a67ad
commit
195c587dc0
@ -53,4 +53,7 @@ if (subtitle) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(document).ready(catalog);
|
|
||||||
|
if (!parseInt($('input[name="mod"]').val())) {
|
||||||
|
$(document).ready(catalog);
|
||||||
|
}
|
||||||
|
@ -2,11 +2,8 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
{% include "header.html" %}
|
||||||
<title>{{ settings.title }}</title>
|
|
||||||
<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}"/>
|
|
||||||
<link rel="stylesheet" media="screen" href="{{ config.root }}{{ settings.css }}"/>
|
<link rel="stylesheet" media="screen" href="{{ config.root }}{{ settings.css }}"/>
|
||||||
{% if config.url_favicon %}<link rel="shortcut icon" href="{{ config.url_favicon }}" />{% endif %}
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{ boardlist.top }}
|
{{ boardlist.top }}
|
||||||
@ -18,9 +15,11 @@
|
|||||||
<ul>
|
<ul>
|
||||||
{% for post in recent_posts %}
|
{% for post in recent_posts %}
|
||||||
<div class="thread">
|
<div class="thread">
|
||||||
<a href="{{post.link}}">
|
<div class="image">
|
||||||
<img src="{{post.file}}" class="{{post.board}}" title="{{post.bump|date('%b %d %H:%M')}}">
|
<a href="{{post.link}}">
|
||||||
</a>
|
<img src="{{post.file}}" class="{{post.board}}" title="{{post.bump|date('%b %d %H:%M')}}">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
<span class="replies">
|
<span class="replies">
|
||||||
<strong>{% trans %}1 reply{% plural post.reply_count %}{{ count }} replies{% endtrans %}</strong><br/>
|
<strong>{% trans %}1 reply{% plural post.reply_count %}{{ count }} replies{% endtrans %}</strong><br/>
|
||||||
{{ post.body }}
|
{{ post.body }}
|
||||||
|
@ -29,6 +29,13 @@
|
|||||||
'comment' => '(space seperated)',
|
'comment' => '(space seperated)',
|
||||||
'default' => implode(' ', $__default_boards)
|
'default' => implode(' ', $__default_boards)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$theme['config'][] = Array(
|
||||||
|
'title' => 'Use all boards - ∞chan',
|
||||||
|
'name' => 'all',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'default' => false
|
||||||
|
);
|
||||||
|
|
||||||
$theme['config'][] = Array(
|
$theme['config'][] = Array(
|
||||||
'title' => 'CSS file',
|
'title' => 'CSS file',
|
||||||
|
@ -11,7 +11,14 @@
|
|||||||
// - post (a reply has been made)
|
// - post (a reply has been made)
|
||||||
// - post-thread (a thread has been made)
|
// - post-thread (a thread has been made)
|
||||||
|
|
||||||
$boards = explode(' ', $settings['boards']);
|
if ($settings['all']) {
|
||||||
|
$_boards = listBoards();
|
||||||
|
$boards = array();
|
||||||
|
foreach ($_boards as $i => $b)
|
||||||
|
$boards[] = $b['uri'];
|
||||||
|
} else {
|
||||||
|
$boards = explode(' ', $settings['boards']);
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'all') {
|
if ($action == 'all') {
|
||||||
copy('templates/themes/catalog/catalog.css', $config['dir']['home'] . $settings['css']);
|
copy('templates/themes/catalog/catalog.css', $config['dir']['home'] . $settings['css']);
|
||||||
@ -20,7 +27,7 @@
|
|||||||
$b = new Catalog();
|
$b = new Catalog();
|
||||||
$b->build($settings, $board);
|
$b->build($settings, $board);
|
||||||
}
|
}
|
||||||
} elseif ($action == 'post-thread' || ($settings['update_on_posts'] && $action == 'post') || ($settings['update_on_posts'] && $action == 'post-delete') && in_array($board, $boards)) {
|
} elseif ($action == 'post-thread' || ($settings['update_on_posts'] && $action == 'post') || ($settings['update_on_posts'] && $action == 'post-delete') && (in_array($board, $boards) | $settings['all'])) {
|
||||||
$b = new Catalog();
|
$b = new Catalog();
|
||||||
$b->build($settings, $board);
|
$b->build($settings, $board);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user