I'd love to have this module integrated with the Calendar module. My php knowledge is unfortunately not enough to make any code work myself, but I'd love to assist in any way possible.

However, there hasn't been much activity on this module for a long time. Is it still maintained?

Comments

marcushenningsen’s picture

I just implemented this with the calendar module. I wanted to show a left border with a color dependant on taxonomy term.

From the calendar module I copied calendar-month-node.tpl.php from the theme folder. Then I added changed the markup to look like this:

<div class="view-item view-item-<?php print $view->name ?>">
  <div class="calendar monthview" id="<?php print $node->date_id ?>">
    <?php 
      $node = node_load($node->nid);
      print '<div class="stripe-event_color" style="margin:0px 2px; padding:2px; border-left: 5px solid; border-color:'.node_color_get_color($node).';">'; 
    ?>
    <?php foreach ($fields as $field): ?>
      <div id="<?php print $field['id']; ?>" class="view-field view-data-<?php print $field['id'] ?>">
        <?php if ($field['label']): ?>
          <div class="view-label-<?php print $field['id'] ?>"><?php print $field['label'] ?></div>
        <?php endif; ?>
        <?php print $field['data']; ?>
      </div>
    <?php endforeach; ?>
    </div>
  </div>
</div>

Clear your cashes, and colors should show up on the month view. I suppose this would work for colors based on node type, too. If you want colors on your week view, you need to edit the calendar-week-node.tpl.php. I hope this helps, feel free to ask.

Marcus

asinnema’s picture

Hi Marcus,

this was a big help - however, how do I change the code to use the taxonomy color, instead of the node color? Any help would be appreciated :)