I just noticed the same problem with 2 different websites! To test it, I setup a clean "test" install of CMSms 1.6.6 and downloaded both CGCalendar and the old Calendar module, entered 4 events (2 for each category) in each module, then checked the results.
Sure enough, CGCalendar reverted back to ALL categories when the next/prev month arrows were clicked, while the old Calendar worked correctly, showing only the category listed in the module call.
I'm sure there's a "smarty" way to fix CGCalendar, but until I figure it out, I guess I'll have to downgrade our sites to the older Calendar module. Rats!
CGCalendar reverts back to all catorgories
-
- Forum Members
- Posts: 23
- Joined: Sun Aug 17, 2008 6:41 pm
Re: CGCalendar reverts back to all catorgories
I have the same problem going on. The only fix I found anywhere on the site here was to add inline='1' and that didn't seem to work.
I got it sorted by editing the module and adding a line or 2 to function.displaycalendar.php
Essentially I added this:
if($category) {
$parms['category'] = $category;
}
Below the section where the params are set to create the next and previous links:
$parms = array();
$parms['use_session'] = $use_session;
$parms['year'] = $next_month['year'];
$parms['month'] = $next_month['month'];
and before the actual links are made.
I am not comfortable editing the core files of the module like this and it is not a smart way to solve the problem. It is not tested. If this is a bug in the module however and the fix makes sense to the module developers perhaps it could be added?
I got it sorted by editing the module and adding a line or 2 to function.displaycalendar.php
Essentially I added this:
if($category) {
$parms['category'] = $category;
}
Below the section where the params are set to create the next and previous links:
$parms = array();
$parms['use_session'] = $use_session;
$parms['year'] = $next_month['year'];
$parms['month'] = $next_month['month'];
and before the actual links are made.
I am not comfortable editing the core files of the module like this and it is not a smart way to solve the problem. It is not tested. If this is a bug in the module however and the fix makes sense to the module developers perhaps it could be added?