I love this module however it shows too much whitespace between items on the list of uncoming events block. I have tried everything and can not get this to display correctly- the block is on my right hand column and it take up way to much space. How can I change this?

Comments

gerhard killesreiter’s picture

I am guessing you can try some CSS to change this. Unfortunately, I am no CSS guru.

Morn’s picture

One way is to add and customize (according to your needs) following function in the file template.php of your actual Theme.
The functions from event.theme defined here override the original functions. In this case the original is found in the event module directory in the file event.theme at line 467 :

function theme_event_upcoming_item($node, $types = array()) {
  $output = l($node->title, "node/$node->nid", array('attributes' => array('title' => $node->title)));
  if (count($types) > 1) {
    $output .= '<span class="event-nodetype">('. $node->event['node_type'] .')</span>';
  }
  $output .= '<span class="event-timeleft">('. $node->event['timeleft'] .')</span>';
  return $output;
}

Instead of theme_event_upcoming_item call the function phptemplate_event_upcoming_item
For example I used:

function phptemplate_event_upcoming_item($node, $types = array()) {
  $output = '<table style="table-layout:fixed" class="vtad"><tr><td class="vtad" style="width:50%; border:thin solid">';
  $output .= l($node->title, "node/$node->nid", array('attributes' => array('title' => $node->title)));
  $output .= '</td>';
  $output .= '<td style="width:36%; border:thin solid">&nbsp;'. $node->event['timeleft'] .',&nbsp;';
  $output .= 'am &nbsp;'. event_format_date($node->event_start, 'custom', 'd. F Y') .'</td>';
  if (count($types) > 1) {
    $output .= '<td style="width:10%; border:thin solid">'. $node->event['node_type'] .'</td>';
  }
  $output .= '</tr></table>';
  return $output;
}
Morn’s picture

Status: Active » Closed (fixed)