1
0
Fork 0

implement a public calendar for vistors of someones profile page

This commit is contained in:
rabuzarus 2016-06-19 22:04:34 +02:00
commit 7495a34b32
10 changed files with 542 additions and 141 deletions

View file

@ -740,8 +740,8 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
),
);
if ($is_owner){
if ($a->theme_events_in_profile)
// the calendar link for the full featured events calendar
if ($is_owner && $a->theme_events_in_profile) {
$tabs[] = array(
'label' => t('Events'),
'url' => $a->get_baseurl() . '/events',
@ -750,6 +750,20 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
'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) {
$tabs[] = array(
'label' => t('Events'),
'url' => $a->get_baseurl() . '/cal/' . $nickname,
'sel' =>((!isset($tab)&&$a->argv[0]=='cal')?'active':''),
'title' => t('Events and Calendar'),
'id' => 'events-tab',
'accesskey' => 'e',
);
}
if ($is_owner){
$tabs[] = array(
'label' => t('Personal Notes'),
'url' => $a->get_baseurl() . '/notes',