]> git.mxchange.org Git - friendica.git/commitdiff
Improved descriptions, improved tab behaviour
authorMichael <heluecht@pirati.ca>
Thu, 4 Jan 2018 14:22:04 +0000 (14:22 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 4 Jan 2018 14:22:04 +0000 (14:22 +0000)
mod/admin.php
mod/community.php

index f9cd9c25b10d71e1e220eb2d1f8b6dca7926cf51..0b44fbd6a85db8667c4cd6de11c7bcc5f9869845 100644 (file)
@@ -1176,8 +1176,8 @@ function admin_page_site(App $a)
        $community_page_style_choices = array(
                CP_NO_COMMUNITY_PAGE => t("No community page"),
                CP_USERS_ON_SERVER => t("Public postings from users of this site"),
-               CP_GLOBAL_COMMUNITY => t("Global community page"),
-               CP_USERS_AND_GLOBAL => t("Public user postings and global postings")
+               CP_GLOBAL_COMMUNITY => t("Public postings from the federated network"),
+               CP_USERS_AND_GLOBAL => t("Public postings from local users and the federated network")
        );
 
        /* OStatus conversation poll choices */
@@ -1312,7 +1312,7 @@ function admin_page_site(App $a)
                '$no_multi_reg'         => array('no_multi_reg', t("Block multiple registrations"),  Config::get('system','block_extended_register'), t("Disallow users to register additional accounts for use as pages.")),
                '$no_openid'            => array('no_openid', t("OpenID support"), !Config::get('system','no_openid'), t("OpenID support for registration and logins.")),
                '$no_regfullname'       => array('no_regfullname', t("Fullname check"), !Config::get('system','no_regfullname'), t("Force users to register with a space between firstname and lastname in Full name, as an antispam measure")),
-               '$community_page_style' => array('community_page_style', t("Community pages for visitors"), Config::get('system','community_page_style'), t("Which community pages should be shown to visitors. Local users always see both pages. 'Global community' shows every public posting from an open distributed network that arrived on this server."), $community_page_style_choices),
+               '$community_page_style' => array('community_page_style', t("Community pages for visitors"), Config::get('system','community_page_style'), t("Which community pages should be available for visitors. Local users always see both pages."), $community_page_style_choices),
                '$max_author_posts_community_page' => array('max_author_posts_community_page', t("Posts per user on community page"), Config::get('system','max_author_posts_community_page'), t("The maximum number of posts per user on the community page. (Not valid for 'Global Community')")),
                '$ostatus_disabled'     => array('ostatus_disabled', t("Enable OStatus support"), !Config::get('system','ostatus_disabled'), t("Provide built-in OStatus \x28StatusNet, GNU Social etc.\x29 compatibility. All communications in OStatus are public, so privacy warnings will be occasionally displayed.")),
                '$ostatus_full_threads' => array('ostatus_full_threads', t("Only import OStatus threads from our contacts"), Config::get('system','ostatus_full_threads'), t("Normally we import every content from our OStatus contacts. With this option we only store threads that are started by a contact that is known on our system.")),
index 1451593449b2c4b05d14db7d5663ca38629c6f5a..00c4ada4e248ade841260eef67754e17de375f60 100644 (file)
@@ -59,19 +59,23 @@ function community_content(App $a, $update = 0) {
        if (!$update) {
                $tabs = [];
 
-               $tabs[] = array('label'=>t('Community'),
-                               'url' => 'community/local',
-                               'sel' => $content == 'local' ? 'active' : '',
-                               'title' => t('Posts from local users on this server'),
-                               'id' => 'community-local-tab',
-                               'accesskey' => 'l');
-
-               $tabs[] = array('label' => t('Global Timeline'),
-                               'url' => 'community/global',
-                               'sel' => $content == 'global' ? 'active' : '',
-                               'title' => t('Posts from users of the federated network'),
-                               'id'    => 'community-global-tab',
-                               'accesskey' => 'g');
+               if (local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_USERS_ON_SERVER])) {
+                       $tabs[] = array('label'=>t('Community'),
+                                       'url' => 'community/local',
+                                       'sel' => $content == 'local' ? 'active' : '',
+                                       'title' => t('Posts from local users on this server'),
+                                       'id' => 'community-local-tab',
+                                       'accesskey' => 'l');
+               }
+
+               if (local_user() || in_array($page_style, [CP_USERS_AND_GLOBAL, CP_GLOBAL_COMMUNITY])) {
+                       $tabs[] = array('label' => t('Global Timeline'),
+                                       'url' => 'community/global',
+                                       'sel' => $content == 'global' ? 'active' : '',
+                                       'title' => t('Posts from users of the federated network'),
+                                       'id'    => 'community-global-tab',
+                                       'accesskey' => 'g');
+               }
 
                $tab_tpl = get_markup_template('common_tabs.tpl');
                $o .= replace_macros($tab_tpl, array('$tabs' => $tabs));