X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FBaseProfile.php;h=b196d91c391bae0e72bdcc8cfc6ceb8cc88c72a9;hb=3bca4fe2a64671d09e08346456cdfa6c12f996e9;hp=832c8fd2f8928e53881f845159dc20ed5b2ed4a9;hpb=53ce1a87558b877beabaa257cbeb4c5496eb7564;p=friendica.git diff --git a/src/Module/BaseProfile.php b/src/Module/BaseProfile.php index 832c8fd2f8..b196d91c39 100644 --- a/src/Module/BaseProfile.php +++ b/src/Module/BaseProfile.php @@ -1,6 +1,6 @@ 'r', ], [ - 'label' => DI::l10n()->t('Status'), - 'url' => $baseProfileUrl . '/status', + 'label' => DI::l10n()->t('Conversations'), + 'url' => $baseProfileUrl . '/conversations', 'sel' => $current == 'status' ? 'active' : '', - 'title' => DI::l10n()->t('Status Messages and Posts'), + 'title' => DI::l10n()->t('Conversations started'), 'id' => 'status-tab', 'accesskey' => 'm', ], [ 'label' => DI::l10n()->t('Photos'), - 'url' => DI::baseUrl() . '/photos/' . $nickname, + 'url' => $baseProfileUrl . '/photos', 'sel' => $current == 'photos' ? 'active' : '', 'title' => DI::l10n()->t('Photo Albums'), 'id' => 'photo-tab', 'accesskey' => 'h', ], -// @todo Currently deactivated since it doesn't really work -// [ -// 'label' => DI::l10n()->t('Videos'), -// 'url' => DI::baseUrl() . '/videos/' . $nickname, -// 'sel' => $current == 'videos' ? 'active' : '', -// 'title' => DI::l10n()->t('Videos'), -// 'id' => 'video-tab', -// 'accesskey' => 'v', -// ], + [ + 'label' => DI::l10n()->t('Media'), + 'url' => $baseProfileUrl . '/media', + 'sel' => $current == 'media' ? 'active' : '', + 'title' => DI::l10n()->t('Media'), + 'id' => 'media-tab', + 'accesskey' => 'd', + ], ]; - // the calendar link for the full featured events calendar - if ($is_owner && $a->getThemeInfoValue('events_in_profile')) { - $tabs[] = [ - 'label' => DI::l10n()->t('Events'), - 'url' => DI::baseUrl() . '/events', - 'sel' => $current == 'events' ? 'active' : '', - 'title' => DI::l10n()->t('Events and Calendar'), - 'id' => 'events-tab', - 'accesskey' => 'e', - ]; - // if the user is not the owner of the calendar we only show a calendar - // with the public events of the calendar owner - } elseif (!$is_owner) { + // the calendar link for the full-featured events calendar + if ($is_owner) { $tabs[] = [ - 'label' => DI::l10n()->t('Events'), - 'url' => DI::baseUrl() . '/cal/' . $nickname, - 'sel' => $current == 'cal' ? 'active' : '', - 'title' => DI::l10n()->t('Events and Calendar'), - 'id' => 'events-tab', - 'accesskey' => 'e', + 'label' => DI::l10n()->t('Calendar'), + 'url' => DI::baseUrl() . '/calendar', + 'sel' => $current == 'calendar' ? 'active' : '', + 'title' => DI::l10n()->t('Calendar'), + 'id' => 'calendar-tab', + 'accesskey' => 'c', ]; + } else { + $owner = User::getByNickname($nickname, ['uid']); + if(DI::userSession()->isAuthenticated() || $owner && Feature::isEnabled($owner['uid'], 'public_calendar')) { + $tabs[] = [ + 'label' => DI::l10n()->t('Calendar'), + 'url' => DI::baseUrl() . '/calendar/show/' . $nickname, + 'sel' => $current == 'calendar' ? 'active' : '', + 'title' => DI::l10n()->t('Calendar'), + 'id' => 'calendar-tab', + 'accesskey' => 'c', + ]; + } } if ($is_owner) { @@ -123,7 +122,7 @@ class BaseProfile extends BaseModule ]; } - if (empty($profile['hide-friends'])) { + if (!$hide_friends) { $tabs[] = [ 'label' => DI::l10n()->t('Contacts'), 'url' => $baseProfileUrl . '/contacts',