diff options
author | Friendika <info@friendika.com> | 2011-06-06 21:28:11 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-06-06 21:28:11 -0700 |
commit | bbc65f98328cd0a4732af5a52bec586a868255ba (patch) | |
tree | 12dce6ef211d4fb218f532b6dbcffd9ea0fdc246 /mod | |
parent | 9f51233451ad6392b61083cf61f5670bcce9d935 (diff) | |
download | volse-hubzilla-bbc65f98328cd0a4732af5a52bec586a868255ba.tar.gz volse-hubzilla-bbc65f98328cd0a4732af5a52bec586a868255ba.tar.bz2 volse-hubzilla-bbc65f98328cd0a4732af5a52bec586a868255ba.zip |
prev/next links in calendar
Diffstat (limited to 'mod')
-rw-r--r-- | mod/events.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/mod/events.php b/mod/events.php index d280bc1ed..da076313a 100644 --- a/mod/events.php +++ b/mod/events.php @@ -120,7 +120,23 @@ function events_content(&$a) { if(! $m) $m = intval($thismonth); - + $nextyear = $y; + $nextmonth = $m + 1; + if($nextmonth > 12) { + $nextmonth = 1; + $nextyear ++; + } + + $prevyear = $y; + if($m > 1) + $prevmonth = $m - 1; + else { + $prevmonth = 12; + $prevyear --; + } + + + $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 .= cal($y,$m,false, ' eventcal'); $dim = get_dim($y,$m); |