Buttons for prev/next month would be useful in the minicalendar.

Comments

kyber’s picture

Well, since I accidently duped this in node 4537, will ask the additional question I posted there, here. Is it possible that event and archive calendars could be rendered in the same way using some generic calendar method? Possibly even using a default identical stylesheet? (module overriddable of course).

chrish-1’s picture

hmmm - a generic solution would indeed be good. However, in the absense of that we've patched the 4.3.0 event.module such that it's mini-cal is identical to the archive mini-cal, both rendering via x-template.css.

And yes ... both have prev/next not least to address the fact that you can set blog dates in the future so next on archive is a good thing.

Happy to receive suggestions as to the best way to share this.

kyber’s picture

I've updated twice since you reported this as backported into 4.3.0 - no change in minical yet, although it is clear the tar.gz has been modified a few times.
Am I missing something?

anj’s picture

This might not help, as I'm using Drupal 4.4.1 with modules from the cvs repository, but here goes.

I got the functionality I think you mean by a very minimal change to event.module. Line 65 in function event_block is changed from

          $block['content'] = event_display('event_calendar_simple', $year, $month, $day );

to

          $block['content'] = event_display('event_calendar_simple', $year, $month, $day, 1);

Also, to make the calendar a bit easier to use, I changed line 690 in function event_display from

    array('class' => 'heading', 'colspan' => 5, 'data' => t(_event_date('F', $date)) .' '. _event_date('Y', $date)), 

to

    array('class' => 'heading', 'colspan' => 5, 'data' => l(t(_event_date('F', $date)) .' '. _event_date('Y', $date), "event/$year/$month")),

So that the 'Month Year' title at the top of the calendar will take you to the summary page for that month.

Hope that helps.

crh’s picture

beardedstoat's fixes worked for me.

I think both of the changes provided would be best handled as configuration options. I find I don't actually like the next/prev links (since they don't change the month of the minicalendar, they simply bring up the full calendar for the given month).

In any case, thanks for the fixes.

killes@www.drop.org’s picture

fixed in cvs.

Anonymous’s picture