Browse Source

Merge branch 'master' of https://github.com/savetheinternet/Tinyboard

Conflicts:
	inc/config.php
	inc/display.php
	inc/mod/pages.php
	js/catalog-link.js
	post.php
	templates/banned.html
pull/40/head
czaks 11 years ago
parent
commit
fa9bf536c3
  1. 10
      inc/config.php
  2. 3
      inc/display.php
  3. 3
      inc/mod/pages.php
  4. 2
      js/catalog-link.js
  5. 33
      post.php
  6. 4
      stylesheets/ferus.css
  7. 4
      templates/banned.html

10
inc/config.php

@ -624,7 +624,7 @@
// Oh, and add jQuery in additional_javascript.
$config['attention_bar'] = false;
// Allow html in board subtitle. This is useful for placing icons and links.
// Allow unfiltered HTML in board subtitle. This is useful for placing icons and links.
$config['allow_subtitle_html'] = false;
/*
@ -718,6 +718,9 @@
// array('status' => 'http://status.example.org/')
// );
// Whether or not to put brackets around the whole board list
$config['boardlist_wrap_bracket'] = false;
// Board categories. Only used in the "Categories" theme.
// $config['categories'] = array(
// 'Group Name' => array('a', 'b', 'c'),
@ -744,8 +747,9 @@
// 'bottom' => '',
// );
// Optional message to display on ban pages. For example, you could include a link to email an admin or join an IRC channel to be unbanned.
$config['ban_page_message'] = '';
// Optional HTML to append to "You are banned" pages. For example, you could include instructions and/or
// a link to an email address or IRC chat room to appeal the ban.
$config['ban_page_extra'] = '';
/*
* ====================

3
inc/display.php

@ -46,6 +46,9 @@ function createBoardlist($mod=false) {
if (!isset($config['boards'])) return array('top'=>'','bottom'=>'');
$body = doBoardListPart($config['boards'], $mod?'?/':$config['root']);
if ($config['boardlist_wrap_bracket'] && !preg_match('/\] $/', $body))
$body = '[' . $body . ']';
$body = trim($body);

3
inc/mod/pages.php

@ -1148,9 +1148,8 @@ function mod_move($originBoard, $postID) {
if ($post['has_file']) {
// copy image
$clone($file_src, sprintf($config['board_path'], $board['uri']) . $config['dir']['img'] . $post['file']);
if ($post['thumb'] != 'spoiler') { //trying to move/copy the spoiler thumb raises an error
if (!in_array($post['thumb'], array('spoiler', 'deleted')))
$clone($file_thumb, sprintf($config['board_path'], $board['uri']) . $config['dir']['thumb'] . $post['thumb']);
}
}
// go back to the original board to fetch replies

2
js/catalog-link.js

@ -3,7 +3,7 @@
function catalog() {
var board = $("input[name='board']");
if (board.length>0) {
if (board) {
var catalog_url = 'catalog.html';
var pages = document.getElementsByClassName('pages')[0];
var bottom = document.getElementsByClassName('boardlist bottom')[0]

33
post.php

@ -117,26 +117,19 @@ if (isset($_POST['delete'])) {
$query->execute() or error(db_error($query));
$thread = $query->fetchColumn();
// If they are not reporting a reply, report the OP.
if (!$thread) {
$thread = $id;
}
if ($thread) {
if ($config['syslog'])
_syslog(LOG_INFO, 'Reported post: ' .
'/' . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $thread ? $thread : $id) . ($thread ? '#' . $id : '') .
' for "' . $reason . '"'
);
$query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)");
$query->bindValue(':time', time(), PDO::PARAM_INT);
$query->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);
$query->bindValue(':board', $board['uri'], PDO::PARAM_INT);
$query->bindValue(':post', $id, PDO::PARAM_INT);
$query->bindValue(':reason', $reason, PDO::PARAM_STR);
$query->execute() or error(db_error($query));
}
if ($config['syslog'])
_syslog(LOG_INFO, 'Reported post: ' .
'/' . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $thread ? $thread : $id) . ($thread ? '#' . $id : '') .
' for "' . $reason . '"'
);
$query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)");
$query->bindValue(':time', time(), PDO::PARAM_INT);
$query->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);
$query->bindValue(':board', $board['uri'], PDO::PARAM_INT);
$query->bindValue(':post', $id, PDO::PARAM_INT);
$query->bindValue(':reason', $reason, PDO::PARAM_STR);
$query->execute() or error(db_error($query));
}
$is_mod = isset($_POST['mod']) && $_POST['mod'];

4
stylesheets/ferus.css

@ -36,7 +36,7 @@ a.post_no:hover {
}
div.post.reply {
background: #0E0E0E;
border: #414141 2px solid;
border: #414141 2px solid !important;
}
.de-pview {
background: rgba(14, 14, 14, 0.84) !important;
@ -147,4 +147,4 @@ div.ban h2 {
table.modlog tr th {
background: #00FF00;
color: #AAAAAA;
}
}

4
templates/banned.html

@ -77,8 +77,8 @@
</p>
<p>{% trans %}Your IP address is{% endtrans %} <strong>{{ ban.ip }}</strong>.</p>
{% if config.ban_page_message %}
<p>{{ config.ban_page_message }}</p>
{% if config.ban_page_extra %}
<p>{{ config.ban_page_extra }}</p>
{% endif %}
</div>
{% endfilter %}

Loading…
Cancel
Save