From fb92dbf5d683c3d92a76216c09d23e338c7d3341 Mon Sep 17 00:00:00 2001 From: Friendika Date: Mon, 13 Jun 2011 20:32:30 -0700 Subject: link events + personal notes to profile tabs --- mod/apps.php | 14 ++------------ mod/events.php | 17 ++++++++++++++++- mod/notes.php | 2 +- mod/profile.php | 4 +++- 4 files changed, 22 insertions(+), 15 deletions(-) (limited to 'mod') diff --git a/mod/apps.php b/mod/apps.php index f25722df7..7a0a3f59e 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -5,19 +5,9 @@ function apps_content(&$a) { $o .= '

' . t('Applications') . '

'; - $apps = false; - - if(local_user()) { - $apps = true; - $o .= '
' . t('Private Notes') . '
'; - } - - if($a->apps) { - $apps = true; + if($a->apps) $o .= $a->apps; - } - - if(! $apps) + else notice( t('No installed applications.') . EOL); return $o; diff --git a/mod/events.php b/mod/events.php index a4809607c..1418a7549 100644 --- a/mod/events.php +++ b/mod/events.php @@ -130,6 +130,14 @@ function events_content(&$a) { if(! $m) $m = intval($thismonth); + // Put some limits on dates. The PHP date functions don't seem to do so well before 1900. + // An upper limit was chosen to keep search engines from exploring links endlessly. + + if($y < 1901) + $y = 1900; + if($y > 2099) + $y = 2100; + $nextyear = $y; $nextmonth = $m + 1; if($nextmonth > 12) { @@ -144,11 +152,18 @@ function events_content(&$a) { $prevmonth = 12; $prevyear --; } + $o .= ''; - $o .= '' . t('<< Previous') . ' | ' . t('Next >>') . ''; + $o .= '
'; + + $o .= ''; $o .= cal($y,$m,false, ' eventcal'); + $o .= ''; + $o .= '
'; + $o .= '
'; + $dim = get_dim($y,$m); $start = sprintf('%d-%d-%d %d:%d:%d',$y,$m,1,0,0,0); $finish = sprintf('%d-%d-%d %d:%d:%d',$y,$m,$dim,23,59,59); diff --git a/mod/notes.php b/mod/notes.php index 7a826bf61..0f980ff67 100644 --- a/mod/notes.php +++ b/mod/notes.php @@ -38,7 +38,7 @@ function notes_content(&$a) { $is_owner = true; - $o .= '

' . t('Private Notes') . '

'; + $o .= '

' . t('Personal Notes') . '

'; $commpage = false; $commvisitor = false; diff --git a/mod/profile.php b/mod/profile.php index 7dfdb49de..aeb21f077 100644 --- a/mod/profile.php +++ b/mod/profile.php @@ -115,7 +115,9 @@ function profile_content(&$a, $update = 0) { '$phototab' => $a->get_baseurl() . '/photos/' . $a->profile['nickname'], '$status' => t('Status'), '$profile' => t('Profile'), - '$photos' => t('Photos') + '$photos' => t('Photos'), + '$events' => (($is_owner) ? '' . t('Events') . '' : ''), + '$notes' => (($is_owner) ? '' . t('Personal Notes') . '' : '') )); -- cgit v1.2.3