aboutsummaryrefslogtreecommitdiffstats
path: root/functions/template.php
diff options
context:
space:
mode:
authordavef <davefd2@users.sourceforge.net>2005-05-06 19:04:06 +0000
committerdavef <davefd2@users.sourceforge.net>2005-05-06 19:04:06 +0000
commit6fadcb657a82f8b47189b766cdfdfa4f6f1806bb (patch)
treee087283f2bc5f3002b37c2bdf62a864cd77f7edb /functions/template.php
parent9e1e539ae3913ce939a9cb2c6f80fd6fcc27f342 (diff)
downloadphpicalendar-6fadcb657a82f8b47189b766cdfdfa4f6f1806bb.tar.gz
phpicalendar-6fadcb657a82f8b47189b766cdfdfa4f6f1806bb.tar.bz2
phpicalendar-6fadcb657a82f8b47189b766cdfdfa4f6f1806bb.zip
Minor feature addition that makes the minical titles links to the month/year calendar as appropriate.
Diffstat (limited to 'functions/template.php')
-rw-r--r--functions/template.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/functions/template.php b/functions/template.php
index 945e87d..f3d3074 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -845,6 +845,15 @@ class Page {
$fake_getdate_time = strtotime($this_year.'-'.$offset.'-15');
}
+ $minical_month = date("m", $fake_getdate_time);
+ $minical_year = date("Y", $fake_getdate_time);
+ $first_of_month = $minical_year.$minical_month."01";
+ $first_of_year = $minical_year."0101";
+
+ // Add links in to the month/year views.
+ $dateFormat_month = str_replace("%B", "<a class=\"ps3\" href=\"month.php?cal=$cal&amp;getdate=$first_of_month\">%B</a>", $dateFormat_month);
+ $dateFormat_month = str_replace("%Y", "<a class=\"ps3\" href=\"year.php?cal=$cal&amp;getdate=$first_of_year\">%Y</a>", $dateFormat_month);
+
//$start_day = strtotime($week_start_day);
$start_day = strtotime(dateOfWeek($getdate, $week_start_day));
$month_title = localizeDate ($dateFormat_month, $fake_getdate_time);
@@ -866,9 +875,6 @@ class Page {
$weekday_loop .= $loop_tmp;
}
- $minical_month = date("m", $fake_getdate_time);
- $minical_year = date("Y", $fake_getdate_time);
- $first_of_month = $minical_year.$minical_month."01";
$start_day = strtotime(dateOfWeek($first_of_month, $week_start_day));
$i = 0;
$whole_month = TRUE;

© 2014-2024 Faster IT GmbH | imprint | privacy policy