Here is an image of the Important events layout before any changes were made:
Here is PHP code (this example is also on the PHP Calendar website) to generate a month view for the current month (May 2007 at the time of this post):
<?
// Get current month calendar view
include('calendar.php');
$c = new Calendar;
echo $c->getCurrentMonthView();
?>
This code produces the resulting HTML:
One nice feature of this calendar is the ability to set a link for a given day in the month. I used this feature to connect my personal events to the calendar. Here is an example of setting a link on the full year calendar for January 1, 2007:
<?
include('calendar.php');
class MyCalendar extends Calendar
{
function getDateLink($day, $month, $year)
{
// link January 1 of the current year
$link = "";
if ($day == 1 && $month == 1)
$link = "myLink.php";
return $link;
}
}
$c = new MyCalendar;
echo $c->getCurrentYearView();
?>
Here is the HTML output of the above code:
This is the final version of my Important events website section: