aboutsummaryrefslogtreecommitdiffstats
path: root/mod/events.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-13 20:32:30 -0700
committerFriendika <info@friendika.com>2011-06-13 20:32:30 -0700
commitfb92dbf5d683c3d92a76216c09d23e338c7d3341 (patch)
tree9b405b273b1ec779074609ded358a8c0ecc20a10 /mod/events.php
parentd5fdd4287dec00adcb08e389385b1ecbc23cca6a (diff)
downloadvolse-hubzilla-fb92dbf5d683c3d92a76216c09d23e338c7d3341.tar.gz
volse-hubzilla-fb92dbf5d683c3d92a76216c09d23e338c7d3341.tar.bz2
volse-hubzilla-fb92dbf5d683c3d92a76216c09d23e338c7d3341.zip
link events + personal notes to profile tabs
Diffstat (limited to 'mod/events.php')
-rw-r--r--mod/events.php17
1 files changed, 16 insertions, 1 deletions
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('&lt;&lt; Previous') . '</a> | <a href="' . $a->get_baseurl() . '/events/' . $nextyear . '/' . $nextmonth . '" class="nextcal">' . t('Next &gt;&gt;') . '</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);