aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-10-24 21:11:05 -0700
committerFriendika <info@friendika.com>2011-10-24 21:11:05 -0700
commitefe3365431f4641c27f01e67d63832db261ffb82 (patch)
tree4f6a8f9045f51ab5e4b32f363a0533c3d8d13b8e
parentb20afbc9e49f00fa01c61e9705889247e7cb505e (diff)
downloadvolse-hubzilla-efe3365431f4641c27f01e67d63832db261ffb82.tar.gz
volse-hubzilla-efe3365431f4641c27f01e67d63832db261ffb82.tar.bz2
volse-hubzilla-efe3365431f4641c27f01e67d63832db261ffb82.zip
tag privacy settings
-rw-r--r--mod/settings.php19
-rw-r--r--view/settings.tpl11
2 files changed, 23 insertions, 7 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 8ed03dba5..522ae52de 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -170,6 +170,7 @@ function settings_post(&$a) {
$old_visibility = (((x($_POST,'visibility')) && (intval($_POST['visibility']) == 1)) ? 1 : 0);
$page_flags = (((x($_POST,'page-flags')) && (intval($_POST['page-flags']))) ? intval($_POST['page-flags']) : 0);
$blockwall = (((x($_POST,'blockwall')) && (intval($_POST['blockwall']) == 1)) ? 0: 1); // this setting is inverted!
+ $blocktags = (((x($_POST,'blocktags')) && (intval($_POST['blocktags']) == 1)) ? 0: 1); // this setting is inverted!
$hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
$hidewall = (($_POST['hidewall'] == 1) ? 1: 0);
@@ -244,7 +245,7 @@ function settings_post(&$a) {
$openidserver = '';
}
- $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `theme` = '%s', `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `blockwall` = %d, `hidewall` = %d WHERE `uid` = %d LIMIT 1",
+ $r = q("UPDATE `user` SET `username` = '%s', `email` = '%s', `openid` = '%s', `timezone` = '%s', `allow_cid` = '%s', `allow_gid` = '%s', `deny_cid` = '%s', `deny_gid` = '%s', `notify-flags` = %d, `page-flags` = %d, `default-location` = '%s', `allow_location` = %d, `theme` = '%s', `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `blockwall` = %d, `hidewall` = %d, `blocktags` = %d WHERE `uid` = %d LIMIT 1",
dbesc($username),
dbesc($email),
dbesc($openid),
@@ -263,6 +264,7 @@ function settings_post(&$a) {
dbesc($openidserver),
intval($blockwall),
intval($hidewall),
+ intval($blocktags),
intval(local_user())
);
if($r)
@@ -450,6 +452,7 @@ function settings_content(&$a) {
$maxreq = $a->user['maxreq'];
$expire = ((intval($a->user['expire'])) ? $a->user['expire'] : '');
$blockwall = $a->user['blockwall'];
+ $blocktags = $a->user['blocktags'];
if(! strlen($a->user['timezone']))
$timezone = date_default_timezone_get();
@@ -513,6 +516,17 @@ function settings_content(&$a) {
));
+ $blockwall = replace_macros($opt_tpl,array(
+ '$field' => array('blockwall', t('Allow friends to post to your profile page?'), ! $a->user['blockwall'], '', array(t('No'),t('Yes'))),
+
+ ));
+
+
+ $blocktags = replace_macros($opt_tpl,array(
+ '$field' => array('blocktags', t('Allow friends to tag your posts?'), ! $a->user['blocktags'], '', array(t('No'),t('Yes'))),
+
+ ));
+
$invisible = (((! $profile['publish']) && (! $profile['net-publish']))
? true : false);
@@ -588,7 +602,8 @@ function settings_content(&$a) {
'$visibility' => $profile['net-publish'],
'$aclselect' => populate_acl($a->user,$celeb),
- '$blockwall'=> array('blockwall', t('Allow friends to post to your profile page:'), !$blockwall, ''),
+ '$blockwall'=> $blockwall, // array('blockwall', t('Allow friends to post to your profile page:'), !$blockwall, ''),
+ '$blocktags'=> $blocktags, // array('blocktags', t('Allow friends to tag your posts:'), !$blocktags, ''),
'$expire' => array('expire', t("Automatically expire posts after days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')),
'$profile_in_dir' => $profile_in_dir,
diff --git a/view/settings.tpl b/view/settings.tpl
index 3bbfc6ffd..52f989f99 100644
--- a/view/settings.tpl
+++ b/view/settings.tpl
@@ -51,6 +51,12 @@ $hide_friends
$hide_wall
+$blockwall
+
+$blocktags
+
+{{inc field_input.tpl with $field=$expire }}{{endinc}}
+
<div id="settings-default-perms" class="settings-default-perms" >
<div id="settings-default-perms-menu" class="fakelink" onClick="openClose('settings-default-perms-select');" >$permissions $permdesc</div>
<div id="settings-default-perms-menu-end"></div>
@@ -63,11 +69,6 @@ $hide_wall
</div>
<div id="settings-default-perms-end"></div>
-{{inc field_checkbox.tpl with $field=$blockwall }}{{endinc}}
-
-{{inc field_input.tpl with $field=$expire }}{{endinc}}
-
-
<div class="settings-submit-wrapper" >
<input type="submit" name="submit" class="settings-submit" value="Submit" />