From 2e7f4c1870dcd8ce05329b80d97be1269ff2a1a7 Mon Sep 17 00:00:00 2001 From: Andrew Manning Date: Sun, 14 Aug 2016 06:41:12 -0400 Subject: Added a disable comments setting to the "Additional features" settings with a corresponding post editor toggle button --- include/conversation.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/conversation.php') diff --git a/include/conversation.php b/include/conversation.php index b53498d20..de917c44e 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1121,6 +1121,10 @@ function status_editor($a, $x, $popup = false) { $feature_voting = feature_enabled($x['profile_uid'], 'consensus_tools'); if(x($x, 'hide_voting')) $feature_voting = false; + + $feature_nocomment = feature_enabled($x['profile_uid'], 'disable_comments'); + if(x($x, 'disable_comments')) + $feature_nocomment = false; $feature_expire = ((feature_enabled($x['profile_uid'], 'content_expire') && (! $webpage)) ? true : false); if(x($x, 'hide_expire')) @@ -1239,6 +1243,9 @@ function status_editor($a, $x, $popup = false) { '$voting' => t('Toggle voting'), '$feature_voting' => $feature_voting, '$consensus' => 0, + '$nocommenttitle' => t('Disable comments'), + '$feature_nocomment' => $feature_nocomment, + '$nocomment' => 0, '$clearloc' => $clearloc, '$title' => ((x($x, 'title')) ? htmlspecialchars($x['title'], ENT_COMPAT,'UTF-8') : ''), '$placeholdertitle' => ((x($x, 'placeholdertitle')) ? $x['placeholdertitle'] : t('Title (optional)')), -- cgit v1.2.3