summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@status.net>2010-11-12 12:24:55 -0800
committerBrion Vibber <brion@status.net>2010-11-12 12:24:55 -0800
commitcb124fe831a3c77dfca89590ebb8d691685bb573 (patch)
tree75cb515b25eac1aeef6588580303f8762388cb70
parentcda59dc1771c2911491c9271662c32f56103347f (diff)
Add a quick config setting to disable/enable display of thumbnails in regular notice lists (attachments/show_thumbs) - disabling gives the same display as before this feature was added (but changes to oembed handling are still there, and the lightbox popup is gone)
-rw-r--r--lib/default.php1
-rw-r--r--lib/noticelist.php6
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/default.php b/lib/default.php
index 87f4e45c0..ece01f2a8 100644
--- a/lib/default.php
+++ b/lib/default.php
@@ -250,6 +250,7 @@ $default =
'monthly_quota' => 15000000,
'uploads' => true,
'filecommand' => '/usr/bin/file',
+ 'show_thumbs' => true, // show thumbnails in notice lists for uploaded images, and photos and videos linked remotely that provide oEmbed info
'thumb_width' => 100,
'thumb_height' => 75,
),
diff --git a/lib/noticelist.php b/lib/noticelist.php
index d2ac7ed84..c6f964662 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -385,8 +385,10 @@ class NoticeListItem extends Widget
}
function showNoticeAttachments() {
- $al = new InlineAttachmentList($this->notice, $this->out);
- $al->show();
+ if (common_config('attachments', 'show_thumbs')) {
+ $al = new InlineAttachmentList($this->notice, $this->out);
+ $al->show();
+ }
}
/**