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