'
+settingsMenu.innerHTML = prefix
+ + '
'
+ '
'
+ '
'
+ '
'
- + '
';
+ + suffix;
function refreshSettings() {
var settingsItems = settingsMenu.getElementsByTagName("input");
@@ -74,7 +84,7 @@ for (var i = 0; i < settingsItems.length; i++) {
setupControl(settingsItems[i]);
}
-if (settingsMenu.addEventListener) {
+if (settingsMenu.addEventListener && !window.Options) {
settingsMenu.addEventListener("mouseover", function(e) {
refreshSettings();
settingsMenu.getElementsByTagName("a")[0].style.fontWeight = "bold";
diff --git a/post.php b/post.php
index dac28ea5..88189572 100644
--- a/post.php
+++ b/post.php
@@ -571,7 +571,9 @@ if (isset($_POST['delete'])) {
error($config['error']['nomove']);
}
- if ($output = shell_exec_error("cat $filenames | md5sum")) {
+ $md5cmd = $config['bsd_md5'] ? 'md5 -r' : 'md5sum';
+
+ if ($output = shell_exec_error("cat $filenames | $md5cmd")) {
$explodedvar = explode(' ', $output);
$hash = $explodedvar[0];
$post['filehash'] = $hash;
@@ -930,4 +932,3 @@ if (isset($_POST['delete'])) {
error($config['error']['nopost']);
}
}
-
diff --git a/stylesheets/style.css b/stylesheets/style.css
index 4e1c5f86..ffd26e7d 100644
--- a/stylesheets/style.css
+++ b/stylesheets/style.css
@@ -539,6 +539,17 @@ pre {
margin-left: -20px;
}
+.theme-catalog div.grid-size-vsmall img {
+ max-width: 100%;
+ max-height: 100px;
+}
+
+.theme-catalog div.grid-size-vsmall {
+ width: 100px;
+ max-width: 100px;
+ max-height: 150px;
+}
+
.theme-catalog div.grid-size-small {
width: 200px;
max-width: 200px;
@@ -628,12 +639,6 @@ pre {
vertical-align: middle;
}
-/* Containerchan */
- div.post video.post-image {
- padding: 0;
- margin: 5px 25px 5px 5px;
- }
-
/* live-index.js */
.new-posts {
opacity: 0.6;
@@ -642,3 +647,76 @@ pre {
.new-threads {
text-align: center;
}
+
+/* options.js */
+#options_handler {
+ position: fixed;
+ top: 0px; left: 0px; right: 0px; bottom: 0px;
+ width: 100%; height: 100%;
+ text-align: center;
+ z-index: 9900;
+}
+#options_background {
+ background: black;
+ opacity: 0.5;
+ position: absolute;
+ top: 0px; left: 0px; right: 0px; bottom: 0px;
+ width: 100%; height: 100%;
+ z-index: -1;
+}
+#options_div {
+ background-color: #d6daf0;
+ border: 1px solid black;
+ display: inline-block;
+ position: relative;
+ margin-top: 20px;
+ width: 600px;
+ height: 300px;
+}
+#options_close {
+ top: 0px; right: 0px;
+ position: absolute;
+ margin-right: 3px;
+ font-size: 20px; z-index: 100;
+}
+#options_tablist {
+ padding: 0px 5px;
+ left: 0px;
+ width: 70px;
+ top: 0px;
+ bottom: 0px;
+ height: 100%;
+ border-right: 1px solid black;
+}
+.options_tab_icon {
+ padding: 5px;
+ color: black;
+}
+.options_tab_icon.active {
+ color: red;
+}
+.options_tab_icon i {
+ font-size: 20px;
+}
+.options_tab_icon div {
+ font-size: 11px;
+}
+.options_tab {
+ padding: 10px;
+ position: absolute;
+ top: 0px; bottom: 0px;
+ left: 81px; right: 0px;
+ text-align: left;
+ font-size: 12px;
+}
+.options_tab h2 {
+ text-align: center;
+ margin-bottom: 5px;
+}
+
+.mobile-style #options_div {
+ display: block;
+ width: 100%;
+ height: 100%;
+ margin-top: 0px;
+}
diff --git a/templates/themes/catalog/catalog.html b/templates/themes/catalog/catalog.html
index 6dd683cf..db94e2a4 100644
--- a/templates/themes/catalog/catalog.html
+++ b/templates/themes/catalog/catalog.html
@@ -33,6 +33,7 @@
{% trans 'Image size' %}:
diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php
index a9ad8ec1..9bb501c3 100644
--- a/templates/themes/catalog/theme.php
+++ b/templates/themes/catalog/theme.php
@@ -55,10 +55,29 @@
if (isset($post['files'])) {
$files = json_decode($post['files']);
- if ($files[0]->file == 'deleted') continue;
+
+ if ($files[0]->file == 'deleted') {
+ if (count($files) > 1) {
+ foreach ($files as $file) {
+ if (($file == $files[0]) || ($file->file == 'deleted')) continue;
+ $post['file'] = $config['uri_thumb'] . $file->thumb;
+ }
+
+ if (empty($post['file'])) $post['file'] = $config['image_deleted'];
+ }
+ else {
+ $post['file'] = $config['image_deleted'];
+ }
+ }
+ else if($files[0]->thumb == 'spoiler') {
+ $post['file'] = '/' . $config['spoiler_image'];
+ }
+ else {
$post['file'] = $config['uri_thumb'] . $files[0]->thumb;
}
+ }
+ if (empty($post['image_count'])) $post['image_count'] = 0;
$recent_posts[] = $post;
}
diff --git a/templates/themes/recent/theme.php b/templates/themes/recent/theme.php
index 842ab9ac..a25ff6a9 100644
--- a/templates/themes/recent/theme.php
+++ b/templates/themes/recent/theme.php
@@ -54,14 +54,27 @@
while ($post = $query->fetch(PDO::FETCH_ASSOC)) {
openBoard($post['board']);
+
if (isset($post['files']))
$files = json_decode($post['files']);
if ($files[0]->file == 'deleted') continue;
// board settings won't be available in the template file, so generate links now
- $post['link'] = $config['root'] . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], ($post['thread'] ? $post['thread'] : $post['id'])) . '#' . $post['id'];
- if ($files) $post['src'] = $config['uri_thumb'] . $files[0]->thumb;
+ $post['link'] = $config['root'] . $board['dir'] . $config['dir']['res']
+ . sprintf($config['file_page'], ($post['thread'] ? $post['thread'] : $post['id'])) . '#' . $post['id'];
+
+ if ($files) {
+ if ($files[0]->thumb == 'spoiler') {
+ $tn_size = @getimagesize($config['spoiler_image']);
+ $post['src'] = $config['spoiler_image'];
+ $post['thumbwidth'] = $tn_size[0];
+ $post['thumbheight'] = $tn_size[1];
+ }
+ else {
+ $post['src'] = $config['uri_thumb'] . $files[0]->thumb;
+ }
+ }
$recent_images[] = $post;
}