From df90677f900a1a6ed496628545a8e109700e168b Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 3 Mar 2015 17:43:13 -0800 Subject: add the tag hijacking preference to Diaspora settings --- mod/settings.php | 8 +++++++- view/css/mod_settings.css | 4 ++-- view/tpl/settings_addons.tpl | 9 ++++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/mod/settings.php b/mod/settings.php index 3205797bb..71ca38d91 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -117,6 +117,7 @@ function settings_post(&$a) { if($_POST['dspr-submit']) { set_pconfig(local_channel(),'system','diaspora_public_comments',intval($_POST['dspr_pubcomment'])); + set_pconfig(local_channel(),'system','prevent_tag_hijacking',intval($_POST['dspr_hijack'])); info( t('Diaspora Policy Settings updated.') . EOL); } @@ -666,6 +667,9 @@ function settings_content(&$a) { $pubcomments = get_pconfig(local_channel(),'system','diaspora_public_comments'); if($pubcomments === false) $pubcomments = 1; + $hijacking = get_pconfig(local_channel(),'system','prevent_tag_hijacking'); + + } call_hooks('feature_settings', $settings_addons); @@ -673,11 +677,13 @@ function settings_content(&$a) { $tpl = get_markup_template("settings_addons.tpl"); $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_featured"), - '$title' => t('Feature Settings'), + '$title' => t('Feature/Addon Settings'), '$diaspora_enabled' => $diaspora_enabled, '$pubcomments' => $pubcomments, '$dsprtitle' => t('Diaspora Policy Settings'), '$dsprhelp' => t('Allow any Diaspora member to comment on your public posts.'), + '$dsprhijack' => t('Prevent hashtags from being redirected to other sites'), + '$hijacking' => $hijacking, '$dsprsubmit' => t('Submit Diaspora Policy Settings'), '$settings_addons' => $settings_addons )); diff --git a/view/css/mod_settings.css b/view/css/mod_settings.css index 6af091c8f..2dcd7d2d8 100644 --- a/view/css/mod_settings.css +++ b/view/css/mod_settings.css @@ -1,10 +1,10 @@ -#dspr-pubcomment-label { +#dspr-pubcomment-label, #dspr-hijack-label { float: left; width: 350px; margin-bottom: 25px; } -#dspr-pubcomment-checkbox { +#dspr-pubcomment-checkbox, #dspr-hijack-checkbox { float: left; } diff --git a/view/tpl/settings_addons.tpl b/view/tpl/settings_addons.tpl index a18f57658..a41f4802b 100755 --- a/view/tpl/settings_addons.tpl +++ b/view/tpl/settings_addons.tpl @@ -11,7 +11,14 @@
-
+
+ + +
+ + + +
{{/if}} {{$settings_addons}} -- cgit v1.2.3