From e00be4de2353e1ca58570bf37fd247ff99fa549f Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 17 Feb 2015 19:47:36 -0800 Subject: The Diaspora communications policies allow comments to public posts literally from anybody. Allow this policy model by default for commenters from that network. This policy decision can be set or disabled on the addon/features settings page. --- mod/settings.php | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 8c927a97c..2ccedcb7b 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -114,6 +114,12 @@ function settings_post(&$a) { check_form_security_token_redirectOnErr('/settings/featured', 'settings_featured'); call_hooks('feature_settings_post', $_POST); + + if($_POST['dspr-submit']) { + set_pconfig(local_channel(),'system','diaspora_public_comments',intval($_POST['dspr_pubcomment'])); + info( t('Diaspora Policy Settings updated.') . EOL); + } + build_sync_packet(); return; } @@ -648,18 +654,31 @@ function settings_content(&$a) { } if((argc() > 1) && (argv(1) === 'featured')) { $settings_addons = ""; + + $o = ''; + $diaspora_enabled = get_config('system','diaspora_enabled'); $r = q("SELECT * FROM `hook` WHERE `hook` = 'feature_settings' "); - if(! count($r)) + if((! $r) && (! $diaspora_enabled)) $settings_addons = t('No feature settings configured'); + if($diaspora_enabled) { + $pubcomments = get_pconfig(local_channel(),'system','diaspora_public_comments'); + if($pubcomments === false) + $pubcomments = 1; + } + call_hooks('feature_settings', $settings_addons); - - + $tpl = get_markup_template("settings_addons.tpl"); $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_featured"), '$title' => t('Feature Settings'), + '$diaspora_enabled' => $diaspora_enabled, + '$pubcomments' => $pubcomments, + '$dsprtitle' => t('Diaspora Policy Settings'), + '$dsprhelp' => t('Allow any Diaspora member to comment on your public posts.'), + '$dsprsubmit' => t('Submit Diaspora Policy Settings'), '$settings_addons' => $settings_addons )); return $o; -- cgit v1.2.3 From af067666278046ef9f28e2657c1cf54950bd2d25 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 1 Mar 2015 16:59:44 +0100 Subject: provide some more yes/no labels --- mod/settings.php | 60 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 29 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 2ccedcb7b..3205797bb 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -965,18 +965,20 @@ function settings_content(&$a) { $timezone = date_default_timezone_get(); + $yes_no = array(t('No'),t('Yes')); + $opt_tpl = get_markup_template("field_checkbox.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 the network directory'), $profile['publish'], '', array(t('No'),t('Yes'))), + '$field' => array('profile_in_directory', t('Publish your default profile in the network directory'), $profile['publish'], '', $yes_no), )); } $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'))), + '$field' => array('suggestme', t('Allow us to suggest you as a potential friend to new members?'), $suggestme, '', $yes_no), )); @@ -1045,15 +1047,15 @@ function settings_content(&$a) { '$email' => array('email', t('Email Address:'), $email, ''), '$timezone' => array('timezone_select' , t('Your Timezone:'), $timezone, '', get_timezones()), '$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_channel(),'system','use_browser_location')) ? 1 : ''), ''), + '$allowloc' => array('allow_location', t('Use Browser Location:'), ((get_pconfig(local_channel(),'system','use_browser_location')) ? 1 : ''), '', $yes_no), - '$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)')), + '$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)'), $yes_no), '$h_prv' => t('Security and Privacy Settings'), '$permissions_set' => $permissions_set, '$perms_set_msg' => t('Your permissions are already configured. Click to view/adjust'), - '$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents displaying in your profile that you are online')), + '$hide_presence' => array('hide_presence', t('Hide my online presence'),$hide_presence, t('Prevents displaying in your profile that you are online'), $yes_no), '$lbl_pmacro' => t('Simple Privacy Settings:'), '$pmacro3' => t('Very Public - extremely permissive (should be used with caution)'), @@ -1061,7 +1063,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'))), + '$blocktags' => array('blocktags',t('Allow others to tag your posts'), 1-$blocktags, t('Often used by the community to retro-actively flag inappropriate content'), $yes_no), '$lbl_p2macro' => t('Advanced Privacy Settings'), @@ -1083,34 +1085,34 @@ function settings_content(&$a) { '$h_not' => t('Notification Settings'), '$activity_options' => t('By default post a status message when:'), - '$post_newfriend' => array('post_newfriend', t('accepting a friend request'), $post_newfriend, ''), - '$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, ''), + '$post_newfriend' => array('post_newfriend', t('accepting a friend request'), $post_newfriend, '', $yes_no), + '$post_joingroup' => array('post_joingroup', t('joining a forum/community'), $post_joingroup, '', $yes_no), + '$post_profilechange' => array('post_profilechange', t('making an interesting profile change'), $post_profilechange, '', $yes_no), '$lbl_not' => t('Send a notification email when:'), - '$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, ''), - '$notify6' => array('notify6', t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, ''), - '$notify7' => array('notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, ''), - '$notify8' => array('notify8', t('You are poked/prodded/etc. in a post'), ($notify & NOTIFY_POKE), NOTIFY_POKE, ''), + '$notify1' => array('notify1', t('You receive a connection request'), ($notify & NOTIFY_INTRO), NOTIFY_INTRO, '', $yes_no), + '$notify2' => array('notify2', t('Your connections are confirmed'), ($notify & NOTIFY_CONFIRM), NOTIFY_CONFIRM, '', $yes_no), + '$notify3' => array('notify3', t('Someone writes on your profile wall'), ($notify & NOTIFY_WALL), NOTIFY_WALL, '', $yes_no), + '$notify4' => array('notify4', t('Someone writes a followup comment'), ($notify & NOTIFY_COMMENT), NOTIFY_COMMENT, '', $yes_no), + '$notify5' => array('notify5', t('You receive a private message'), ($notify & NOTIFY_MAIL), NOTIFY_MAIL, '', $yes_no), + '$notify6' => array('notify6', t('You receive a friend suggestion'), ($notify & NOTIFY_SUGGEST), NOTIFY_SUGGEST, '', $yes_no), + '$notify7' => array('notify7', t('You are tagged in a post'), ($notify & NOTIFY_TAGSELF), NOTIFY_TAGSELF, '', $yes_no), + '$notify8' => array('notify8', t('You are poked/prodded/etc. in a post'), ($notify & NOTIFY_POKE), NOTIFY_POKE, '', $yes_no), '$lbl_vnot' => t('Show visual notifications including:'), - '$vnotify1' => array('vnotify1', t('Unseen matrix activity'), ($vnotify & VNOTIFY_NETWORK), VNOTIFY_NETWORK, ''), - '$vnotify2' => array('vnotify2', t('Unseen channel activity'), ($vnotify & VNOTIFY_CHANNEL), VNOTIFY_CHANNEL, ''), - '$vnotify3' => array('vnotify3', t('Unseen private messages'), ($vnotify & VNOTIFY_MAIL), VNOTIFY_MAIL, t('Recommended')), - '$vnotify4' => array('vnotify4', t('Upcoming events'), ($vnotify & VNOTIFY_EVENT), VNOTIFY_EVENT, ''), - '$vnotify5' => array('vnotify5', t('Events today'), ($vnotify & VNOTIFY_EVENTTODAY), VNOTIFY_EVENTTODAY, ''), - '$vnotify6' => array('vnotify6', t('Upcoming birthdays'), ($vnotify & VNOTIFY_BIRTHDAY), VNOTIFY_BIRTHDAY, t('Not available in all themes')), - '$vnotify7' => array('vnotify7', t('System (personal) notifications'), ($vnotify & VNOTIFY_SYSTEM), VNOTIFY_SYSTEM, ''), - '$vnotify8' => array('vnotify8', t('System info messages'), ($vnotify & VNOTIFY_INFO), VNOTIFY_INFO, t('Recommended')), - '$vnotify9' => array('vnotify9', t('System critical alerts'), ($vnotify & VNOTIFY_ALERT), VNOTIFY_ALERT, t('Recommended')), - '$vnotify10' => array('vnotify10', t('New connections'), ($vnotify & VNOTIFY_INTRO), VNOTIFY_INTRO, t('Recommended')), - '$vnotify11' => array('vnotify11', t('System Registrations'), ($vnotify & VNOTIFY_REGISTER), VNOTIFY_REGISTER, ''), - '$always_show_in_notices' => array('always_show_in_notices', t('Also show new wall posts, private messages and connections under Notices'), $always_show_in_notices, 1, ''), + '$vnotify1' => array('vnotify1', t('Unseen matrix activity'), ($vnotify & VNOTIFY_NETWORK), VNOTIFY_NETWORK, '', $yes_no), + '$vnotify2' => array('vnotify2', t('Unseen channel activity'), ($vnotify & VNOTIFY_CHANNEL), VNOTIFY_CHANNEL, '', $yes_no), + '$vnotify3' => array('vnotify3', t('Unseen private messages'), ($vnotify & VNOTIFY_MAIL), VNOTIFY_MAIL, t('Recommended'), $yes_no), + '$vnotify4' => array('vnotify4', t('Upcoming events'), ($vnotify & VNOTIFY_EVENT), VNOTIFY_EVENT, '', $yes_no), + '$vnotify5' => array('vnotify5', t('Events today'), ($vnotify & VNOTIFY_EVENTTODAY), VNOTIFY_EVENTTODAY, '', $yes_no), + '$vnotify6' => array('vnotify6', t('Upcoming birthdays'), ($vnotify & VNOTIFY_BIRTHDAY), VNOTIFY_BIRTHDAY, t('Not available in all themes'), $yes_no), + '$vnotify7' => array('vnotify7', t('System (personal) notifications'), ($vnotify & VNOTIFY_SYSTEM), VNOTIFY_SYSTEM, '', $yes_no), + '$vnotify8' => array('vnotify8', t('System info messages'), ($vnotify & VNOTIFY_INFO), VNOTIFY_INFO, t('Recommended'), $yes_no), + '$vnotify9' => array('vnotify9', t('System critical alerts'), ($vnotify & VNOTIFY_ALERT), VNOTIFY_ALERT, t('Recommended'), $yes_no), + '$vnotify10' => array('vnotify10', t('New connections'), ($vnotify & VNOTIFY_INTRO), VNOTIFY_INTRO, t('Recommended'), $yes_no), + '$vnotify11' => array('vnotify11', t('System Registrations'), ($vnotify & VNOTIFY_REGISTER), VNOTIFY_REGISTER, '', $yes_no), + '$always_show_in_notices' => array('always_show_in_notices', t('Also show new wall posts, private messages and connections under Notices'), $always_show_in_notices, 1, '', $yes_no), '$evdays' => array('evdays', t('Notify me of events this many days in advance'), $evdays, t('Must be greater than 0')), -- cgit v1.2.3 From df90677f900a1a6ed496628545a8e109700e168b Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 3 Mar 2015 17:43:13 -0800 Subject: add the tag hijacking preference to Diaspora settings --- mod/settings.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 3205797bb..71ca38d91 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -117,6 +117,7 @@ function settings_post(&$a) { if($_POST['dspr-submit']) { set_pconfig(local_channel(),'system','diaspora_public_comments',intval($_POST['dspr_pubcomment'])); + set_pconfig(local_channel(),'system','prevent_tag_hijacking',intval($_POST['dspr_hijack'])); info( t('Diaspora Policy Settings updated.') . EOL); } @@ -666,6 +667,9 @@ function settings_content(&$a) { $pubcomments = get_pconfig(local_channel(),'system','diaspora_public_comments'); if($pubcomments === false) $pubcomments = 1; + $hijacking = get_pconfig(local_channel(),'system','prevent_tag_hijacking'); + + } call_hooks('feature_settings', $settings_addons); @@ -673,11 +677,13 @@ function settings_content(&$a) { $tpl = get_markup_template("settings_addons.tpl"); $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_featured"), - '$title' => t('Feature Settings'), + '$title' => t('Feature/Addon Settings'), '$diaspora_enabled' => $diaspora_enabled, '$pubcomments' => $pubcomments, '$dsprtitle' => t('Diaspora Policy Settings'), '$dsprhelp' => t('Allow any Diaspora member to comment on your public posts.'), + '$dsprhijack' => t('Prevent hashtags from being redirected to other sites'), + '$hijacking' => $hijacking, '$dsprsubmit' => t('Submit Diaspora Policy Settings'), '$settings_addons' => $settings_addons )); -- cgit v1.2.3 From 4b08ccd873a02dcbcd8603f4b8681de47776e31f Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 4 Mar 2015 10:11:48 +0100 Subject: clean up account settings --- mod/settings.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 71ca38d91..a40a1deca 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -708,9 +708,8 @@ function settings_content(&$a) { $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_account"), '$title' => t('Account Settings'), - '$h_pass' => t('Password Settings'), - '$password1'=> array('npassword', t('New Password:'), '', ''), - '$password2'=> array('confirm', t('Confirm:'), '', t('Leave password fields blank unless changing')), + '$password1'=> array('npassword', t('Enter New Password:'), '', ''), + '$password2'=> array('confirm', t('Confirm New Password:'), '', t('Leave password fields blank unless changing')), '$submit' => t('Submit'), '$email' => array('email', t('Email Address:'), $email, ''), '$removeme' => t('Remove Account'), -- cgit v1.2.3 From eceafd5777c2b2c15d5db93e0a11bbeb328142e2 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 4 Mar 2015 10:26:25 +0100 Subject: fix wording --- 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 a40a1deca..6b1e5ab0a 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -713,8 +713,7 @@ function settings_content(&$a) { '$submit' => t('Submit'), '$email' => array('email', t('Email Address:'), $email, ''), '$removeme' => t('Remove Account'), - '$removeaccount' => t('Remove this account from this server including all its channels'), - '$permanent' => t('Warning: This action is permanent and cannot be reversed.'), + '$removeaccount' => t('Remove this account including all its channels'), '$account_settings' => $account_settings )); return $o; @@ -1129,8 +1128,8 @@ function settings_content(&$a) { '$lbl_misc' => t('Miscellaneous Settings'), '$menus' => $menu, '$menu_desc' => t('Personal menu to display in your channel pages'), - '$removeme' => t('Remove this channel'), - '$permanent' => t('Warning: This action is permanent and cannot be reversed.'), + '$removeme' => t('Remove Channel'), + '$removechannel' => t('Remove this channel.'), )); call_hooks('settings_form',$o); -- cgit v1.2.3 From fb0f823be7142b715285ed8a2d18b98c240a630b Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Mar 2015 02:32:59 -0800 Subject: provide a list of potential addons and what they do for members who can't see the descriptions on the admin/plugins page Not all of these are in red-addons repository, please add any that haven't been listed. We should probably provide a list of addon repositories at the end. --- 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 6b1e5ab0a..7ee2dba9e 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -679,10 +679,11 @@ function settings_content(&$a) { '$form_security_token' => get_form_security_token("settings_featured"), '$title' => t('Feature/Addon Settings'), '$diaspora_enabled' => $diaspora_enabled, + '$dsprdesc' => t('Settings for the built-in Diaspora emulator'), '$pubcomments' => $pubcomments, '$dsprtitle' => t('Diaspora Policy Settings'), '$dsprhelp' => t('Allow any Diaspora member to comment on your public posts.'), - '$dsprhijack' => t('Prevent hashtags from being redirected to other sites'), + '$dsprhijack' => t('Prevent your hashtags from being redirected to other sites'), '$hijacking' => $hijacking, '$dsprsubmit' => t('Submit Diaspora Policy Settings'), '$settings_addons' => $settings_addons -- cgit v1.2.3 From beace0f57afa9ed6ea5c2896573d5083fe855fed Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 5 Mar 2015 10:20:49 +0100 Subject: more yes/no labels --- mod/settings.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 7ee2dba9e..59a4b1f42 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -572,7 +572,7 @@ function settings_content(&$a) { // return; // } - + $yes_no = array(t('No'),t('Yes')); if((argc() > 1) && (argv(1) === 'oauth')) { @@ -850,16 +850,16 @@ function settings_content(&$a) { '$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'), '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, ''), - '$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, ''), + '$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no), '$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, ''), - '$title_tosource' => array('title_tosource', t("Link post titles to source"), $title_tosource, ''), + '$nosmile' => array('nosmile', t("Don't show emoticons"), $nosmile, '', $yes_no), + '$title_tosource' => array('title_tosource', t("Link post titles to source"), $title_tosource, '', $yes_no), '$layout_editor' => t('System Page Layout Editor - (advanced)'), '$theme_config' => $theme_config, '$expert' => feature_enabled(local_channel(),'expert'), - '$channel_list_mode' => array('channel_list_mode', t('Use blog/list mode on channel page'), get_pconfig(local_channel(),'system','channel_list_mode'), t('(comments displayed separately)')), - '$network_list_mode' => array('network_list_mode', t('Use blog/list mode on matrix page'), get_pconfig(local_channel(),'system','network_list_mode'), t('(comments displayed separately)')), + '$channel_list_mode' => array('channel_list_mode', t('Use blog/list mode on channel page'), get_pconfig(local_channel(),'system','channel_list_mode'), t('(comments displayed separately)'), $yes_no), + '$network_list_mode' => array('network_list_mode', t('Use blog/list mode on matrix page'), get_pconfig(local_channel(),'system','network_list_mode'), t('(comments displayed separately)'), $yes_no), '$channel_divmore_height' => array('channel_divmore_height', t('Channel page max height of content (in pixels)'), ((get_pconfig(local_channel(),'system','channel_divmore_height')) ? get_pconfig(local_channel(),'system','channel_divmore_height') : 400), t('click to expand content exceeding this height')), '$network_divmore_height' => array('network_divmore_height', t('Matrix page max height of content (in pixels)'), ((get_pconfig(local_channel(),'system','network_divmore_height')) ? get_pconfig(local_channel(),'system','network_divmore_height') : 400) , t('click to expand content exceeding this height')), @@ -970,8 +970,6 @@ function settings_content(&$a) { $timezone = date_default_timezone_get(); - $yes_no = array(t('No'),t('Yes')); - $opt_tpl = get_markup_template("field_checkbox.tpl"); if(get_config('system','publish_all')) { $profile_in_dir = ''; -- cgit v1.2.3 From 3fa41231611872b79f33469ceec5a8af1a95294d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 5 Mar 2015 12:47:18 +0100 Subject: only allow theme selection forms if there are any themes to select --- 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 59a4b1f42..bb0bfacbd 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -848,8 +848,8 @@ function settings_content(&$a) { '$baseurl' => $a->get_baseurl(true), '$uid' => local_channel(), - '$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview'), - '$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, ''), + '$theme' => (($themes) ? array('theme', t('Display Theme:'), $theme_selected, '', $themes, 'preview') : false), + '$mobile_theme' => (($mobile_themes) ? array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, '') : false), '$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no), '$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')), -- cgit v1.2.3 From ea8ea5a351d36b3575c98ccb0dda58805186d154 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 5 Mar 2015 18:30:15 -0800 Subject: reverse the logic of "don't show emoticons" setting which seems awkward --- 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 bb0bfacbd..3dea83bb6 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -853,7 +853,7 @@ function settings_content(&$a) { '$user_scalable' => array('user_scalable', t("Enable user zoom on mobile devices"), $user_scalable, '', $yes_no), '$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, '', $yes_no), + '$nosmile' => array('nosmile', t("Show emoticons (smilies) as images"), 1-intval($nosmile), '', $yes_no), '$title_tosource' => array('title_tosource', t("Link post titles to source"), $title_tosource, '', $yes_no), '$layout_editor' => t('System Page Layout Editor - (advanced)'), '$theme_config' => $theme_config, -- cgit v1.2.3 From 73891dc5824f7495ce1103f826b88f3b8750f70f Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 6 Mar 2015 03:04:04 -0800 Subject: reverse smilie storage also --- 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 3dea83bb6..595878543 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -185,7 +185,7 @@ function settings_post(&$a) { set_pconfig(local_channel(),'system','user_scalable',$user_scalable); set_pconfig(local_channel(),'system','update_interval', $browser_update); set_pconfig(local_channel(),'system','itemspage', $itemspage); - set_pconfig(local_channel(),'system','no_smilies',$nosmile); + set_pconfig(local_channel(),'system','no_smilies',1-intval($nosmile)); set_pconfig(local_channel(),'system','title_tosource',$title_tosource); set_pconfig(local_channel(),'system','channel_list_mode', $channel_list_mode); set_pconfig(local_channel(),'system','network_list_mode', $network_list_mode); -- cgit v1.2.3 From 98dffd77efbad934a26fb4abee9b3e42eeb7b6d2 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 10 Mar 2015 02:23:14 -0700 Subject: channel delegation --- mod/settings.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 595878543..afc05f095 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -19,6 +19,9 @@ function settings_init(&$a) { if(! local_channel()) return; + if($_SESSION['delegate']) + return; + $a->profile_uid = local_channel(); // default is channel settings in the absence of other arguments @@ -39,6 +42,9 @@ function settings_post(&$a) { if(! local_channel()) return; + if($_SESSION['delegate']) + return; + $channel = $a->get_channel(); logger('mod_settings: ' . print_r($_REQUEST,true)); @@ -550,14 +556,14 @@ function settings_post(&$a) { } -if(! function_exists('settings_content')) { + function settings_content(&$a) { $o = ''; nav_set_selected('settings'); - if(! local_channel()) { + if((! local_channel()) || ($_SESSION['delegate'])) { notice( t('Permission denied.') . EOL ); return login(); } @@ -1137,5 +1143,5 @@ function settings_content(&$a) { return $o; } -}} +} -- cgit v1.2.3 From 844b2ae5873ea2e53bf284abe39ad7a19fe27256 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 10 Mar 2015 20:19:17 -0700 Subject: cleanup of old delegation stuff --- 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 afc05f095..8752a47b2 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -49,9 +49,6 @@ function settings_post(&$a) { logger('mod_settings: ' . print_r($_REQUEST,true)); - if(x($_SESSION,'submanage') && intval($_SESSION['submanage'])) - return; - if((argc() > 1) && (argv(1) === 'oauth') && x($_POST,'remove')){ check_form_security_token_redirectOnErr('/settings/oauth', 'settings_oauth'); @@ -573,11 +570,6 @@ function settings_content(&$a) { if($channel) head_set_icon($channel['xchan_photo_s']); -// if(x($_SESSION,'submanage') && intval($_SESSION['submanage'])) { -// notice( t('Permission denied.') . EOL ); -// return; -// } - $yes_no = array(t('No'),t('Yes')); if((argc() > 1) && (argv(1) === 'oauth')) { -- cgit v1.2.3 From 8113ee1c4aeb2b9586c1736c38faafce53dc8e53 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 12 Mar 2015 10:19:56 +0100 Subject: some work on feature/addon settings --- mod/settings.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'mod/settings.php') diff --git a/mod/settings.php b/mod/settings.php index 8752a47b2..c47d21d02 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -678,11 +678,9 @@ function settings_content(&$a) { '$title' => t('Feature/Addon Settings'), '$diaspora_enabled' => $diaspora_enabled, '$dsprdesc' => t('Settings for the built-in Diaspora emulator'), - '$pubcomments' => $pubcomments, + '$pubcomments' => array('dspr_pubcomment', t('Allow any Diaspora member to comment on your public posts'), $pubcomments, '', $yes_no), '$dsprtitle' => t('Diaspora Policy Settings'), - '$dsprhelp' => t('Allow any Diaspora member to comment on your public posts.'), - '$dsprhijack' => t('Prevent your hashtags from being redirected to other sites'), - '$hijacking' => $hijacking, + '$hijacking' => array('dspr_hijack', t('Prevent your hashtags from being redirected to other sites'), $hijacking, '', $yes_no), '$dsprsubmit' => t('Submit Diaspora Policy Settings'), '$settings_addons' => $settings_addons )); -- cgit v1.2.3 From d11bec6f584574ae6045e0fe09b544d920e53f2a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 12 Mar 2015 22:22:52 +0100 Subject: add generic_addon_settings template and minor fixes --- 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 c47d21d02..56949f9d4 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -681,7 +681,7 @@ function settings_content(&$a) { '$pubcomments' => array('dspr_pubcomment', t('Allow any Diaspora member to comment on your public posts'), $pubcomments, '', $yes_no), '$dsprtitle' => t('Diaspora Policy Settings'), '$hijacking' => array('dspr_hijack', t('Prevent your hashtags from being redirected to other sites'), $hijacking, '', $yes_no), - '$dsprsubmit' => t('Submit Diaspora Policy Settings'), + '$dsprsubmit' => t('Submit'), '$settings_addons' => $settings_addons )); return $o; -- cgit v1.2.3