aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-08-14 06:41:12 -0400
committerAndrew Manning <tamanning@zoho.com>2016-08-14 06:41:12 -0400
commit2e7f4c1870dcd8ce05329b80d97be1269ff2a1a7 (patch)
treed7f9c79a5fb8c162db30ccc651596dee0e293a52 /include
parent82d61f194a62a5b078825bf6eb341dbe5d83dfab (diff)
downloadvolse-hubzilla-2e7f4c1870dcd8ce05329b80d97be1269ff2a1a7.tar.gz
volse-hubzilla-2e7f4c1870dcd8ce05329b80d97be1269ff2a1a7.tar.bz2
volse-hubzilla-2e7f4c1870dcd8ce05329b80d97be1269ff2a1a7.zip
Added a disable comments setting to the "Additional features" settings with a corresponding post editor toggle button
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php7
-rw-r--r--include/features.php1
2 files changed, 8 insertions, 0 deletions
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)')),
diff --git a/include/features.php b/include/features.php
index 041c028c6..f9001d7be 100644
--- a/include/features.php
+++ b/include/features.php
@@ -74,6 +74,7 @@ function get_features($filtered = true) {
array('channel_sources', t('Channel Sources'), t('Automatically import channel content from other channels or feeds'),false,get_config('feature_lock','channel_sources')),
array('content_encrypt', t('Even More Encryption'), t('Allow optional encryption of content end-to-end with a shared secret key'),false,get_config('feature_lock','content_encrypt')),
array('consensus_tools', t('Enable Voting Tools'), t('Provide a class of post which others can vote on'),false,get_config('feature_lock','consensus_tools')),
+ array('disable_comments', t('Enable Disabling Comments'), t('Provide the option to disable comments for a post'),false,get_config('feature_lock','disable_comments')),
array('delayed_posting', t('Delayed Posting'), t('Allow posts to be published at a later date'),false,get_config('feature_lock','delayed_posting')),
array('suppress_duplicates', t('Suppress Duplicate Posts/Comments'), t('Prevent posts with identical content to be published with less than two minutes in between submissions.'),true,get_config('feature_lock','suppress_duplicates')),