From 632d0a76d0afc5bd7a8cc90e6625a74fe432065a Mon Sep 17 00:00:00 2001 From: 8chan Date: Wed, 31 Dec 2014 22:37:19 -0800 Subject: [PATCH] Display placeholder if no file in catalog/theme.php; czaks: fix the code a bit --- inc/config.php | 2 +- templates/themes/catalog/theme.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/config.php b/inc/config.php index ad659343..21f7b5cc 100644 --- a/inc/config.php +++ b/inc/config.php @@ -766,7 +766,7 @@ // Location of thumbnail to use for spoiler images. $config['spoiler_image'] = 'static/spoiler.png'; // Location of thumbnail to use for deleted images. - // $config['image_deleted'] = 'static/deleted.png'; + $config['image_deleted'] = 'static/deleted.png'; // When a thumbnailed image is going to be the same (in dimension), just copy the entire file and use // that as a thumbnail instead of resizing/redrawing. diff --git a/templates/themes/catalog/theme.php b/templates/themes/catalog/theme.php index 34b28e48..c7a8ee95 100644 --- a/templates/themes/catalog/theme.php +++ b/templates/themes/catalog/theme.php @@ -88,6 +88,8 @@ $post['file'] = $config['uri_thumb'] . $files[0]->thumb; } } + } else { + $post['file'] = $config['root'] . $config['image_deleted']; } if (empty($post['image_count'])) $post['image_count'] = 0;