It possible, but will require some custom coding (probably an UDT or two). I had to do a weekly calendar for a restaurant that had special events, and used LISE as a event tracker. I recon the monthly calendar won't differ much, so I'll post some of the logic I used and you can adapt to you needs.
1. I used an array to store the unix timestamps of both start and end of each week day by playing with php strtotime. You'd probably have to do the same for each month as the logic won't different much, but here is what I've done for each day of the week:
Code: Select all
$week = [
1 => [strtotime( 'monday this week'), strtotime('+1 day', strtotime('monday this week') ) - 1 ],
2 => [strtotime( 'tuesday this week'), strtotime('+1 day', strtotime('tuesday this week') ) - 1 ],
3 => [strtotime( 'wednesday this week'), strtotime('+1 day', strtotime('wednesday this week') ) - 1 ],
4 => [strtotime( 'thursday this week'), strtotime('+1 day', strtotime('thursday this week') ) - 1 ],
5 => [strtotime( 'friday this week' ), strtotime('+1 day', strtotime('friday this week') ) - 1 ],
6 => [strtotime( 'saturday this week'), strtotime('+1 day', strtotime('saturday this week') ) - 1 ],
7 => [strtotime( 'sunday this week' ), strtotime('+1 day', strtotime('sunday this week') ) - 1 ]
];
$smarty->assign('week', $week);
Having that will allow you to check if the month is current, in the past or in the future. Only show events from that month on with a simple template logic.
2. Inside a custom summary template for LISEEvents I'd check for the dates of each event to see if have expired or not (still, best to work with unix timestamps as the math is more workable).
3. All this will be easier to manage if that custom template for LISEEvents only has smarty logic and no html at all, so that it can return just an array of items, which can be empty thus allowing you not to show a month if no events exist.
4. That will mean that all the html will be in the categories template.
This is just an idea, as the implementation is possible but will need some planning. There are surely other ways to do it but this is the way I'd go about doing it. I just wouldn't use categories for the months as these can have other uses, but it should work as is anyway. as strtotime is very clever in the way it interprets English it allows for quite a bit of versatility in getting the correct timestamps to the second. Just as a note:
strtotime('+1 day', strtotime('sunday this week') ) - 1 is
next day - 1 second to give the end of the day. You should be able to use the same logic to get the timestamp for the end of each month.
HTH