'; } /** * Return a themed breadcrumb trail. * * @param $breadcrumb * An array containing the breadcrumb links. * @return a string containing the breadcrumb output. */ function phptemplate_breadcrumb($breadcrumb) { if (!empty($breadcrumb)) { return ''; } } /** * Allow themable wrapping of all comments. */ function phptemplate_comment_wrapper($content, $type = null) { static $node_type; if (isset($type)) $node_type = $type; if (!$content || $node_type == 'forum') { return '
'. $content . '
'; } else { return '

'. t('Comments') .'

'. $content .'
'; } } /** * Override or insert PHPTemplate variables into the templates. */ function phptemplate_preprocess_page(&$vars) { $vars['tabs2'] = menu_secondary_local_tasks(); // Hook into color.module if (module_exists('color')) { _color_page_alter($vars); } } /** * Returns the rendered local tasks. The default implementation renders * them as tabs. Overridden to split the secondary tasks. * * @ingroup themeable */ function phptemplate_menu_local_tasks() { return menu_primary_local_tasks(); } function phptemplate_comment_submitted($comment) { return t('!datetime — !username', array( '!username' => theme('username', $comment), '!datetime' => format_date($comment->timestamp) )); } function phptemplate_node_submitted($node) { return t('!datetime — !username', array( '!username' => theme('username', $node), '!datetime' => format_date($node->created), )); } /* * theme_table($header, $rows, $attributes = array(), $caption = NULL) * includes/theme.inc, line 757 * we modify this to give each table a class and to wrap it into a div * thus we can add "overflow: auto" to show scrollbars */ function phptemplate_table($header, $rows, $attributes = array(), $caption = NULL) { $output = '
'; $output .= '\n"; if (isset($caption)) { $output .= ''. $caption ."\n"; } // Format the table header: if (count($header)) { $ts = tablesort_init($header); $output .= ' '; foreach ($header as $cell) { $cell = tablesort_header($cell, $header, $ts); $output .= _theme_table_cell($cell, TRUE); } $output .= " \n"; } // Format the table rows: $output .= "\n"; if (count($rows)) { $flip = array('even' => 'odd', 'odd' => 'even'); $class = 'even'; foreach ($rows as $number => $row) { $attributes = array(); // Check if we're dealing with a simple or complex row if (isset($row['data'])) { foreach ($row as $key => $value) { if ($key == 'data') { $cells = $value; } else { $attributes[$key] = $value; } } } else { $cells = $row; } // Add odd/even class $class = $flip[$class]; if (isset($attributes['class'])) { $attributes['class'] .= ' '. $class; } else { $attributes['class'] = $class; } // Build row $output .= ' '; $i = 0; foreach ($cells as $cell) { $cell = tablesort_cell($cell, $header, $ts, $i++); $output .= _theme_table_cell($cell); } $output .= " \n"; } } $output .= "\n"; $output .= "
\n"; return $output; }