diff options
author | Friendika <info@friendika.com> | 2011-06-13 20:32:30 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-06-13 20:32:30 -0700 |
commit | fb92dbf5d683c3d92a76216c09d23e338c7d3341 (patch) | |
tree | 9b405b273b1ec779074609ded358a8c0ecc20a10 /mod | |
parent | d5fdd4287dec00adcb08e389385b1ecbc23cca6a (diff) | |
download | volse-hubzilla-fb92dbf5d683c3d92a76216c09d23e338c7d3341.tar.gz volse-hubzilla-fb92dbf5d683c3d92a76216c09d23e338c7d3341.tar.bz2 volse-hubzilla-fb92dbf5d683c3d92a76216c09d23e338c7d3341.zip |
link events + personal notes to profile tabs
Diffstat (limited to 'mod')
-rw-r--r-- | mod/apps.php | 14 | ||||
-rw-r--r-- | mod/events.php | 17 | ||||
-rw-r--r-- | mod/notes.php | 2 | ||||
-rw-r--r-- | mod/profile.php | 4 |
4 files changed, 22 insertions, 15 deletions
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 .= '<h3>' . t('Applications') . '</h3>'; - $apps = false; - - if(local_user()) { - $apps = true; - $o .= '<div class="app-title"><a href="notes">' . t('Private Notes') . '</a></div>'; - } - - 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 .= '<div id="new-event-link"><a href="' . $a->get_baseurl() . '/events/new' . '" >' . t('Create New Event') . '</a></div>'; - $o .= '<a href="' . $a->get_baseurl() . '/events/' . $prevyear . '/' . $prevmonth . '" class="prevcal">' . t('<< Previous') . '</a> | <a href="' . $a->get_baseurl() . '/events/' . $nextyear . '/' . $nextmonth . '" class="nextcal">' . t('Next >>') . '</a>'; + $o .= '<div id="event-calendar-wrapper">'; + + $o .= '<a href="' . $a->get_baseurl() . '/events/' . $prevyear . '/' . $prevmonth . '" class="prevcal"><div id="event-calendar-prev" class="icon prev" title="' . t('Previous') . '"></div></a>'; $o .= cal($y,$m,false, ' eventcal'); + $o .= '<a href="' . $a->get_baseurl() . '/events/' . $nextyear . '/' . $nextmonth . '" class="nextcal"><div id="event-calendar-next" class="icon next" title="' . t('Next') . '"></div></a>'; + $o .= '</div>'; + $o .= '<div class="event-calendar-end"></div>'; + $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 .= '<h3>' . t('Private Notes') . '</h3>'; + $o .= '<h3>' . t('Personal Notes') . '</h3>'; $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) ? '<a href="events" id="profile-tab-events-link" class="profile-tabs" >' . t('Events') . '</a>' : ''), + '$notes' => (($is_owner) ? '<a href="notes" id="profile-tab-notes-link" class="profile-tabs" >' . t('Personal Notes') . '</a>' : '') )); |