You are here

function theme_event_nodeapi in Event 5

Same name and namespace in other branches
  1. 5.2 event.theme \theme_event_nodeapi()

Format an date value for a nodeapi insert

Parameters

node: The node which needs it's dates formatted

1 theme call to theme_event_nodeapi()
event_nodeapi in ./event.module
hook_nodeapi implementation

File

./event.theme, line 379

Code

function theme_event_nodeapi($node) {
  $output = '<div class="event-nodeapi"><div class="' . $node->type . '-start"><label>' . t('Start: ') . '</label>' . $node->start_format . '</div></div>' . "\n";
  if ($node->event_start != $node->event_end) {
    $output .= '<div class="event-nodeapi"><div class="' . $node->type . '-end"><label>' . t('End: ') . '</label>' . $node->end_format . '</div></div>' . "\n";
  }
  if (variable_get('configurable_timezones', 1)) {
    include_once EVENT_PATH . '/event_timezones.inc';
    $zones = event_zonelist();
    $output .= '<div class="event-nodeapi"><div class="' . $node->type . '-tz"><label>' . t('Timezone: ') . '</label>' . $zones[$node->timezone] . '</div></div>' . "\n";
  }
  return $output;
}