00001 <?php
00002
00003
00011 function garland_breadcrumb($breadcrumb) {
00012 if (!empty($breadcrumb)) {
00013 return '<div class="breadcrumb">' . implode(' › ', $breadcrumb) . '</div>';
00014 }
00015 }
00016
00020 function garland_comment_wrapper($content, $node) {
00021 if (!$content || $node->type == 'forum') {
00022 return '<div id="comments">' . $content . '</div>';
00023 }
00024 else {
00025 return '<div id="comments"><h2 class="comments">' . t('Comments') . '</h2>' . $content . '</div>';
00026 }
00027 }
00028
00032 function garland_preprocess_page(&$vars) {
00033 $vars['tabs2'] = menu_secondary_local_tasks();
00034 $vars['primary_nav'] = isset($vars['primary_links']) ? theme('links', $vars['primary_links'], array('class' => 'links primary-links')) : FALSE;
00035 $vars['secondary_nav'] = isset($vars['secondary_links']) ? theme('links', $vars['secondary_links'], array('class' => 'links secondary-links')) : FALSE;
00036 $vars['ie_styles'] = garland_get_ie_styles();
00037
00038
00039 $site_fields = array();
00040 if (!empty($vars['site_name'])) {
00041 $site_fields[] = check_plain($vars['site_name']);
00042 }
00043 if (!empty($vars['site_slogan'])) {
00044 $site_fields[] = check_plain($vars['site_slogan']);
00045 }
00046 $vars['site_title'] = implode(' ', $site_fields);
00047 if (!empty($site_fields)) {
00048 $site_fields[0] = '<span>'. $site_fields[0] .'</span>';
00049 }
00050 $vars['site_html'] = implode(' ', $site_fields);
00051
00052
00053 if (module_exists('color')) {
00054 _color_page_alter($vars);
00055 }
00056 }
00057
00062 function garland_menu_local_tasks() {
00063 return menu_primary_local_tasks();
00064 }
00065
00069 function phptemplate_comment_submitted($comment) {
00070 return t('!datetime — !username',
00071 array(
00072 '!username' => theme('username', $comment),
00073 '!datetime' => format_date($comment->timestamp)
00074 ));
00075 }
00076
00080 function garland_node_submitted($node) {
00081 return t('!datetime — !username',
00082 array(
00083 '!username' => theme('username', $node),
00084 '!datetime' => format_date($node->created),
00085 ));
00086 }
00087
00091 function garland_get_ie_styles() {
00092 global $language;
00093
00094 $ie_styles = '<link type="text/css" rel="stylesheet" media="all" href="' . base_path() . path_to_theme() . '/fix-ie.css" />'. "\n";
00095 if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
00096 $ie_styles .= ' <style type="text/css" media="all">@import "' . base_path() . path_to_theme() . '/fix-ie-rtl.css";</style>'. "\n";
00097 }
00098
00099 return $ie_styles;
00100 }