aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-05-20 20:22:26 -0700
committerfriendica <info@friendica.com>2013-05-20 20:22:26 -0700
commitab10db7e34d1e7eaa5b2a633b3185b28fd16175c (patch)
tree30b257f484c61c2d8d6fbf9c4125f4622b47a71d
parent92ecc6fe43dc38e91c6a4dcb1529698039649387 (diff)
downloadvolse-hubzilla-ab10db7e34d1e7eaa5b2a633b3185b28fd16175c.tar.gz
volse-hubzilla-ab10db7e34d1e7eaa5b2a633b3185b28fd16175c.tar.bz2
volse-hubzilla-ab10db7e34d1e7eaa5b2a633b3185b28fd16175c.zip
privacy settings macros - the basics except for toggling "publish in directory" which is rather hard because it's a custom on/off button and not a normal input thingy.
-rw-r--r--mod/settings.php5
-rw-r--r--version.inc2
-rw-r--r--view/js/mod_settings.js78
-rwxr-xr-xview/tpl/settings.tpl9
4 files changed, 93 insertions, 1 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 54e96d118..2a3e76dd8 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -1011,6 +1011,11 @@ function settings_content(&$a) {
'$h_prv' => t('Security and Privacy Settings'),
+ '$lbl_pmacro' => t('Quick Privacy Settings:'),
+ '$pmacro3' => t('Very Public - extremely permissive'),
+ '$pmacro2' => t('Typical - default public, privacy when desired'),
+ '$pmacro1' => t('Private - default private, rarely open or public'),
+ '$pmacro0' => t('Blocked - default blocked to/from everybody'),
'$permiss_arr' => $permiss,
'$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')),
diff --git a/version.inc b/version.inc
index f91c07de4..3e34b8199 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-05-19.318
+2013-05-20.319
diff --git a/view/js/mod_settings.js b/view/js/mod_settings.js
index bcfa9b574..1eabdd81f 100644
--- a/view/js/mod_settings.js
+++ b/view/js/mod_settings.js
@@ -19,3 +19,81 @@ $(document).ready(function() {
});
+function channel_privacy_macro(n) {
+ if(n == 0) {
+ $('#id_view_stream option').eq(0).attr('selected','selected');
+ $('#id_view_profile option').eq(0).attr('selected','selected');
+ $('#id_view_photos option').eq(0).attr('selected','selected');
+ $('#id_view_contacts option').eq(0).attr('selected','selected');
+ $('#id_view_storage option').eq(0).attr('selected','selected');
+ $('#id_view_pages option').eq(0).attr('selected','selected');
+ $('#id_send_stream option').eq(0).attr('selected','selected');
+ $('#id_post_wall option').eq(0).attr('selected','selected');
+ $('#id_post_comments option').eq(0).attr('selected','selected');
+ $('#id_post_mail option').eq(0).attr('selected','selected');
+ $('#id_post_photos option').eq(0).attr('selected','selected');
+ $('#id_tag_deliver option').eq(0).attr('selected','selected');
+ $('#id_chat option').eq(0).attr('selected','selected');
+ $('#id_write_storage option').eq(0).attr('selected','selected');
+ $('#id_write_pages option').eq(0).attr('selected','selected');
+ $('#id_delegate option').eq(0).attr('selected','selected');
+ }
+ if(n == 1) {
+ $('#id_view_stream option').eq(1).attr('selected','selected');
+ $('#id_view_profile option').eq(1).attr('selected','selected');
+ $('#id_view_photos option').eq(1).attr('selected','selected');
+ $('#id_view_contacts option').eq(1).attr('selected','selected');
+ $('#id_view_storage option').eq(1).attr('selected','selected');
+ $('#id_view_pages option').eq(1).attr('selected','selected');
+ $('#id_send_stream option').eq(1).attr('selected','selected');
+ $('#id_post_wall option').eq(1).attr('selected','selected');
+ $('#id_post_comments option').eq(1).attr('selected','selected');
+ $('#id_post_mail option').eq(1).attr('selected','selected');
+ $('#id_post_photos option').eq(1).attr('selected','selected');
+ $('#id_tag_deliver option').eq(1).attr('selected','selected');
+ $('#id_chat option').eq(1).attr('selected','selected');
+ $('#id_write_storage option').eq(1).attr('selected','selected');
+ $('#id_write_pages option').eq(1).attr('selected','selected');
+ $('#id_delegate option').eq(0).attr('selected','selected');
+ }
+ if(n == 2) {
+ $('#id_view_stream option').eq(5).attr('selected','selected');
+ $('#id_view_profile option').eq(5).attr('selected','selected');
+ $('#id_view_photos option').eq(5).attr('selected','selected');
+ $('#id_view_contacts option').eq(5).attr('selected','selected');
+ $('#id_view_storage option').eq(5).attr('selected','selected');
+ $('#id_view_pages option').eq(5).attr('selected','selected');
+ $('#id_send_stream option').eq(1).attr('selected','selected');
+ $('#id_post_wall option').eq(1).attr('selected','selected');
+ $('#id_post_comments option').eq(1).attr('selected','selected');
+ $('#id_post_mail option').eq(1).attr('selected','selected');
+ $('#id_post_photos option').eq(1).attr('selected','selected');
+ $('#id_tag_deliver option').eq(1).attr('selected','selected');
+ $('#id_chat option').eq(1).attr('selected','selected');
+ $('#id_write_storage option').eq(1).attr('selected','selected');
+ $('#id_write_pages option').eq(1).attr('selected','selected');
+ $('#id_delegate option').eq(0).attr('selected','selected');
+ }
+ if(n == 3) {
+ $('#id_view_stream option').eq(5).attr('selected','selected');
+ $('#id_view_profile option').eq(5).attr('selected','selected');
+ $('#id_view_photos option').eq(5).attr('selected','selected');
+ $('#id_view_contacts option').eq(5).attr('selected','selected');
+ $('#id_view_storage option').eq(5).attr('selected','selected');
+ $('#id_view_pages option').eq(5).attr('selected','selected');
+ $('#id_send_stream option').eq(4).attr('selected','selected');
+ $('#id_post_wall option').eq(4).attr('selected','selected');
+ $('#id_post_comments option').eq(4).attr('selected','selected');
+ $('#id_post_mail option').eq(4).attr('selected','selected');
+ $('#id_post_photos option').eq(2).attr('selected','selected');
+ $('#id_tag_deliver option').eq(1).attr('selected','selected');
+ $('#id_chat option').eq(4).attr('selected','selected');
+ $('#id_write_storage option').eq(2).attr('selected','selected');
+ $('#id_write_pages option').eq(2).attr('selected','selected');
+ $('#id_delegate option').eq(0).attr('selected','selected');
+
+ }
+
+
+
+} \ No newline at end of file
diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl
index 251fa9be4..5a8544048 100755
--- a/view/tpl/settings.tpl
+++ b/view/tpl/settings.tpl
@@ -25,6 +25,15 @@
<h3 class="settings-heading">{{$h_prv}}</h3>
+<div id="settings-privacy-macros">{{$lbl_pmacro}}</div>
+<ul>
+<li><a href="#" onclick="channel_privacy_macro(3); return false" id="settings_pmacro3">{{$pmacro3}}</a></li>
+<li><a href="#" onclick="channel_privacy_macro(2); return false" id="settings_pmacro2">{{$pmacro2}}</a></li>
+<li><a href="#" onclick="channel_privacy_macro(1); return false" id="settings_pmacro1">{{$pmacro1}}</a></li>
+<li><a href="#" onclick="channel_privacy_macro(0); return false" id="settings_pmacro0">{{$pmacro0}}</a></li>
+</ul>
+
+
<div id="settings-permissions-wrapper">
{{foreach $permiss_arr as $permit}}