1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-28 17:31:00 +01:00

Merge unmerged live changes

This commit is contained in:
root 2014-04-16 15:14:02 +00:00
commit b30fff7ca7
7 changed files with 21 additions and 5 deletions

View File

@ -614,7 +614,7 @@ function listBoards() {
if ($config['cache']['enabled'] && ($boards = cache::get('all_boards')))
return $boards;
$query = query("SELECT * FROM ``boards`` LEFT JOIN ``board_create`` ON ``boards``.`uri` = ``board_create``.`uri` ORDER BY ``boards``.`uri`") or error(db_error());
$query = query("SELECT ``boards``.`uri` uri, ``boards``.`title` title, ``boards``.`subtitle` subtitle, ``board_create``.`time` time FROM ``boards`` LEFT JOIN ``board_create`` ON ``boards``.`uri` = ``board_create``.`uri` ORDER BY ``boards``.`uri`") or error(db_error());
$boards = $query->fetchAll();
if ($config['cache']['enabled'])

View File

@ -809,7 +809,6 @@ function mod_page_ip($ip) {
if ($config['mod']['dns_lookup'])
$args['hostname'] = rDNS($ip);
$boards = listBoards();
foreach ($boards as $board) {
openBoard($board['uri']);

View File

@ -3,6 +3,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
{% if config.meta_keywords %}<meta name="keywords" content="{{ config.meta_keywords }}">{% endif %}
{% if config.meta_description %}<meta name="description" content="{{ config.meta_description }}">{% endif %}
{% if config.default_stylesheet.1 != '' and not mod %}<link rel="stylesheet" type="text/css" id="stylesheet" href="{{ config.uri_stylesheets }}{{ config.default_stylesheet.1 }}">{% endif %}
{% if config.font_awesome %}<link rel="stylesheet" media="screen" href="{{ config.root }}{{ config.font_awesome_css }}">{% endif %}
{% if config.default_stylesheet.1 != '' %}<link rel="stylesheet" type="text/css" id="stylesheet" href="{{ config.uri_stylesheets }}{{ config.default_stylesheet.1 }}">{% endif %}

View File

@ -89,6 +89,7 @@
<legend>{{ bans|count }} {% trans bans_on_record %}</legend>
{% for ban in bans %}
{% if ban.board in mod.boards or mod.boards.0 == '*' %}
<form action="" method="post" style="text-align:center">
<input type="hidden" name="token" value="{{ security_token }}">
<table style="width:400px;margin-bottom:10px;border-bottom:1px solid #ddd;padding:5px">
@ -164,6 +165,7 @@
<input type="hidden" name="ban_id" value="{{ ban.id }}">
<input type="submit" name="unban" value="{% trans 'Remove ban' %}">
</form>
{% endif %}
{% endfor %}
</fieldset>
{% endif %}

View File

@ -23,7 +23,7 @@
<hr>
<footer>
<p class="unimportant" style="margin-top:20px;text-align:center;">Powered by <a href="http://tinyboard.org/">Tinyboard</a> {{ config.version }} | <a href="http://tinyboard.org/">Tinyboard</a> Copyright &copy; 2010-2013 Tinyboard Development Group</p>
<p class="unimportant" style="margin-top:20px;text-align:center;">The posts on this website are the property of their respective owners and are not the responsibility of the administrator of 8chan.co.</p>
{% for footer in config.footer %}<p class="unimportant" style="text-align:center;">{{ footer }}</p>{% endfor %}
</footer>
</body>
</html>

View File

@ -30,6 +30,13 @@
'default' => implode(' ', $__default_boards)
);
$theme['config'][] = Array(
'title' => 'Use all boards - &infin;chan',
'name' => 'all',
'type' => 'checkbox',
'default' => false
);
$theme['config'][] = Array(
'title' => 'Update on new posts',
'name' => 'update_on_posts',

View File

@ -11,14 +11,21 @@
// - post (a reply has been made)
// - post-thread (a thread has been made)
if ($settings['all']) {
$_boards = listBoards();
$boards = array();
foreach ($_boards as $i => $b)
$boards[] = $b['uri'];
} else {
$boards = explode(' ', $settings['boards']);
}
if ($action == 'all') {
foreach ($boards as $board) {
$b = new Catalog();
$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->build($settings, $board);
}