You can easily insert a calendar onto the page using calendar scripts written in PHP.
To insert a calendar highlighting the current date:
<?
@include $_SERVER['DOCUMENT_ROOT'] . '/.calendar/calendardisplay.php';
?>
|
November 2009
|
||||||
Su |
Mo |
Tu |
We |
Th |
Fr |
Sa |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
|
|
|
|
|
By default, the calendar displays the current month of the current year and with the current date highlighted as above. You can change the highlighted date and customize other features of the displayed calendar.
The example below displays the fixed date for June 21, 2003 rather than the current date.
<?
@include 'http://' . $_SERVER['HTTP_HOST'] . '/.calendar/calendardisplay.php?yr=2003&mo=6&mrks=2003-06-21&nt=1';
?>
|
June 2003
|
||||||
Su |
Mo |
Tu |
We |
Th |
Fr |
Sa |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
|
|
|
|
|
To learn the syntax for customizing calendars, see Easy PHP Calendar.
Because calendars take up the full width of the column they're in, we almost always use them only in column 2 of a 2-column layout.
To link to an offsite calendar showing a full year, use the calendaryear function. The example below displays links to calendar years for the current year and the year after. The calendar link appears as both a graphic link -- a thumbnail image of a full calendar year -- and accompanying text links.
<h3>Full Year Calendars</h3>
<?
@include $_SERVER['DOCUMENT_ROOT'] . '/.includes/yearlycalendar.php';
calendaryear( date('Y') );
calendaryear( date('Y') + 1 );
?>
|
|
Year 2009 Calendar
|
|
|
Year 2010 Calendar
|
Examples of using calendars:
Go To: Visual Design or Style Guide