From 2ae2bb4191b41effcfa137cc4ef99aa1ded021bd Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 16 Jan 2013 21:34:36 -0800 Subject: provide other ways to export the basic info --- mod/settings.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index db204bc50..d75fe3043 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -63,11 +63,18 @@ function settings_init(&$a) { ), array( - 'label' => t('Export personal data'), - 'url' => $a->get_baseurl(true) . '/uexport', + 'label' => t('Export channel'), + 'url' => $a->get_baseurl(true) . '/uexport/basic', 'selected' => '' ), +// array( +// 'label' => t('Export account'), +// 'url' => $a->get_baseurl(true) . '/uexport/complete', +// 'selected' => '' +// ), + + ); $tabtpl = get_markup_template("generic_links_widget.tpl"); -- cgit v1.2.3 From 6e6b268e2523d95624361d29a8bd80b1133aa627 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 23 Jan 2013 21:15:40 -0800 Subject: auto permissions (such as for forums or whatever) - untested but might just work --- mod/settings.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index d75fe3043..c1380e159 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -14,16 +14,29 @@ function get_theme_config_file($theme){ return null; } -function settings_init(&$a) { +function settings_aside(&$a) { // default is channel settings in the absence of other arguments if(argc() == 1) { + // We are setting these values - don't use the argc(), argv() functions here $a->argc = 2; $a->argv[] = 'channel'; } + $abook_self_id = 0; + + // Retrieve the 'self' address book entry for use in the auto-permissions link + if(local_user()) { + $abk = q("select abook_id from abook where abook_channel = %d and ( abook_flags & %d ) limit 1", + intval(local_user()), + intval(ABOOK_FLAG_SELF) + ); + if($abk) + $abook_self_id = $abk[0]['abook_id']; + } + $tabs = array( array( @@ -74,6 +87,12 @@ function settings_init(&$a) { // 'selected' => '' // ), + array( + 'label' => t('Automatic Permissions (Advanced)'), + 'url' => $a->get_baseurl(true) . '/connections/' . $abook_self_id, + 'selected' => '' + ), + ); -- cgit v1.2.3 From f591526ebc9ab3a98f1e58c8e1873e76e72b0a1f Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 29 Jan 2013 18:01:33 -0800 Subject: missing permission settings --- mod/settings.php | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index c1380e159..533800784 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -115,10 +115,10 @@ function settings_post(&$a) { return; - if(count($a->user) && x($a->user,'uid') && $a->user['uid'] != local_user()) { - notice( t('Permission denied.') . EOL); - return; - } +// if(count($a->user) && x($a->user,'uid') && $a->user['uid'] != local_user()) { +// notice( t('Permission denied.') . EOL); +// return; +// } $old_page_flags = $a->user['page-flags']; @@ -366,9 +366,10 @@ function settings_post(&$a) { $arr['channel_w_photos'] = (($_POST['post_photos']) ? $_POST['post_photos'] : 0); $arr['channel_w_chat'] = (($_POST['chat']) ? $_POST['chat'] : 0); $arr['channel_a_delegate'] = (($_POST['delegate']) ? $_POST['delegate'] : 0); - $arr['channel_r_storage'] = (($_POST['view_storage']) ? $_POST['view_storage'] : 0); - $arr['channel_w_storage'] = (($_POST['write_storage']) ? $_POST['write_storage'] : 0); - + $arr['channel_r_storage'] = (($_POST['view_storage']) ? $_POST['view_storage'] : 0); + $arr['channel_w_storage'] = (($_POST['write_storage']) ? $_POST['write_storage'] : 0); + $arr['channel_r_pages'] = (($_POST['view_pages']) ? $_POST['view_pages'] : 0); + $arr['channel_w_pages'] = (($_POST['write_pages']) ? $_POST['write_pages'] : 0); $defperms = 0; if(x($_POST['def_view_stream'])) @@ -399,6 +400,10 @@ function settings_post(&$a) { $defperms += $_POST['def_view_storage']; if(x($_POST['def_write_storage'])) $defperms += $_POST['def_write_storage']; + if(x($_POST['def_view_pages'])) + $defperms += $_POST['def_view_pages']; + if(x($_POST['def_write_pages'])) + $defperms += $_POST['def_write_pages']; $notify = 0; @@ -497,7 +502,7 @@ function settings_post(&$a) { ); */ - $r = q("update channel set channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d where channel_id = %d limit 1", + $r = q("update channel set channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", intval($arr['channel_r_stream']), intval($arr['channel_r_profile']), intval($arr['channel_r_photos']), @@ -510,6 +515,10 @@ function settings_post(&$a) { intval($arr['channel_w_photos']), intval($arr['channel_w_chat']), intval($arr['channel_a_delegate']), + intval($arr['channel_r_storage']), + intval($arr['channel_w_storage']), + intval($arr['channel_r_pages']), + intval($arr['channel_w_pages']), intval(local_user()) ); -- cgit v1.2.3 From 808de7b447c5b5b06a1b314713b7473b3ea0a02f Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 31 Jan 2013 17:02:47 -0800 Subject: expire setting --- mod/settings.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 533800784..7d8a3c604 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -502,7 +502,8 @@ function settings_post(&$a) { ); */ - $r = q("update channel set channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", + $r = q("update channel set channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", + intval($expire), intval($arr['channel_r_stream']), intval($arr['channel_r_profile']), intval($arr['channel_r_photos']), @@ -902,7 +903,7 @@ function settings_content(&$a) { $defloc = $channel['channel_location']; $maxreq = $channel['channel_max_friend_req']; - $expire = get_pconfig(local_user(),'expire','content_expire_days'); + $expire = $channel['channel_expire_days']; $blockwall = $a->user['blockwall']; $blocktags = $a->user['blocktags']; -- cgit v1.2.3 From 24565182a446924e7000fd2110e4cee9a5dcde50 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 31 Jan 2013 19:28:00 -0800 Subject: make addon (featured) settings page work --- mod/settings.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 7d8a3c604..a1561e79c 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -60,7 +60,7 @@ function settings_aside(&$a) { array( 'label' => t('Feature settings'), 'url' => $a->get_baseurl(true).'/settings/featured', - 'selected' => ((argv(1) === 'addon') ? 'active' : ''), + 'selected' => ((argv(1) === 'featured') ? 'active' : ''), ), array( @@ -665,20 +665,20 @@ function settings_content(&$a) { return $o; } - if((argc() > 1) && (argv(1) === 'addon')) { + if((argc() > 1) && (argv(1) === 'featured')) { $settings_addons = ""; $r = q("SELECT * FROM `hook` WHERE `hook` = 'plugin_settings' "); if(! count($r)) - $settings_addons = t('No Plugin settings configured'); + $settings_addons = t('No feature settings configured'); call_hooks('plugin_settings', $settings_addons); $tpl = get_markup_template("settings_addons.tpl"); $o .= replace_macros($tpl, array( - '$form_security_token' => get_form_security_token("settings_addon"), - '$title' => t('Plugin Settings'), + '$form_security_token' => get_form_security_token("settings_featured"), + '$title' => t('Feature Settings'), '$settings_addons' => $settings_addons )); return $o; -- cgit v1.2.3 From 154ed4151a3f0394e6bdefb8650b5908ec916f62 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 31 Jan 2013 20:39:14 -0800 Subject: plugin_settings are now feature_settings --- mod/settings.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index a1561e79c..f5501dd95 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -181,11 +181,7 @@ function settings_post(&$a) { if((argc() > 1) && (argv(1) == 'featured')) { check_form_security_token_redirectOnErr('/settings/featured', 'settings_featured'); - - - - - call_hooks('featured_settings_post', $_POST); + call_hooks('feature_settings_post', $_POST); return; } @@ -672,7 +668,7 @@ function settings_content(&$a) { if(! count($r)) $settings_addons = t('No feature settings configured'); - call_hooks('plugin_settings', $settings_addons); + call_hooks('feature_settings', $settings_addons); $tpl = get_markup_template("settings_addons.tpl"); -- cgit v1.2.3 From 09ece497f7211bf65aa026894fec22dd1605a20c Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 2 Feb 2013 16:10:27 -0800 Subject: more work on settings - move template utils to utils and get rid of mods --- mod/settings.php | 74 ++++++++------------------------------------------------ 1 file changed, 10 insertions(+), 64 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index f5501dd95..f1add2c5b 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -449,7 +449,7 @@ function settings_post(&$a) { set_pconfig(local_user(),'expire','starred', $expire_starred); set_pconfig(local_user(),'expire','photos', $expire_photos); set_pconfig(local_user(),'expire','network_only', $expire_network_only); - + set_pconfig(local_user(),'system','use_browser_location',$allow_location); set_pconfig(local_user(),'system','suggestme', $suggestme); set_pconfig(local_user(),'system','post_newfriend', $post_newfriend); set_pconfig(local_user(),'system','post_joingroup', $post_joingroup); @@ -498,7 +498,10 @@ function settings_post(&$a) { ); */ - $r = q("update channel set channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", + $r = q("update channel set channel_timezone = '%s', channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", + dbesc($timezone), + intval($unkmail), + intval($maxreq), intval($expire), intval($arr['channel_r_stream']), intval($arr['channel_r_profile']), @@ -939,76 +942,22 @@ function settings_content(&$a) { - $pageset_tpl = get_markup_template('pagetypes.tpl'); - $pagetype = replace_macros($pageset_tpl,array( - '$page_normal' => array('page-flags', t('Normal Account Page'), PAGE_NORMAL, - t('This account is a normal personal profile'), - ($a->user['page-flags'] == PAGE_NORMAL)), - - '$page_soapbox' => array('page-flags', t('Soapbox Page'), PAGE_SOAPBOX, - t('Automatically approve all connection/friend requests as read-only fans'), - ($a->user['page-flags'] == PAGE_SOAPBOX)), - - '$page_community' => array('page-flags', t('Community Forum/Celebrity Account'), PAGE_COMMUNITY, - t('Automatically approve all connection/friend requests as read-write fans'), - ($a->user['page-flags'] == PAGE_COMMUNITY)), - - '$page_freelove' => array('page-flags', t('Automatic Friend Page'), PAGE_FREELOVE, - t('Automatically approve all connection/friend requests as friends'), - ($a->user['page-flags'] == PAGE_FREELOVE)), - - '$page_prvgroup' => array('page-flags', t('Private Forum [Experimental]'), PAGE_PRVGROUP, - t('Private forum - approved members only'), - ($a->user['page-flags'] == PAGE_PRVGROUP)), - - - )); - - $opt_tpl = get_markup_template("field_yesno.tpl"); if(get_config('system','publish_all')) { $profile_in_dir = ''; } else { $profile_in_dir = replace_macros($opt_tpl,array( - '$field' => array('profile_in_directory', t('Publish your default profile in your local site directory?'), $profile['publish'], '', array(t('No'),t('Yes'))), + '$field' => array('profile_in_directory', t('Publish your default profile in the network directory'), $profile['publish'], '', array(t('No'),t('Yes'))), )); } - $profile_in_net_dir = ''; - - - $hide_friends = replace_macros($opt_tpl,array( - '$field' => array('hide_friends', t('Hide your contact/friend list from viewers of your default profile?'), $profile['hide_friends'], '', array(t('No'),t('Yes'))), - )); - - $hide_wall = replace_macros($opt_tpl,array( - '$field' => array('hidewall', t('Hide your profile details from unknown viewers?'), $a->user['hidewall'], '', array(t('No'),t('Yes'))), - - )); - - $blockwall = replace_macros($opt_tpl,array( - '$field' => array('blockwall', t('Allow friends to post to your profile page?'), (intval($a->user['blockwall']) ? '0' : '1'), '', array(t('No'),t('Yes'))), - - )); - - - $blocktags = replace_macros($opt_tpl,array( - '$field' => array('blocktags', t('Allow friends to tag your posts?'), (intval($a->user['blocktags']) ? '0' : '1'), '', array(t('No'),t('Yes'))), - - )); - - $suggestme = replace_macros($opt_tpl,array( '$field' => array('suggestme', t('Allow us to suggest you as a potential friend to new members?'), $suggestme, '', array(t('No'),t('Yes'))), )); - $unkmail = replace_macros($opt_tpl,array( - '$field' => array('unkmail', t('Permit unknown people to send you private mail?'), $unkmail, '', array(t('No'),t('Yes'))), - - )); $invisible = ((! $profile['publish']) ? true : false); @@ -1033,7 +982,7 @@ function settings_content(&$a) { 'advanced' => t('Advanced expiration settings'), 'label' => t('Advanced Expiration'), 'items' => array('expire_items', t("Expire posts:"), $expire_items, '', array(t('No'),t('Yes'))), - 'notes' => array('expire_notes', t("Expire personal notes:"), $expire_notes, '', array(t('No'),t('Yes'))), + 'starred' => array('expire_starred', t("Expire starred posts:"), $expire_starred, '', array(t('No'),t('Yes'))), 'photos' => array('expire_photos', t("Expire photos:"), $expire_photos, '', array(t('No'),t('Yes'))), 'network_only' => array('expire_network_only', t("Only expire posts by others:"), $expire_network_only, '', array(t('No'),t('Yes'))), @@ -1061,21 +1010,19 @@ function settings_content(&$a) { '$email' => array('email', t('Email Address:'), $email, ''), '$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''), '$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''), - '$allowloc' => array('allow_location', t('Use Browser Location:'), ($a->user['allow_location'] == 1), ''), + '$allowloc' => array('allow_location', t('Use Browser Location:'), (intval(get_pconfig(local_user(),'system','use_browser_location')) == 1), ''), '$h_prv' => t('Security and Privacy Settings'), '$permiss_arr' => $permiss, - '$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), $maxreq ,t("\x28to prevent spam abuse\x29")), + '$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')), '$permissions' => t('Default Post Permissions'), '$permdesc' => t("\x28click to open/close\x29"), '$visibility' => $profile['net-publish'], '$aclselect' => populate_acl($a->user,$celeb), '$suggestme' => $suggestme, - '$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, ''), '$group_select' => $group_select, @@ -1083,11 +1030,10 @@ function settings_content(&$a) { '$expire' => $expire_arr, '$profile_in_dir' => $profile_in_dir, - '$profile_in_net_dir' => $profile_in_net_dir, '$hide_friends' => $hide_friends, '$hide_wall' => $hide_wall, '$unkmail' => $unkmail, - '$cntunkmail' => array('cntunkmail', t('Maximum private messages per day from unknown people:'), $cntunkmail ,t("\x28to prevent spam abuse\x29")), + '$cntunkmail' => array('cntunkmail', t('Maximum private messages per day from unknown people:'), intval($channel['channel_max_anon_mail']) ,t("Useful to reduce spamming")), '$h_not' => t('Notification Settings'), -- cgit v1.2.3 From bf4b964aeb93eaefa7e11cd69918dc8ac7393f0d Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 7 Feb 2013 18:26:38 -0800 Subject: update channel or default profile name change in all the appropriate places, but still need to tell people. --- mod/settings.php | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index f1add2c5b..ea914cbac 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -421,20 +421,22 @@ function settings_post(&$a) { $notify += intval($_POST['notify8']); + $channel = $a->get_channel(); + $err = ''; $name_change = false; - if($username != $a->user['username']) { + if($username != $channel['channel_name']) { $name_change = true; - if(strlen($username) > 40) + if(mb_strlen($username) > 40) $err .= t(' Please use a shorter name.'); - if(strlen($username) < 3) + if(mb_strlen($username) < 3) $err .= t(' Name too short.'); } - if($timezone != $a->user['timezone']) { + if($timezone != $channel['channel_timezone']) { if(strlen($timezone)) date_default_timezone_set($timezone); } @@ -498,7 +500,8 @@ function settings_post(&$a) { ); */ - $r = q("update channel set channel_timezone = '%s', channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", + $r = q("update channel set channel_name = '%s', channel_timezone = '%s', channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", + dbesc($username), dbesc($timezone), intval($unkmail), intval($maxreq), @@ -534,24 +537,21 @@ function settings_post(&$a) { intval(local_user()) ); - -// if($name_change) { -// q("UPDATE `contact` SET `name` = '%s', `name_date` = '%s' WHERE `uid` = %d AND `self` = 1 LIMIT 1", -// dbesc($username), -// dbesc(datetime_convert()), -// intval(local_user()) -// ); -// } - -// if(($old_visibility != $net_publish) || ($page_flags != $old_page_flags)) { - // Update global directory in background - $url = $_SESSION['my_url']; -// if($url && strlen(get_config('system','directory_submit_url'))) - + if($name_change) { + $r = q("update xchan set xchan_name = '%s', xchan_name_date = '%s' where xchan_hash = '%s' limit 1", + dbesc($username), + dbesc(datetime_convert()), + dbesc($channel['channel_hash']) + ); + $r = q("update profile set name = '%s' where uid = %d and is_default = 1", + dbesc($username), + intval($channel['channel_id']) + ); + // we really need to send out notifications to all our friends + } proc_run('php','include/directory.php',local_user()); -// } //$_SESSION['theme'] = $theme; if($email_changed && $a->config['system']['register_policy'] == REGISTER_VERIFY) { -- cgit v1.2.3 From 82ed07baa14690611835b2e9becfb3330396c581 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 7 Feb 2013 18:53:51 -0800 Subject: provide a global way of enforcing name policy restrictions, but only enforce empty names or length > storage size. Allow plugins to set other policies. In particular, you can't have an empty channel name now, but one char is legal ;-) --- mod/settings.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index ea914cbac..d2dd57b18 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -429,10 +429,12 @@ function settings_post(&$a) { if($username != $channel['channel_name']) { $name_change = true; - if(mb_strlen($username) > 40) - $err .= t(' Please use a shorter name.'); - if(mb_strlen($username) < 3) - $err .= t(' Name too short.'); + require_once('include/identity.php'); + $err = validate_channelname($username); + if($err) { + notice($err); + return; + } } -- cgit v1.2.3 From 27c9288addb1630551633bdc4e631d4d01b5b93e Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 10 Feb 2013 17:10:58 -0800 Subject: reduce itemspage for better interactive performance --- mod/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index d2dd57b18..7bfc90f55 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -209,7 +209,7 @@ function settings_post(&$a) { if($browser_update < 10000) $browser_update = 10000; - $itemspage = ((x($_POST,'itemspage')) ? intval($_POST['itemspage']) : 40); + $itemspage = ((x($_POST,'itemspage')) ? intval($_POST['itemspage']) : 20); if($itemspage > 100) $itemspage = 100; @@ -813,7 +813,7 @@ function settings_content(&$a) { $browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds $itemspage = intval(get_pconfig(local_user(), 'system','itemspage')); - $itemspage = (($itemspage > 0 && $itemspage < 101) ? $itemspage : 40); // default if not set: 40 items + $itemspage = (($itemspage > 0 && $itemspage < 101) ? $itemspage : 20); // default if not set: 20 items $nosmile = get_pconfig(local_user(),'system','no_smilies'); $nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0 -- cgit v1.2.3 From 3ee75a795a471573de307d7be70bfb61bf1d63fa Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 12 Feb 2013 02:02:35 -0800 Subject: Whinging whining stupid fucks. --- mod/settings.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 7bfc90f55..da6cf709c 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -335,8 +335,6 @@ function settings_post(&$a) { $allow_location = (((x($_POST,'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1: 0); $publish = (((x($_POST,'profile_in_directory')) && (intval($_POST['profile_in_directory']) == 1)) ? 1: 0); - $net_publish = (((x($_POST,'profile_in_netdirectory')) && (intval($_POST['profile_in_netdirectory']) == 1)) ? 1: 0); - $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! @@ -959,11 +957,6 @@ function settings_content(&$a) { )); - - - $invisible = ((! $profile['publish']) ? true : false); - - $subdir = ((strlen($a->get_path())) ? '
' . t('or') . ' ' . $a->get_baseurl(true) . '/channel/' . $nickname : ''); $tpl_addr = get_markup_template("settings_nick_set.tpl"); @@ -1022,7 +1015,6 @@ function settings_content(&$a) { '$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')), '$permissions' => t('Default Post Permissions'), '$permdesc' => t("\x28click to open/close\x29"), - '$visibility' => $profile['net-publish'], '$aclselect' => populate_acl($a->user,$celeb), '$suggestme' => $suggestme, -- cgit v1.2.3 From 166596939b3af98b5f86688a16d3e4add2c28209 Mon Sep 17 00:00:00 2001 From: zottel Date: Thu, 21 Mar 2013 09:02:10 +0100 Subject: write notify settings to channel table when saving settings --- mod/settings.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index da6cf709c..54e96d118 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -500,9 +500,10 @@ function settings_post(&$a) { ); */ - $r = q("update channel set channel_name = '%s', channel_timezone = '%s', channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", + $r = q("update channel set channel_name = '%s', channel_timezone = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", dbesc($username), dbesc($timezone), + intval($notify), intval($unkmail), intval($maxreq), intval($expire), -- cgit v1.2.3 From ab10db7e34d1e7eaa5b2a633b3185b28fd16175c Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 20 May 2013 20:22:26 -0700 Subject: 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. --- mod/settings.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mod/settings.php') 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')), -- cgit v1.2.3 From 0daaf35ff8cc863ad95d68302fb14dbcea740374 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 May 2013 17:16:16 -0700 Subject: fix location setting stuff --- mod/settings.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 2a3e76dd8..5ee6b5d15 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -500,9 +500,10 @@ function settings_post(&$a) { ); */ - $r = q("update channel set channel_name = '%s', channel_timezone = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", + $r = q("update channel set channel_name = '%s', channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", dbesc($username), dbesc($timezone), + dbesc($defloc), intval($notify), intval($unkmail), intval($maxreq), -- cgit v1.2.3 From 9f15600c7c426c4f557809ed2036802381e5bf12 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Jun 2013 01:27:50 -0700 Subject: community tagging - it's not much closer to working but a really good developer can now possibly hack their way through it instead of "there's only one person on the planet that can ever make this work". --- mod/settings.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 5ee6b5d15..f417586af 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -456,6 +456,7 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','post_newfriend', $post_newfriend); set_pconfig(local_user(),'system','post_joingroup', $post_joingroup); set_pconfig(local_user(),'system','post_profilechange', $post_profilechange); + set_pconfig(local_user(),'system','blocktags',$blocktags); /* if($page_flags == PAGE_PRVGROUP) { @@ -907,7 +908,6 @@ function settings_content(&$a) { $expire = $channel['channel_expire_days']; $blockwall = $a->user['blockwall']; - $blocktags = $a->user['blocktags']; $unkmail = $a->user['unkmail']; $cntunkmail = $a->user['cntunkmail']; @@ -939,6 +939,8 @@ function settings_content(&$a) { $post_profilechange = get_pconfig(local_user(), 'system','post_profilechange'); $post_profilechange = (($post_profilechange===false)? '0': $post_profilechange); // default if not set: 0 + $blocktags = get_pconfig(local_user(),'system','blocktags'); + $blocktags = (($blocktags===false) ? '0' : $blocktags); $timezone = date_default_timezone_get(); -- cgit v1.2.3 From 5f84e3940d6a6ba8732104bf376921c061808f18 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 17 Jun 2013 20:16:50 -0700 Subject: much more efficient config functions. This will save potentially hundreds of DB lookups - still need to update the xconfig but want to give the others a good workout as it has been one of those days. --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index f417586af..a6d45e9b8 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -719,7 +719,6 @@ function settings_content(&$a) { if((argc() > 1) && (argv(1) === 'features')) { - $arr = array(); $features = get_features(); @@ -739,6 +738,7 @@ function settings_content(&$a) { '$submit' => t('Submit'), '$field_yesno' => 'field_yesno.tpl', )); + return $o; } -- cgit v1.2.3 From 57c7f725f67ac868b54d0dbff2d4fb0122af3954 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 25 Jun 2013 18:15:17 -0700 Subject: begin code to sync channel changes across all channel clones. --- mod/settings.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index a6d45e9b8..788514eca 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1,5 +1,7 @@ user) && x($a->user,'uid') && $a->user['uid'] != local_user()) { -// notice( t('Permission denied.') . EOL); -// return; -// } - - $old_page_flags = $a->user['page-flags']; - if((argc() > 1) && (argv(1) === 'oauth') && x($_POST,'remove')){ check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth'); @@ -292,7 +287,7 @@ function settings_post(&$a) { $errs[] = t('Not valid email.'); $adm = trim(get_config('system','admin_email')); if(($adm) && (strcasecmp($email,$adm) == 0)) { - $errs[] = t('Protected email. Cannot change to that email.'); + $errs[] = t('Protected email address. Cannot change to that email.'); $email = $a->user['email']; } if(! $errs) { -- cgit v1.2.3 From b9466941e77eea806539ea56b6b625d354968f4c Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 26 Jun 2013 17:31:02 -0700 Subject: more work on channel sync --- mod/settings.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 788514eca..e830d7070 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -177,6 +177,7 @@ function settings_post(&$a) { check_form_security_token_redirectOnErr('/settings/featured', 'settings_featured'); call_hooks('feature_settings_post', $_POST); + build_sync_packet(); return; } @@ -189,6 +190,7 @@ function settings_post(&$a) { set_pconfig(local_user(),'feature',substr($k,8),((intval($v)) ? 1 : 0)); } } + build_sync_packet(); return; } @@ -232,6 +234,7 @@ function settings_post(&$a) { ); call_hooks('display_settings_post', $_POST); + build_sync_packet(); goaway($a->get_baseurl(true) . '/settings/display' ); return; // NOTREACHED } @@ -545,11 +548,12 @@ function settings_post(&$a) { dbesc($username), intval($channel['channel_id']) ); - // we really need to send out notifications to all our friends } proc_run('php','include/directory.php',local_user()); + build_sync_packet(); + //$_SESSION['theme'] = $theme; if($email_changed && $a->config['system']['register_policy'] == REGISTER_VERIFY) { -- cgit v1.2.3 From 6e880cfd4954c4a044358a823fac4dc9d5467a6b Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 7 Jul 2013 17:22:40 -0700 Subject: use current channel photo for favicon where applicable - might be browser dependent but seems to work on FF --- mod/settings.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index e830d7070..164a2a8a0 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -580,6 +580,11 @@ function settings_content(&$a) { return; } + + $channel = $a->get_channel(); + if($channel) + head_set_icon($channel['xchan_photo_s']); + // if(x($_SESSION,'submanage') && intval($_SESSION['submanage'])) { // notice( t('Permission denied.') . EOL ); // return; -- cgit v1.2.3 From 4c30cddbfc105c0ea60f30594b760633e654cb0c Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 16 Jul 2013 22:48:05 -0700 Subject: provide a controlling user for theme settings, not necessarily local_user() - can't test on my test site so moving into production and I'll debug it there. --- mod/settings.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 164a2a8a0..1878fceb6 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -3,6 +3,7 @@ require_once('include/settings.php'); + function get_theme_config_file($theme){ $base_theme = get_app()->theme_info['extends']; @@ -16,6 +17,11 @@ function get_theme_config_file($theme){ return null; } +function settings_init(&$a) { + $a->profile_uid = local_user(); +} + + function settings_aside(&$a) { -- cgit v1.2.3 From 3d95fcb7cd37c6bff03f76e20b0d2eeb785616da Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 25 Jul 2013 16:00:04 -0700 Subject: more work on clone sync --- mod/settings.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 1878fceb6..00ad94d20 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1,7 +1,4 @@ - Date: Thu, 25 Jul 2013 17:52:55 -0700 Subject: include zot --- mod/settings.php | 1 + 1 file changed, 1 insertion(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 00ad94d20..6ab036437 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1,5 +1,6 @@ Date: Mon, 29 Jul 2013 01:18:42 -0700 Subject: browser location issue but this may not fix it --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 6ab036437..943a3cc13 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1017,7 +1017,7 @@ function settings_content(&$a) { '$email' => array('email', t('Email Address:'), $email, ''), '$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''), '$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''), - '$allowloc' => array('allow_location', t('Use Browser Location:'), (intval(get_pconfig(local_user(),'system','use_browser_location')) == 1), ''), + '$allowloc' => array('allow_location', t('Use Browser Location:'), intval(get_pconfig(local_user(),'system','use_browser_location')), ''), '$h_prv' => t('Security and Privacy Settings'), -- cgit v1.2.3 From ca5abc02473b88a04479b4d95c06a29885f53f02 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 29 Jul 2013 05:37:05 -0700 Subject: load_pconfig had some issues when given a family --- mod/settings.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 943a3cc13..0cca41810 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -336,6 +336,7 @@ function settings_post(&$a) { $expire_network_only = ((x($_POST,'expire_network_only'))? intval($_POST['expire_network_only']) : 0); $allow_location = (((x($_POST,'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1: 0); + $publish = (((x($_POST,'profile_in_directory')) && (intval($_POST['profile_in_directory']) == 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! @@ -460,6 +461,7 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','post_profilechange', $post_profilechange); set_pconfig(local_user(),'system','blocktags',$blocktags); + /* if($page_flags == PAGE_PRVGROUP) { $hidewall = 1; @@ -1017,7 +1019,7 @@ function settings_content(&$a) { '$email' => array('email', t('Email Address:'), $email, ''), '$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''), '$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''), - '$allowloc' => array('allow_location', t('Use Browser Location:'), intval(get_pconfig(local_user(),'system','use_browser_location')), ''), + '$allowloc' => array('allow_location', t('Use Browser Location:'), ((get_pconfig(local_user(),'system','use_browser_location')) ? 1 : ''), ''), '$h_prv' => t('Security and Privacy Settings'), -- cgit v1.2.3 From f287ff596cf8562cdb9290fc0a5b31b45d9100c1 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 14 Aug 2013 05:26:17 -0700 Subject: fix expire so it actually should expire stuff; and mostly the correct stuff - though it DOESN'T currently send out notifications to connections --- mod/settings.php | 1 - 1 file changed, 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 0cca41810..c39286ebc 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -330,7 +330,6 @@ function settings_post(&$a) { $expire_items = ((x($_POST,'expire_items')) ? intval($_POST['expire_items']) : 0); - $expire_notes = ((x($_POST,'expire_notes')) ? intval($_POST['expire_notes']) : 0); $expire_starred = ((x($_POST,'expire_starred')) ? intval($_POST['expire_starred']) : 0); $expire_photos = ((x($_POST,'expire_photos'))? intval($_POST['expire_photos']) : 0); $expire_network_only = ((x($_POST,'expire_network_only'))? intval($_POST['expire_network_only']) : 0); -- cgit v1.2.3 From a8dd7280b33008d5100b6d8020640673abf5a78a Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 15 Aug 2013 22:52:19 -0700 Subject: get rid of more variables with dashes in the names - use underscore *except* in CSS. These were probably already here, but if you see any - please keep them out of PHP and MySQL where they sometimes get interpreted as a subtraction operation and are a bugger to find. --- mod/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index c39286ebc..50bb13ea2 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -783,7 +783,7 @@ function settings_content(&$a) { $default_theme = get_config('system','theme'); if(! $default_theme) $default_theme = 'default'; - $default_mobile_theme = get_config('system','mobile-theme'); + $default_mobile_theme = get_config('system','mobile_theme'); if(! $mobile_default_theme) $mobile_default_theme = 'none'; @@ -817,7 +817,7 @@ function settings_content(&$a) { } } $theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']); - $mobile_theme_selected = (!x($_SESSION,'mobile-theme')? $default_mobile_theme : $_SESSION['mobile-theme']); + $mobile_theme_selected = (!x($_SESSION,'mobile_theme')? $default_mobile_theme : $_SESSION['mobile_theme']); $browser_update = intval(get_pconfig(local_user(), 'system','update_interval')); $browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds -- cgit v1.2.3 From 20f3d097080fde4315b25523fe29b129cdd7034c Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 18 Aug 2013 20:20:03 -0700 Subject: some sane permission defaults. --- mod/settings.php | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 50bb13ea2..36befead1 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -349,22 +349,23 @@ function settings_post(&$a) { $post_joingroup = (($_POST['post_joingroup'] == 1) ? 1: 0); $post_profilechange = (($_POST['post_profilechange'] == 1) ? 1: 0); + $arr = array(); - $arr['channel_r_stream'] = (($_POST['view_stream']) ? $_POST['view_stream'] : 0); - $arr['channel_r_profile'] = (($_POST['view_profile']) ? $_POST['view_profile'] : 0); - $arr['channel_r_photos'] = (($_POST['view_photos']) ? $_POST['view_photos'] : 0); - $arr['channel_r_abook'] = (($_POST['view_contacts']) ? $_POST['view_contacts'] : 0); - $arr['channel_w_stream'] = (($_POST['send_stream']) ? $_POST['send_stream'] : 0); - $arr['channel_w_wall'] = (($_POST['post_wall']) ? $_POST['post_wall'] : 0); - $arr['channel_w_tagwall'] = (($_POST['tag_deliver']) ? $_POST['tag_deliver'] : 0); - $arr['channel_w_comment'] = (($_POST['post_comments']) ? $_POST['post_comments'] : 0); - $arr['channel_w_mail'] = (($_POST['post_mail']) ? $_POST['post_mail'] : 0); - $arr['channel_w_photos'] = (($_POST['post_photos']) ? $_POST['post_photos'] : 0); - $arr['channel_w_chat'] = (($_POST['chat']) ? $_POST['chat'] : 0); - $arr['channel_a_delegate'] = (($_POST['delegate']) ? $_POST['delegate'] : 0); - $arr['channel_r_storage'] = (($_POST['view_storage']) ? $_POST['view_storage'] : 0); - $arr['channel_w_storage'] = (($_POST['write_storage']) ? $_POST['write_storage'] : 0); - $arr['channel_r_pages'] = (($_POST['view_pages']) ? $_POST['view_pages'] : 0); + $arr['channel_r_stream'] = (($_POST['view_stream']) ? $_POST['view_stream'] : 0); + $arr['channel_r_profile'] = (($_POST['view_profile']) ? $_POST['view_profile'] : 0); + $arr['channel_r_photos'] = (($_POST['view_photos']) ? $_POST['view_photos'] : 0); + $arr['channel_r_abook'] = (($_POST['view_contacts']) ? $_POST['view_contacts'] : 0); + $arr['channel_w_stream'] = (($_POST['send_stream']) ? $_POST['send_stream'] : 0); + $arr['channel_w_wall'] = (($_POST['post_wall']) ? $_POST['post_wall'] : 0); + $arr['channel_w_tagwall'] = (($_POST['tag_deliver']) ? $_POST['tag_deliver'] : 0); + $arr['channel_w_comment'] = (($_POST['post_comments']) ? $_POST['post_comments'] : 0); + $arr['channel_w_mail'] = (($_POST['post_mail']) ? $_POST['post_mail'] : 0); + $arr['channel_w_photos'] = (($_POST['post_photos']) ? $_POST['post_photos'] : 0); + $arr['channel_w_chat'] = (($_POST['chat']) ? $_POST['chat'] : 0); + $arr['channel_a_delegate'] = (($_POST['delegate']) ? $_POST['delegate'] : 0); + $arr['channel_r_storage'] = (($_POST['view_storage']) ? $_POST['view_storage'] : 0); + $arr['channel_w_storage'] = (($_POST['write_storage']) ? $_POST['write_storage'] : 0); + $arr['channel_r_pages'] = (($_POST['view_pages']) ? $_POST['view_pages'] : 0); $arr['channel_w_pages'] = (($_POST['write_pages']) ? $_POST['write_pages'] : 0); $defperms = 0; -- cgit v1.2.3 From af72f40759418275abae575176f43d27388bfcd6 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 22 Aug 2013 01:00:54 -0700 Subject: make premium channels a feature --- mod/settings.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 36befead1..2a3a64581 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -31,6 +31,8 @@ function settings_aside(&$a) { $a->argv[] = 'channel'; } + $channel = $a->get_channel(); + $abook_self_id = 0; // Retrieve the 'self' address book entry for use in the auto-permissions link @@ -101,6 +103,17 @@ function settings_aside(&$a) { ); + + if(feature_enabled(local_user(),'premium_channel')) { + $tabs[] = array( + 'label' => t('Premium Channel Settings'), + 'url' => $a->get_baseurl(true) . '/connect/' . $channel['channel_address'], + 'selected' => '' + ); + + } + + $tabtpl = get_markup_template("generic_links_widget.tpl"); $a->page['aside'] = replace_macros($tabtpl, array( -- cgit v1.2.3 From 70c0beb857d879b8c2c74ac0922f82b37717c989 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 29 Aug 2013 16:46:22 -0700 Subject: block attempts to set the baseurl to an ip address if it was previously a dns name --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 2a3a64581..6b21066b1 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -997,7 +997,7 @@ function settings_content(&$a) { $stpl = get_markup_template('settings.tpl'); - $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false); + $celeb = false; $expire_arr = array( 'days' => array('expire', t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')), -- cgit v1.2.3 From df8035344fed17950cd129cf42bb1aab210dc334 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 20 Sep 2013 21:36:10 -0700 Subject: clean up app management a bit --- mod/settings.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 6b21066b1..fea9c9f72 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -620,11 +620,11 @@ function settings_content(&$a) { '$title' => t('Add application'), '$submit' => t('Submit'), '$cancel' => t('Cancel'), - '$name' => array('name', t('Name'), '', ''), - '$key' => array('key', t('Consumer Key'), '', ''), - '$secret' => array('secret', t('Consumer Secret'), '', ''), - '$redirect' => array('redirect', t('Redirect'), '', ''), - '$icon' => array('icon', t('Icon url'), '', ''), + '$name' => array('name', t('Name'), '', t('Name of application')), + '$key' => array('key', t('Consumer Key'), random_string(16), t('Automatically generated - change if desired')), + '$secret' => array('secret', t('Consumer Secret'), random_string(16), t('Automatically generated - change if desired')), + '$redirect' => array('redirect', t('Redirect'), '', t('Redirect URI - leave blank unless your application specifically requires this')), + '$icon' => array('icon', t('Icon url'), '', t('Optional')), )); return $o; } -- cgit v1.2.3 From cdfb5f9dc740734fbd95363a026ab44ae1dd9d94 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 22 Sep 2013 20:38:24 -0700 Subject: adult channel setting --- mod/settings.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index fea9c9f72..9c60c0ec2 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -361,7 +361,13 @@ function settings_post(&$a) { $post_newfriend = (($_POST['post_newfriend'] == 1) ? 1: 0); $post_joingroup = (($_POST['post_joingroup'] == 1) ? 1: 0); $post_profilechange = (($_POST['post_profilechange'] == 1) ? 1: 0); + $adult = (($_POST['adult'] == 1) ? 1 : 0); + $channel = $a->get_channel(); + $pageflags = $channel['channel_pageflags']; + $existing_adult = (($pageflags & PAGE_ADULT) ? 1 : 0); + if($adult != $existing_adult) + $pageflags = ($pageflags ^ PAGE_ADULT); $arr = array(); $arr['channel_r_stream'] = (($_POST['view_stream']) ? $_POST['view_stream'] : 0); @@ -518,8 +524,9 @@ function settings_post(&$a) { ); */ - $r = q("update channel set channel_name = '%s', channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", + $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", dbesc($username), + intval($pageflags), dbesc($timezone), dbesc($defloc), intval($notify), @@ -929,6 +936,7 @@ function settings_content(&$a) { $maxreq = $channel['channel_max_friend_req']; $expire = $channel['channel_expire_days']; + $adult_flag = intval($channel['channel_pageflags'] & PAGE_ADULT); $blockwall = $a->user['blockwall']; $unkmail = $a->user['unkmail']; @@ -1034,6 +1042,7 @@ function settings_content(&$a) { '$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''), '$allowloc' => array('allow_location', t('Use Browser Location:'), ((get_pconfig(local_user(),'system','use_browser_location')) ? 1 : ''), ''), + '$adult' => array('adult', t('Adult Content'), $adult_flag, t('This channel publishes adult content.')), '$h_prv' => t('Security and Privacy Settings'), -- cgit v1.2.3 From 15ce90e69c9c50610116ea9a0abfe86ae7e92174 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 23 Sep 2013 18:27:23 -0700 Subject: oauth settings - clarify text --- mod/settings.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 9c60c0ec2..cc8fd2564 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -154,10 +154,17 @@ function settings_post(&$a) { $secret = ((x($_POST,'secret')) ? $_POST['secret'] : ''); $redirect = ((x($_POST,'redirect')) ? $_POST['redirect'] : ''); $icon = ((x($_POST,'icon')) ? $_POST['icon'] : ''); - if ($name=="" || $key=="" || $secret==""){ - notice(t("Missing some important data!")); - - } else { + $ok = true; + if($name == '') { + $ok = false; + notice( t('Name is required') . EOL); + } + if($key == '' || $secret == '') { + $ok = false; + notice( t('Key and Secret are required') . EOL); + } + + if($ok) { if ($_POST['submit']==t("Update")){ $r = q("UPDATE clients SET client_id='%s', @@ -628,8 +635,8 @@ function settings_content(&$a) { '$submit' => t('Submit'), '$cancel' => t('Cancel'), '$name' => array('name', t('Name'), '', t('Name of application')), - '$key' => array('key', t('Consumer Key'), random_string(16), t('Automatically generated - change if desired')), - '$secret' => array('secret', t('Consumer Secret'), random_string(16), t('Automatically generated - change if desired')), + '$key' => array('key', t('Consumer Key'), random_string(16), t('Automatically generated - change if desired. Max length 20')), + '$secret' => array('secret', t('Consumer Secret'), random_string(16), t('Automatically generated - change if desired. Max length 20')), '$redirect' => array('redirect', t('Redirect'), '', t('Redirect URI - leave blank unless your application specifically requires this')), '$icon' => array('icon', t('Icon url'), '', t('Optional')), )); -- cgit v1.2.3 From dffce63662c54db7ebb61786d39db6a900d1381f Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 30 Sep 2013 21:49:26 -0700 Subject: implement republish permission for use in sourced channels --- mod/settings.php | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index cc8fd2564..ba2323873 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -377,23 +377,24 @@ function settings_post(&$a) { $pageflags = ($pageflags ^ PAGE_ADULT); $arr = array(); - $arr['channel_r_stream'] = (($_POST['view_stream']) ? $_POST['view_stream'] : 0); - $arr['channel_r_profile'] = (($_POST['view_profile']) ? $_POST['view_profile'] : 0); - $arr['channel_r_photos'] = (($_POST['view_photos']) ? $_POST['view_photos'] : 0); - $arr['channel_r_abook'] = (($_POST['view_contacts']) ? $_POST['view_contacts'] : 0); - $arr['channel_w_stream'] = (($_POST['send_stream']) ? $_POST['send_stream'] : 0); - $arr['channel_w_wall'] = (($_POST['post_wall']) ? $_POST['post_wall'] : 0); - $arr['channel_w_tagwall'] = (($_POST['tag_deliver']) ? $_POST['tag_deliver'] : 0); - $arr['channel_w_comment'] = (($_POST['post_comments']) ? $_POST['post_comments'] : 0); - $arr['channel_w_mail'] = (($_POST['post_mail']) ? $_POST['post_mail'] : 0); - $arr['channel_w_photos'] = (($_POST['post_photos']) ? $_POST['post_photos'] : 0); - $arr['channel_w_chat'] = (($_POST['chat']) ? $_POST['chat'] : 0); - $arr['channel_a_delegate'] = (($_POST['delegate']) ? $_POST['delegate'] : 0); - $arr['channel_r_storage'] = (($_POST['view_storage']) ? $_POST['view_storage'] : 0); - $arr['channel_w_storage'] = (($_POST['write_storage']) ? $_POST['write_storage'] : 0); - $arr['channel_r_pages'] = (($_POST['view_pages']) ? $_POST['view_pages'] : 0); - $arr['channel_w_pages'] = (($_POST['write_pages']) ? $_POST['write_pages'] : 0); - + $arr['channel_r_stream'] = (($_POST['view_stream']) ? $_POST['view_stream'] : 0); + $arr['channel_r_profile'] = (($_POST['view_profile']) ? $_POST['view_profile'] : 0); + $arr['channel_r_photos'] = (($_POST['view_photos']) ? $_POST['view_photos'] : 0); + $arr['channel_r_abook'] = (($_POST['view_contacts']) ? $_POST['view_contacts'] : 0); + $arr['channel_w_stream'] = (($_POST['send_stream']) ? $_POST['send_stream'] : 0); + $arr['channel_w_wall'] = (($_POST['post_wall']) ? $_POST['post_wall'] : 0); + $arr['channel_w_tagwall'] = (($_POST['tag_deliver']) ? $_POST['tag_deliver'] : 0); + $arr['channel_w_comment'] = (($_POST['post_comments']) ? $_POST['post_comments'] : 0); + $arr['channel_w_mail'] = (($_POST['post_mail']) ? $_POST['post_mail'] : 0); + $arr['channel_w_photos'] = (($_POST['post_photos']) ? $_POST['post_photos'] : 0); + $arr['channel_w_chat'] = (($_POST['chat']) ? $_POST['chat'] : 0); + $arr['channel_a_delegate'] = (($_POST['delegate']) ? $_POST['delegate'] : 0); + $arr['channel_r_storage'] = (($_POST['view_storage']) ? $_POST['view_storage'] : 0); + $arr['channel_w_storage'] = (($_POST['write_storage']) ? $_POST['write_storage'] : 0); + $arr['channel_r_pages'] = (($_POST['view_pages']) ? $_POST['view_pages'] : 0); + $arr['channel_w_pages'] = (($_POST['write_pages']) ? $_POST['write_pages'] : 0); + $arr['channel_a_republish'] = (($_POST['republish']) ? $_POST['republish'] : 0); + $defperms = 0; if(x($_POST['def_view_stream'])) $defperms += $_POST['def_view_stream']; @@ -427,6 +428,8 @@ function settings_post(&$a) { $defperms += $_POST['def_view_pages']; if(x($_POST['def_write_pages'])) $defperms += $_POST['def_write_pages']; + if(x($_POST['def_republish'])) + $defperms += $_POST['def_republish']; $notify = 0; @@ -531,7 +534,7 @@ function settings_post(&$a) { ); */ - $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d where channel_id = %d limit 1", + $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d where channel_id = %d limit 1", dbesc($username), intval($pageflags), dbesc($timezone), @@ -556,6 +559,7 @@ function settings_post(&$a) { intval($arr['channel_w_storage']), intval($arr['channel_r_pages']), intval($arr['channel_w_pages']), + intval($arr['channel_a_republish']), intval(local_user()) ); -- cgit v1.2.3 From a6c542289acd349baea37dff0fe7f37427964b15 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 30 Sep 2013 22:01:11 -0700 Subject: add link to channel source management in settings if channel_sources feature is enabled --- mod/settings.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index ba2323873..5f1106be5 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -113,6 +113,15 @@ function settings_aside(&$a) { } + if(feature_enabled(local_user(),'channel_sources')) { + $tabs[] = array( + 'label' => t('Channel Sources'), + 'url' => $a->get_baseurl(true) . '/sources', + 'selected' => '' + ); + + } + $tabtpl = get_markup_template("generic_links_widget.tpl"); -- cgit v1.2.3 From ced0a9ab74f1c7563c0618c338c85a358e21ff5d Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Sat, 2 Nov 2013 21:11:43 +0000 Subject: Don't set widgets if you're not a local user. --- mod/settings.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 5f1106be5..ab3ac4f12 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -22,6 +22,8 @@ function settings_init(&$a) { function settings_aside(&$a) { +if (! local_user()) + return; // default is channel settings in the absence of other arguments -- cgit v1.2.3 From 9158909fa3e938d04ebf06d2c2dba9417b36ffa6 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 2 Nov 2013 23:56:29 -0700 Subject: return a login form on some protoected pages if not logged in. --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index ab3ac4f12..4e122607b 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -625,7 +625,7 @@ function settings_content(&$a) { if(! local_user()) { notice( t('Permission denied.') . EOL ); - return; + return login(); } -- cgit v1.2.3 From fce5f2042db1a9d0b13c3bd5f6d37980fa98ca7f Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 18 Nov 2013 14:06:34 -0800 Subject: resetting password tries to update email address even if it didn't change - and if you've got the admin email this spits out a warning. --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 4e122607b..ba7540b91 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -319,8 +319,8 @@ function settings_post(&$a) { } $email = ((x($_POST,'email')) ? trim(notags($_POST['email'])) : ''); + $account = $a->get_account(); if($email != $account['account_email']) { - $account = $a->get_account(); if(! valid_email($email)) $errs[] = t('Not valid email.'); $adm = trim(get_config('system','admin_email')); -- cgit v1.2.3 From 3e0ac769aad2ae15934c32eef2f4992bde73e178 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 21 Nov 2013 17:23:14 -0800 Subject: white screen --- mod/settings.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index ba7540b91..af9113202 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -357,7 +357,7 @@ function settings_post(&$a) { $openid = ((x($_POST,'openid_url')) ? notags(trim($_POST['openid_url'])) : ''); $maxreq = ((x($_POST,'maxreq')) ? intval($_POST['maxreq']) : 0); $expire = ((x($_POST,'expire')) ? intval($_POST['expire']) : 0); - $def_gid = ((x($_POST,'group-selection')) ? intval($_POST['group-selection']) : 0); + $def_group = ((x($_POST,'group-selection')) ? notags(trim($_POST['group-selection'])) : ''); $expire_items = ((x($_POST,'expire_items')) ? intval($_POST['expire_items']) : 0); @@ -506,9 +506,9 @@ function settings_post(&$a) { if($page_flags == PAGE_PRVGROUP) { $hidewall = 1; if((! $str_contact_allow) && (! $str_group_allow) && (! $str_contact_deny) && (! $str_group_deny)) { - if($def_gid) { + if($def_group) { info( t('Private forum has no privacy permissions. Using default privacy group.'). EOL); - $str_group_allow = '<' . $def_gid . '>'; + $str_group_allow = '<' . $def_group . '>'; } else { notice( t('Private forum has no privacy permissions and no default privacy group.') . EOL); @@ -519,7 +519,7 @@ function settings_post(&$a) { */ /* - $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, `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `def_gid` = %d, `blockwall` = %d, `hidewall` = %d, `blocktags` = %d, `unkmail` = %d, `cntunkmail` = %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, `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `def_group` = %d, `blockwall` = %d, `hidewall` = %d, `blocktags` = %d, `unkmail` = %d, `cntunkmail` = %d WHERE `uid` = %d LIMIT 1", dbesc($username), dbesc($email), dbesc($openid), @@ -535,7 +535,7 @@ function settings_post(&$a) { intval($maxreq), intval($expire), dbesc($openidserver), - intval($def_gid), + intval($def_group), intval($blockwall), intval($hidewall), intval($blocktags), @@ -545,7 +545,7 @@ function settings_post(&$a) { ); */ - $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d where channel_id = %d limit 1", + $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_default_group = '%s', channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d where channel_id = %d limit 1", dbesc($username), intval($pageflags), dbesc($timezone), @@ -554,6 +554,7 @@ function settings_post(&$a) { intval($unkmail), intval($maxreq), intval($expire), + dbesc($def_group), intval($arr['channel_r_stream']), intval($arr['channel_r_profile']), intval($arr['channel_r_photos']), @@ -1045,7 +1046,7 @@ function settings_content(&$a) { require_once('include/group.php'); - $group_select = mini_group_select(local_user(),$a->user['def_gid']); + $group_select = mini_group_select(local_user(),$channel['channel_default_group']); $o .= replace_macros($stpl,array( '$ptitle' => t('Channel Settings'), -- cgit v1.2.3 From 1c5f98440da1b4713d0f5b9f8f6a2d3ca39e23af Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 29 Nov 2013 14:08:37 -0800 Subject: quite a bit of work on default acl permissions and various acl quirks --- mod/settings.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index af9113202..35210eaba 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -141,6 +141,8 @@ function settings_post(&$a) { if(! local_user()) return; +// logger('mod_settings: ' . print_r($_REQUEST,true)); + if(x($_SESSION,'submanage') && intval($_SESSION['submanage'])) return; @@ -502,6 +504,8 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','blocktags',$blocktags); + + /* if($page_flags == PAGE_PRVGROUP) { $hidewall = 1; @@ -545,7 +549,7 @@ function settings_post(&$a) { ); */ - $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_default_group = '%s', channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d where channel_id = %d limit 1", + $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_default_group = '%s', channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d, channel_allow_cid = '%s', channel_allow_gid = '%s', channel_deny_cid = '%s', channel_deny_gid = '%s' where channel_id = %d limit 1", dbesc($username), intval($pageflags), dbesc($timezone), @@ -572,6 +576,10 @@ function settings_post(&$a) { intval($arr['channel_r_pages']), intval($arr['channel_w_pages']), intval($arr['channel_a_republish']), + dbesc($str_contact_allow), + dbesc($str_group_allow), + dbesc($str_contact_deny), + dbesc($str_group_deny), intval(local_user()) ); @@ -1042,7 +1050,12 @@ function settings_content(&$a) { ); - + $perm_defaults = array( + 'allow_cid' => $channel['channel_allow_cid'], + 'allow_gid' => $channel['channel_allow_gid'], + 'deny_cid' => $channel['channel_deny_cid'], + 'deny_gid' => $channel['channel_deny_gid'] + ); require_once('include/group.php'); @@ -1079,7 +1092,7 @@ function settings_content(&$a) { '$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')), '$permissions' => t('Default Post Permissions'), '$permdesc' => t("\x28click to open/close\x29"), - '$aclselect' => populate_acl($a->user,$celeb), + '$aclselect' => populate_acl($perm_defaults), '$suggestme' => $suggestme, '$group_select' => $group_select, -- cgit v1.2.3 From 1aa79d9ee69bbb7afb2c9b87579aad252ef66730 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 6 Dec 2013 00:02:39 -0800 Subject: some code cleanup - gad I forgot what a mess the "other" notifications tabs (everything but system) were in. Maybe I'll just remove them so we can start over. --- mod/settings.php | 64 -------------------------------------------------------- 1 file changed, 64 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 35210eaba..4d95f75b3 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -491,11 +491,6 @@ function settings_post(&$a) { $str_group_deny = perms2str($_POST['group_deny']); $str_contact_deny = perms2str($_POST['contact_deny']); - set_pconfig(local_user(),'expire','items', $expire_items); - set_pconfig(local_user(),'expire','notes', $expire_notes); - set_pconfig(local_user(),'expire','starred', $expire_starred); - set_pconfig(local_user(),'expire','photos', $expire_photos); - set_pconfig(local_user(),'expire','network_only', $expire_network_only); set_pconfig(local_user(),'system','use_browser_location',$allow_location); set_pconfig(local_user(),'system','suggestme', $suggestme); set_pconfig(local_user(),'system','post_newfriend', $post_newfriend); @@ -504,51 +499,6 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','blocktags',$blocktags); - - -/* - if($page_flags == PAGE_PRVGROUP) { - $hidewall = 1; - if((! $str_contact_allow) && (! $str_group_allow) && (! $str_contact_deny) && (! $str_group_deny)) { - if($def_group) { - info( t('Private forum has no privacy permissions. Using default privacy group.'). EOL); - $str_group_allow = '<' . $def_group . '>'; - } - else { - notice( t('Private forum has no privacy permissions and no default privacy group.') . EOL); - } - } - } - -*/ - -/* - $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, `maxreq` = %d, `expire` = %d, `openidserver` = '%s', `def_group` = %d, `blockwall` = %d, `hidewall` = %d, `blocktags` = %d, `unkmail` = %d, `cntunkmail` = %d WHERE `uid` = %d LIMIT 1", - dbesc($username), - dbesc($email), - dbesc($openid), - dbesc($timezone), - dbesc($str_contact_allow), - dbesc($str_group_allow), - dbesc($str_contact_deny), - dbesc($str_group_deny), - intval($notify), - intval($page_flags), - dbesc($defloc), - intval($allow_location), - intval($maxreq), - intval($expire), - dbesc($openidserver), - intval($def_group), - intval($blockwall), - intval($hidewall), - intval($blocktags), - intval($unkmail), - intval($cntunkmail), - intval(local_user()) - ); -*/ - $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_default_group = '%s', channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d, channel_allow_cid = '%s', channel_allow_gid = '%s', channel_deny_cid = '%s', channel_deny_gid = '%s' where channel_id = %d limit 1", dbesc($username), intval($pageflags), @@ -1038,18 +988,6 @@ function settings_content(&$a) { $celeb = false; - $expire_arr = array( - 'days' => array('expire', t("Automatically expire posts after this many days:"), $expire, t('If empty, posts will not expire. Expired posts will be deleted')), - 'advanced' => t('Advanced expiration settings'), - 'label' => t('Advanced Expiration'), - 'items' => array('expire_items', t("Expire posts:"), $expire_items, '', array(t('No'),t('Yes'))), - - 'starred' => array('expire_starred', t("Expire starred posts:"), $expire_starred, '', array(t('No'),t('Yes'))), - 'photos' => array('expire_photos', t("Expire photos:"), $expire_photos, '', array(t('No'),t('Yes'))), - 'network_only' => array('expire_network_only', t("Only expire posts by others:"), $expire_network_only, '', array(t('No'),t('Yes'))), - ); - - $perm_defaults = array( 'allow_cid' => $channel['channel_allow_cid'], 'allow_gid' => $channel['channel_allow_gid'], @@ -1098,8 +1036,6 @@ function settings_content(&$a) { '$group_select' => $group_select, - '$expire' => $expire_arr, - '$profile_in_dir' => $profile_in_dir, '$hide_friends' => $hide_friends, '$hide_wall' => $hide_wall, -- cgit v1.2.3 From c00f0d4b282f2242b9c2e154a5381029cf0dc812 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 14 Dec 2013 13:26:40 -0800 Subject: a couple more comanche conversions --- mod/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 4d95f75b3..c2a540063 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -32,7 +32,7 @@ if (! local_user()) $a->argc = 2; $a->argv[] = 'channel'; } - +/* $channel = $a->get_channel(); $abook_self_id = 0; @@ -132,7 +132,7 @@ if (! local_user()) '$class' => 'settings-widget', '$items' => $tabs, )); - +*/ } -- cgit v1.2.3 From 38fd8410eb5c66928cb24bb87ad38657f53aec3a Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 18 Dec 2013 01:00:08 -0800 Subject: split off mod_connections into mod_connections & mod_connedit - lots of links to fix --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index c2a540063..7fb6f8317 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -99,7 +99,7 @@ if (! local_user()) array( 'label' => t('Automatic Permissions (Advanced)'), - 'url' => $a->get_baseurl(true) . '/connections/' . $abook_self_id, + 'url' => $a->get_baseurl(true) . '/connedit/' . $abook_self_id, 'selected' => '' ), -- cgit v1.2.3 From 125543adedfe00b3d5cea8548d1a66096a173a6b Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 19 Dec 2013 02:16:14 -0800 Subject: more comanche migration --- mod/settings.php | 108 ++----------------------------------------------------- 1 file changed, 3 insertions(+), 105 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 7fb6f8317..5aa018cc2 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -16,14 +16,10 @@ function get_theme_config_file($theme){ } function settings_init(&$a) { - $a->profile_uid = local_user(); -} - - -function settings_aside(&$a) { + if(! local_user()) + return; -if (! local_user()) - return; + $a->profile_uid = local_user(); // default is channel settings in the absence of other arguments @@ -32,107 +28,9 @@ if (! local_user()) $a->argc = 2; $a->argv[] = 'channel'; } -/* - $channel = $a->get_channel(); - - $abook_self_id = 0; - - // Retrieve the 'self' address book entry for use in the auto-permissions link - if(local_user()) { - $abk = q("select abook_id from abook where abook_channel = %d and ( abook_flags & %d ) limit 1", - intval(local_user()), - intval(ABOOK_FLAG_SELF) - ); - if($abk) - $abook_self_id = $abk[0]['abook_id']; - } - - - $tabs = array( - array( - 'label' => t('Account settings'), - 'url' => $a->get_baseurl(true).'/settings/account', - 'selected' => ((argv(1) === 'account') ? 'active' : ''), - ), - - array( - 'label' => t('Channel settings'), - 'url' => $a->get_baseurl(true).'/settings/channel', - 'selected' => ((argv(1) === 'channel') ? 'active' : ''), - ), - - array( - 'label' => t('Additional features'), - 'url' => $a->get_baseurl(true).'/settings/features', - 'selected' => ((argv(1) === 'features') ? 'active' : ''), - ), - - array( - 'label' => t('Feature settings'), - 'url' => $a->get_baseurl(true).'/settings/featured', - 'selected' => ((argv(1) === 'featured') ? 'active' : ''), - ), - - array( - 'label' => t('Display settings'), - 'url' => $a->get_baseurl(true).'/settings/display', - 'selected' => ((argv(1) === 'display') ? 'active' : ''), - ), - - array( - 'label' => t('Connected apps'), - 'url' => $a->get_baseurl(true) . '/settings/oauth', - 'selected' => ((argv(1) === 'oauth') ? 'active' : ''), - ), - - array( - 'label' => t('Export channel'), - 'url' => $a->get_baseurl(true) . '/uexport/basic', - 'selected' => '' - ), - -// array( -// 'label' => t('Export account'), -// 'url' => $a->get_baseurl(true) . '/uexport/complete', -// 'selected' => '' -// ), - - array( - 'label' => t('Automatic Permissions (Advanced)'), - 'url' => $a->get_baseurl(true) . '/connedit/' . $abook_self_id, - 'selected' => '' - ), - - - ); - - if(feature_enabled(local_user(),'premium_channel')) { - $tabs[] = array( - 'label' => t('Premium Channel Settings'), - 'url' => $a->get_baseurl(true) . '/connect/' . $channel['channel_address'], - 'selected' => '' - ); - - } - if(feature_enabled(local_user(),'channel_sources')) { - $tabs[] = array( - 'label' => t('Channel Sources'), - 'url' => $a->get_baseurl(true) . '/sources', - 'selected' => '' - ); - - } - - $tabtpl = get_markup_template("generic_links_widget.tpl"); - $a->page['aside'] = replace_macros($tabtpl, array( - '$title' => t('Settings'), - '$class' => 'settings-widget', - '$items' => $tabs, - )); -*/ } -- cgit v1.2.3 From 0948c3c3ca5aa3621247c7a77a05ac5acd085459 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 26 Jan 2014 03:27:36 -0800 Subject: allow site defaults for enabled features --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 5aa018cc2..ee6ef45de 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -635,7 +635,7 @@ function settings_content(&$a) { $arr[$fname] = array(); $arr[$fname][0] = $fdata[0]; foreach(array_slice($fdata,1) as $f) { - $arr[$fname][1][] = array('feature_' .$f[0],$f[1],((intval(get_pconfig(local_user(),'feature',$f[0]))) ? "1" : ''),$f[2],array(t('Off'),t('On'))); + $arr[$fname][1][] = array('feature_' .$f[0],$f[1],((intval(feature_enabled(local_user(),$f[0]))) ? "1" : ''),$f[2],array(t('Off'),t('On'))); } } -- cgit v1.2.3 From 8efac0cfd6db063a469ada1db4e5767a5fd975c6 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 28 Jan 2014 16:16:55 -0800 Subject: fix sql query and provide setting to hide online status --- mod/settings.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index ee6ef45de..7ff76cd3e 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -266,6 +266,7 @@ function settings_post(&$a) { $expire_network_only = ((x($_POST,'expire_network_only'))? intval($_POST['expire_network_only']) : 0); $allow_location = (((x($_POST,'allow_location')) && (intval($_POST['allow_location']) == 1)) ? 1: 0); + $hide_presence = (((x($_POST,'hide_presence')) && (intval($_POST['hide_presence']) == 1)) ? 1: 0); $publish = (((x($_POST,'profile_in_directory')) && (intval($_POST['profile_in_directory']) == 1)) ? 1: 0); $page_flags = (((x($_POST,'page-flags')) && (intval($_POST['page-flags']))) ? intval($_POST['page-flags']) : 0); @@ -395,6 +396,7 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','post_joingroup', $post_joingroup); set_pconfig(local_user(),'system','post_profilechange', $post_profilechange); set_pconfig(local_user(),'system','blocktags',$blocktags); + set_pconfig(local_user(),'system','hide_online_status',$hide_presence); $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_default_group = '%s', channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d, channel_allow_cid = '%s', channel_allow_gid = '%s', channel_deny_cid = '%s', channel_deny_gid = '%s' where channel_id = %d limit 1", @@ -821,6 +823,9 @@ function settings_content(&$a) { $unkmail = $a->user['unkmail']; $cntunkmail = $a->user['cntunkmail']; + $hide_presence = intval(get_pconfig(local_user(), 'system','hide_online_status')); + + $expire_items = get_pconfig(local_user(), 'expire','items'); $expire_items = (($expire_items===false)? '1' : $expire_items); // default if not set: 1 @@ -918,6 +923,8 @@ function settings_content(&$a) { '$h_prv' => t('Security and Privacy Settings'), + '$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents showing if you are available for chat')), + '$lbl_pmacro' => t('Quick Privacy Settings:'), '$pmacro3' => t('Very Public - extremely permissive'), '$pmacro2' => t('Typical - default public, privacy when desired'), -- cgit v1.2.3 From ee1580427e9a1bc4e2b86906f7b42d3071ed516d Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 2 Feb 2014 17:54:36 -0800 Subject: don't draw attention to advanced permissions and their corresponding complexity and clearly mark the simple permissions which people are encouraged to use. --- mod/settings.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 7ff76cd3e..c0e8122cb 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -923,15 +923,17 @@ function settings_content(&$a) { '$h_prv' => t('Security and Privacy Settings'), - '$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents showing if you are available for chat')), + '$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents displaying in your profile that you are online')), - '$lbl_pmacro' => t('Quick Privacy Settings:'), - '$pmacro3' => t('Very Public - extremely permissive'), - '$pmacro2' => t('Typical - default public, privacy when desired'), + '$lbl_pmacro' => t('Simple Privacy Settings:'), + '$pmacro3' => t('Very Public - extremely permissive (use with caution)'), + '$pmacro2' => t('Typical - default public, privacy when desired (similar to social network permissions)'), '$pmacro1' => t('Private - default private, rarely open or public'), '$pmacro0' => t('Blocked - default blocked to/from everybody'), '$permiss_arr' => $permiss, + '$lbl_p2macro' => t('Advanced Privacy Settings'), + '$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')), '$permissions' => t('Default Post Permissions'), '$permdesc' => t("\x28click to open/close\x29"), -- cgit v1.2.3 From 38bce48f288244c967d325639e033e0602fa0bcc Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 2 Feb 2014 18:06:15 -0800 Subject: wordsmithing --- mod/settings.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index c0e8122cb..543bef5ed 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -926,10 +926,10 @@ function settings_content(&$a) { '$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents displaying in your profile that you are online')), '$lbl_pmacro' => t('Simple Privacy Settings:'), - '$pmacro3' => t('Very Public - extremely permissive (use with caution)'), - '$pmacro2' => t('Typical - default public, privacy when desired (similar to social network permissions)'), - '$pmacro1' => t('Private - default private, rarely open or public'), - '$pmacro0' => t('Blocked - default blocked to/from everybody'), + '$pmacro3' => t('Very Public - extremely permissive (should be used with caution)'), + '$pmacro2' => t('Typical - default public, privacy when desired (similar to social network permissions but with improved privacy)'), + '$pmacro1' => t('Private - default private, never open or public'), + '$pmacro0' => t('Blocked - default blocked to/from everybody'), '$permiss_arr' => $permiss, '$lbl_p2macro' => t('Advanced Privacy Settings'), -- cgit v1.2.3 From c7cad26b4187736065d02876c3a260309a5c6691 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 2 Feb 2014 20:22:41 -0800 Subject: more wordsmithing --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 543bef5ed..38b1d6fdf 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -919,7 +919,7 @@ function settings_content(&$a) { '$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''), '$allowloc' => array('allow_location', t('Use Browser Location:'), ((get_pconfig(local_user(),'system','use_browser_location')) ? 1 : ''), ''), - '$adult' => array('adult', t('Adult Content'), $adult_flag, t('This channel publishes adult content.')), + '$adult' => array('adult', t('Adult Content'), $adult_flag, t('This channel frequently or regularly publishes adult content. (Please tag any adult material and/or nudity with #NSFW)')), '$h_prv' => t('Security and Privacy Settings'), -- cgit v1.2.3 From d8f16442a1ca7d0be18dedd52c0f4eb339ba19b6 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Feb 2014 00:52:34 -0800 Subject: bookmark permissions --- mod/settings.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 38b1d6fdf..7889538f3 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -306,6 +306,7 @@ function settings_post(&$a) { $arr['channel_r_pages'] = (($_POST['view_pages']) ? $_POST['view_pages'] : 0); $arr['channel_w_pages'] = (($_POST['write_pages']) ? $_POST['write_pages'] : 0); $arr['channel_a_republish'] = (($_POST['republish']) ? $_POST['republish'] : 0); + $arr['channel_a_bookmark'] = (($_POST['bookmark']) ? $_POST['bookmark'] : 0); $defperms = 0; if(x($_POST['def_view_stream'])) @@ -342,6 +343,8 @@ function settings_post(&$a) { $defperms += $_POST['def_write_pages']; if(x($_POST['def_republish'])) $defperms += $_POST['def_republish']; + if(x($_POST['def_bookmark'])) + $defperms += $_POST['def_bookmark']; $notify = 0; @@ -399,7 +402,7 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','hide_online_status',$hide_presence); - $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_default_group = '%s', channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d, channel_allow_cid = '%s', channel_allow_gid = '%s', channel_deny_cid = '%s', channel_deny_gid = '%s' where channel_id = %d limit 1", + $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_default_group = '%s', channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d, channel_a_bookmark = %d, channel_allow_cid = '%s', channel_allow_gid = '%s', channel_deny_cid = '%s', channel_deny_gid = '%s' where channel_id = %d limit 1", dbesc($username), intval($pageflags), dbesc($timezone), @@ -426,6 +429,7 @@ function settings_post(&$a) { intval($arr['channel_r_pages']), intval($arr['channel_w_pages']), intval($arr['channel_a_republish']), + intval($arr['channel_a_bookmark']), dbesc($str_contact_allow), dbesc($str_group_allow), dbesc($str_contact_deny), -- cgit v1.2.3 From 12319c41e3c0565745060d7ade97f194229dddb2 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 10 Feb 2014 15:14:03 -0800 Subject: add chanview mode to settings --- mod/settings.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 7889538f3..c5aff62b8 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -150,9 +150,12 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','mobile_theme',$mobile_theme); } + $chanview_full = ((x($_POST,'chanview_full')) ? intval($_POST['chanview_full']) : 0); + set_pconfig(local_user(),'system','update_interval', $browser_update); set_pconfig(local_user(),'system','itemspage', $itemspage); set_pconfig(local_user(),'system','no_smilies',$nosmile); + set_pconfig(local_user(),'system','chanview_full',$chanview_full); if ($theme == $a->channel['channel_theme']){ @@ -734,6 +737,7 @@ function settings_content(&$a) { $nosmile = get_pconfig(local_user(),'system','no_smilies'); $nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0 + $chanview = intval(get_pconfig(local_user(),'system','chanview_full')); $theme_config = ""; if( ($themeconfigfile = get_theme_config_file($theme_selected)) != null){ @@ -754,7 +758,7 @@ function settings_content(&$a) { '$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')), '$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')), '$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''), - + '$chanview_full' => array('chanview_full', t('View remote profiles as webpages'), $chanview, t('By default open in a sub-window of your own site')), '$theme_config' => $theme_config, )); -- cgit v1.2.3 From 7f3f981d96338093ed8a01597e80916c6d8ea212 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 11 Feb 2014 20:45:17 -0800 Subject: fix a mysql error which popped up in the dbfail log --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index c5aff62b8..506141a1f 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -39,7 +39,7 @@ function settings_post(&$a) { if(! local_user()) return; -// logger('mod_settings: ' . print_r($_REQUEST,true)); + // logger('mod_settings: ' . print_r($_REQUEST,true)); if(x($_SESSION,'submanage') && intval($_SESSION['submanage'])) return; -- cgit v1.2.3 From d7546c7a638214f53219d342300ef659668a4975 Mon Sep 17 00:00:00 2001 From: marijus Date: Thu, 13 Feb 2014 19:29:06 +0100 Subject: This makes advanced privacy settings adjustable in expert mode only. Also they are hidden behind a button. This is a design hotfix should probably come up with something better someday... --- mod/settings.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 506141a1f..ec758bc90 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -977,6 +977,8 @@ function settings_content(&$a) { '$h_advn' => t('Advanced Account/Page Type Settings'), '$h_descadvn' => t('Change the behaviour of this account for special situations'), '$pagetype' => $pagetype, + '$expert' => feature_enabled(local_user(),'expert'), + '$hint' => t('Please enable expert mode (in Settings > Additional features) to adjust!'), )); -- cgit v1.2.3 From 70526915c87b57e4d91f0ab9a518d34a6dc04c82 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 16 Feb 2014 16:04:46 -0800 Subject: several things were not working correctly w/r/t community tagging. The preference vanished from settings at some point, and we also weren't updating the original post timestamp so that the changed taxonomy would propagate correctly as an edit. --- mod/settings.php | 1 + 1 file changed, 1 insertion(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index ec758bc90..97965d0fd 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -939,6 +939,7 @@ function settings_content(&$a) { '$pmacro1' => t('Private - default private, never open or public'), '$pmacro0' => t('Blocked - default blocked to/from everybody'), '$permiss_arr' => $permiss, + '$blocktags' => array('blocktags',t('Allow others to tag your posts'), 1-$blocktags, t('Often used by the community to retro-actively flag inappropriate content'),array(t('No'),t('Yes'))), '$lbl_p2macro' => t('Advanced Privacy Settings'), -- cgit v1.2.3 From 24d119b8c4e94ed130577e4e4a8d17ea13c406ac Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 18 Feb 2014 20:59:25 -0800 Subject: introduce a new privacy level "PERMS_AUTHED" to indicate somebody that is able to successfully authenticate (but is not necessarily in this network). --- mod/settings.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 97965d0fd..5b0a8e8f2 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -798,6 +798,7 @@ function settings_content(&$a) { array( t('Anybody in your address book'), PERMS_CONTACTS), array( t('Anybody on this website'), PERMS_SITE), array( t('Anybody in this network'), PERMS_NETWORK), + array( t('Anybody authenticated'), PERMS_AUTHED), array( t('Anybody on the internet'), PERMS_PUBLIC) ); @@ -979,7 +980,7 @@ function settings_content(&$a) { '$h_descadvn' => t('Change the behaviour of this account for special situations'), '$pagetype' => $pagetype, '$expert' => feature_enabled(local_user(),'expert'), - '$hint' => t('Please enable expert mode (in Settings > Additional features) to adjust!'), + '$hint' => t('Please enable expert mode (in Settings > Additional features) to adjust!'), )); -- cgit v1.2.3 From 9715176a56c0b8127e9c5045d26d13402c072ff8 Mon Sep 17 00:00:00 2001 From: tony baldwin Date: Wed, 19 Feb 2014 22:56:52 -0500 Subject: s/View remote profiles as webpages/Do not view remote profiles in frames/g --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 5b0a8e8f2..945a75134 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -758,7 +758,7 @@ function settings_content(&$a) { '$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')), '$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')), '$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''), - '$chanview_full' => array('chanview_full', t('View remote profiles as webpages'), $chanview, t('By default open in a sub-window of your own site')), + '$chanview_full' => array('chanview_full', t('Do not view remote profiles in frames'), $chanview, t('By default open in a sub-window of your own site')), '$theme_config' => $theme_config, )); -- cgit v1.2.3 From a29b71547a1ceb12d77617d9b06ba074c1793755 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 19 Feb 2014 20:19:56 -0800 Subject: use a "fullscreen" icon for chanview full screen mode; add channel_menu selection and setting to the settings page. --- mod/settings.php | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 5b0a8e8f2..6315e95f5 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -261,7 +261,7 @@ function settings_post(&$a) { $maxreq = ((x($_POST,'maxreq')) ? intval($_POST['maxreq']) : 0); $expire = ((x($_POST,'expire')) ? intval($_POST['expire']) : 0); $def_group = ((x($_POST,'group-selection')) ? notags(trim($_POST['group-selection'])) : ''); - + $channel_menu = ((x($_POST['channel_menu'])) ? htmlspecialchars_decode(trim($_POST['channel_menu'])) : ''); $expire_items = ((x($_POST,'expire_items')) ? intval($_POST['expire_items']) : 0); $expire_starred = ((x($_POST,'expire_starred')) ? intval($_POST['expire_starred']) : 0); @@ -403,7 +403,7 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','post_profilechange', $post_profilechange); set_pconfig(local_user(),'system','blocktags',$blocktags); set_pconfig(local_user(),'system','hide_online_status',$hide_presence); - + set_pconfig(local_user(),'system','channel_menu',$channel_menu); $r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d, channel_default_group = '%s', channel_r_stream = %d, channel_r_profile = %d, channel_r_photos = %d, channel_r_abook = %d, channel_w_stream = %d, channel_w_wall = %d, channel_w_tagwall = %d, channel_w_comment = %d, channel_w_mail = %d, channel_w_photos = %d, channel_w_chat = %d, channel_a_delegate = %d, channel_r_storage = %d, channel_w_storage = %d, channel_r_pages = %d, channel_w_pages = %d, channel_a_republish = %d, channel_a_bookmark = %d, channel_allow_cid = '%s', channel_allow_gid = '%s', channel_deny_cid = '%s', channel_deny_gid = '%s' where channel_id = %d limit 1", dbesc($username), @@ -911,6 +911,18 @@ function settings_content(&$a) { require_once('include/group.php'); $group_select = mini_group_select(local_user(),$channel['channel_default_group']); + require_once('include/menu.php'); + $m1 = menu_list(local_user()); + $menu = false; + if($m1) { + $menu = array(); + $current = get_pconfig(local_user(),'system','channel_menu'); + $menu[] = array('name' => '', 'selected' => ((! $current) ? true : false)); + foreach($m1 as $m) { + $menu[] = array('name' => htmlspecialchars($m['menu_name'],ENT_COMPAT,'UTF-8'), 'selected' => (($m['menu_name'] === $current) ? ' selected="selected" ' : false)); + } + } + $o .= replace_macros($stpl,array( '$ptitle' => t('Channel Settings'), @@ -981,7 +993,9 @@ function settings_content(&$a) { '$pagetype' => $pagetype, '$expert' => feature_enabled(local_user(),'expert'), '$hint' => t('Please enable expert mode (in Settings > Additional features) to adjust!'), - + '$lbl_misc' => t('Miscellaneous Settings'), + '$menus' => $menu, + '$menu_desc' => t('Personal menu to display in your channel pages'), )); call_hooks('settings_form',$o); -- cgit v1.2.3 From 6eb971656ef1710596084fdaa0ae3085df2c2101 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 20 Feb 2014 01:35:08 -0800 Subject: believe i found the issue which was causing hundreds/thousands of identical hublocs to be created --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index e9f4c9f8d..b88380ff0 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -261,7 +261,7 @@ function settings_post(&$a) { $maxreq = ((x($_POST,'maxreq')) ? intval($_POST['maxreq']) : 0); $expire = ((x($_POST,'expire')) ? intval($_POST['expire']) : 0); $def_group = ((x($_POST,'group-selection')) ? notags(trim($_POST['group-selection'])) : ''); - $channel_menu = ((x($_POST['channel_menu'])) ? htmlspecialchars_decode(trim($_POST['channel_menu'])) : ''); + $channel_menu = ((x($_POST['channel_menu'])) ? htmlspecialchars_decode(trim($_POST['channel_menu']),ENT_QUOTES) : ''); $expire_items = ((x($_POST,'expire_items')) ? intval($_POST['expire_items']) : 0); $expire_starred = ((x($_POST,'expire_starred')) ? intval($_POST['expire_starred']) : 0); -- cgit v1.2.3 From 08313bac6c7ce9f87b6b6ddf23cc5c4d50747aa1 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 25 Feb 2014 14:12:51 -0800 Subject: allow personalised page layouts for modules. --- mod/settings.php | 1 - 1 file changed, 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index b88380ff0..13cb3cae9 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -439,7 +439,6 @@ function settings_post(&$a) { dbesc($str_group_deny), intval(local_user()) ); - if($r) info( t('Settings updated.') . EOL); -- cgit v1.2.3 From efc828bed52eb32e1e99d757139d1133e3ec9b8a Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 20:58:12 -0800 Subject: add pdl editor to settings/display --- mod/settings.php | 1 + 1 file changed, 1 insertion(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 13cb3cae9..1d2a5ecf9 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -758,6 +758,7 @@ function settings_content(&$a) { '$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')), '$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''), '$chanview_full' => array('chanview_full', t('Do not view remote profiles in frames'), $chanview, t('By default open in a sub-window of your own site')), + '$layout_editor' => t('System Page Layout Editor - (advanced)'), '$theme_config' => $theme_config, )); -- cgit v1.2.3 From 2dda5d6c708a8fb6e20b1f722510d8f174e1e328 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 19 Mar 2014 20:40:35 -0700 Subject: add expire setting, take out unknown mailers and max friend requests per day which aren't implemented --- mod/settings.php | 1 + 1 file changed, 1 insertion(+) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 1d2a5ecf9..cc4842725 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -956,6 +956,7 @@ function settings_content(&$a) { '$lbl_p2macro' => t('Advanced Privacy Settings'), + '$expire' => array('expire',t('Expire other channel content after this many days'),$expire,t('0 or blank prevents expiration')), '$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')), '$permissions' => t('Default Post Permissions'), '$permdesc' => t("\x28click to open/close\x29"), -- cgit v1.2.3 From 1177f97a50b2b7917fb9bed64d8b746617163fb8 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 27 Mar 2014 18:05:49 -0700 Subject: change wording of new connection request notification setting --- mod/settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index cc4842725..5c9511d30 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -979,8 +979,8 @@ function settings_content(&$a) { '$post_joingroup' => array('post_joingroup', t('joining a forum/community'), $post_joingroup, ''), '$post_profilechange' => array('post_profilechange', t('making an interesting profile change'), $post_profilechange, ''), '$lbl_not' => t('Send a notification email when:'), - '$notify1' => array('notify1', t('You receive an introduction'), ($notify & NOTIFY_INTRO), NOTIFY_INTRO, ''), - '$notify2' => array('notify2', t('Your introductions are confirmed'), ($notify & NOTIFY_CONFIRM), NOTIFY_CONFIRM, ''), + '$notify1' => array('notify1', t('You receive a connection request'), ($notify & NOTIFY_INTRO), NOTIFY_INTRO, ''), + '$notify2' => array('notify2', t('Your connections are confirmed'), ($notify & NOTIFY_CONFIRM), NOTIFY_CONFIRM, ''), '$notify3' => array('notify3', t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), NOTIFY_WALL, ''), '$notify4' => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, ''), '$notify5' => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, ''), -- cgit v1.2.3 From d1271ca340612224cd0daa2b3f9d5a5a28f7aa22 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 2 Apr 2014 19:25:57 -0700 Subject: clarify location - issue #392 --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 5c9511d30..3ab34f145 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -937,7 +937,7 @@ function settings_content(&$a) { '$username' => array('username', t('Full Name:'), $username,''), '$email' => array('email', t('Email Address:'), $email, ''), '$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''), - '$defloc' => array('defloc', t('Default Post Location:'), $defloc, ''), + '$defloc' => array('defloc', t('Default Post Location:'), $defloc, t('Geographical location to display on your posts')), '$allowloc' => array('allow_location', t('Use Browser Location:'), ((get_pconfig(local_user(),'system','use_browser_location')) ? 1 : ''), ''), '$adult' => array('adult', t('Adult Content'), $adult_flag, t('This channel frequently or regularly publishes adult content. (Please tag any adult material and/or nudity with #NSFW)')), -- cgit v1.2.3 From 059b6cd411e7034bd6b1b6de02dc34984259bd11 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 23 May 2014 15:30:22 -0700 Subject: add randprof app and do away with the universally hated chanview-iframe mode. It's gone. Please do not try and bring it back. We are not Diaspora and we have no desire to be like them. ("And they're all made out of ticky-tacky and they all look just the same"). Our profiles do not have to look the same and they won't anyway. We don't have to sugar coat the fact that some of the content in the matrix doesn't look like the rest of the content in the matrix. --- mod/settings.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 3ab34f145..ad3eff261 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -150,12 +150,12 @@ function settings_post(&$a) { set_pconfig(local_user(),'system','mobile_theme',$mobile_theme); } - $chanview_full = ((x($_POST,'chanview_full')) ? intval($_POST['chanview_full']) : 0); +// $chanview_full = ((x($_POST,'chanview_full')) ? intval($_POST['chanview_full']) : 0); set_pconfig(local_user(),'system','update_interval', $browser_update); set_pconfig(local_user(),'system','itemspage', $itemspage); set_pconfig(local_user(),'system','no_smilies',$nosmile); - set_pconfig(local_user(),'system','chanview_full',$chanview_full); +// set_pconfig(local_user(),'system','chanview_full',$chanview_full); if ($theme == $a->channel['channel_theme']){ @@ -736,7 +736,7 @@ function settings_content(&$a) { $nosmile = get_pconfig(local_user(),'system','no_smilies'); $nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0 - $chanview = intval(get_pconfig(local_user(),'system','chanview_full')); +// $chanview = intval(get_pconfig(local_user(),'system','chanview_full')); $theme_config = ""; if( ($themeconfigfile = get_theme_config_file($theme_selected)) != null){ @@ -757,7 +757,6 @@ function settings_content(&$a) { '$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds, no maximum')), '$itemspage' => array('itemspage', t("Maximum number of conversations to load at any time:"), $itemspage, t('Maximum of 100 items')), '$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, ''), - '$chanview_full' => array('chanview_full', t('Do not view remote profiles in frames'), $chanview, t('By default open in a sub-window of your own site')), '$layout_editor' => t('System Page Layout Editor - (advanced)'), '$theme_config' => $theme_config, )); -- cgit v1.2.3 From f7d99ed7ffb7ade16162b69d1b05b5a6133a8a8d Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 25 May 2014 18:24:27 -0700 Subject: fix the intermittent theme preview --- mod/settings.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index ad3eff261..e1ae0b8ec 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -714,7 +714,7 @@ function settings_content(&$a) { $unsupported = file_exists('view/theme/' . $th . '/unsupported'); $is_mobile = file_exists('view/theme/' . $th . '/mobile'); if (!$is_experimental or ($is_experimental && (get_config('experimentals','exp_themes')==1 or get_config('experimentals','exp_themes')===false))){ - $theme_name = (($is_experimental) ? sprintf("%s - \x28Experimental\x29", $f) : $f); + $theme_name = (($is_experimental) ? sprintf(t('%s - (Experimental)'), $f) : $f); if($is_mobile) { $mobile_themes[$f]=$theme_name; } @@ -736,8 +736,6 @@ function settings_content(&$a) { $nosmile = get_pconfig(local_user(),'system','no_smilies'); $nosmile = (($nosmile===false)? '0': $nosmile); // default if not set: 0 -// $chanview = intval(get_pconfig(local_user(),'system','chanview_full')); - $theme_config = ""; if( ($themeconfigfile = get_theme_config_file($theme_selected)) != null){ require_once($themeconfigfile); -- cgit v1.2.3 From 0f6c321e3f23d43e407aa3b3b424f20b56e0032d Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 14 Jun 2014 20:16:40 -0700 Subject: only show jotnets when posting conversation items --- mod/settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index e1ae0b8ec..bdf30bae2 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -957,7 +957,7 @@ function settings_content(&$a) { '$maxreq' => array('maxreq', t('Maximum Friend Requests/Day:'), intval($channel['channel_max_friend_req']) , t('May reduce spam activity')), '$permissions' => t('Default Post Permissions'), '$permdesc' => t("\x28click to open/close\x29"), - '$aclselect' => populate_acl($perm_defaults), + '$aclselect' => populate_acl($perm_defaults,false), '$suggestme' => $suggestme, '$group_select' => $group_select, -- cgit v1.2.3 From b20887995a2b3277659e01d99ae4de238f7175ef Mon Sep 17 00:00:00 2001 From: Alexandre Hannud Abdo Date: Tue, 17 Jun 2014 04:26:18 -0300 Subject: Implements a new permission level PERMS_PENDING With this a user can allow some action to any user which connects to them, even before they've connected back. Ref. https://mobiliza.org.br/display/478d9e71eaf55748dc646d3990651d6d34cfb7db5c38360538ec730ca3ccf908@zothub.com Also some code cleanup and an alternative logic for handling notifications of permission changes in zot.php. This assumes that private posts are still restricted to people in your addressbook. Regardless of your global permissions, a pending channel won't get private posts, even if the post only has a deny clause not matching the pending channel. --- mod/settings.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index bdf30bae2..c72fdc8c4 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -792,7 +792,8 @@ function settings_content(&$a) { $perm_opts = array( array( t('Nobody except yourself'), 0), array( t('Only those you specifically allow'), PERMS_SPECIFIC), - array( t('Anybody in your address book'), PERMS_CONTACTS), + array( t('Approved connections'), PERMS_CONTACTS), + array( t('Any connections'), PERMS_PENDING), array( t('Anybody on this website'), PERMS_SITE), array( t('Anybody in this network'), PERMS_NETWORK), array( t('Anybody authenticated'), PERMS_AUTHED), -- cgit v1.2.3