memobug
08-11-2003, 07:42 AM
I have cobbled together a different version of calendar.php that will print an arbitrary number of events in list form, which I am using on my home page. http://www.bonsaitalk.com
It looks ahead up to two months to find up to a specific number of events and displays them in a simple list.
You can see the result in the left margin of http://www.bonsaiTALK.com, just under the weather
I'm not sure something like this would be of interest? Comments on the idea or the printout would be appreciated.
Some notes on the implementation:
1. Installation: I created a standalone "smallcal.php" with essential code from calendar.php, together with minor modifications, and two new templates for the calendar and event.
2. Template mods: Because the relative links for my subdomain paths are different, I had to make minor modifications on two other calendar templates to refer to the events by absolute address.
3. smallcal.php contains a variable $maxevents that can be set to an arbitrary number (5 - 10, 20) and the calendar list will be limited to that number of events. It can look at the next two months to get them, not beyond. Also, if the final event occurs on a day with other events, those events will also be printed, even if it takes the total over $maxevents. This could probably be corrected, but I don't mind it.
4. I don't print birthdays, but it can print public/private events.
Regards,
Matt
It looks ahead up to two months to find up to a specific number of events and displays them in a simple list.
You can see the result in the left margin of http://www.bonsaiTALK.com, just under the weather
I'm not sure something like this would be of interest? Comments on the idea or the printout would be appreciated.
Some notes on the implementation:
1. Installation: I created a standalone "smallcal.php" with essential code from calendar.php, together with minor modifications, and two new templates for the calendar and event.
2. Template mods: Because the relative links for my subdomain paths are different, I had to make minor modifications on two other calendar templates to refer to the events by absolute address.
3. smallcal.php contains a variable $maxevents that can be set to an arbitrary number (5 - 10, 20) and the calendar list will be limited to that number of events. It can look at the next two months to get them, not beyond. Also, if the final event occurs on a day with other events, those events will also be printed, even if it takes the total over $maxevents. This could probably be corrected, but I don't mind it.
4. I don't print birthdays, but it can print public/private events.
Regards,
Matt