1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
function garland_breadcrumb($variables) {
|
7 |
|
|
$breadcrumb = $variables['breadcrumb'];
|
8 |
|
|
|
9 |
|
|
if (!empty($breadcrumb)) {
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
$output = '<h2 class="element-invisible">' . t('You are here') . '</h2>';
|
13 |
|
|
|
14 |
|
|
$output .= '<div class="breadcrumb">' . implode(' › ', $breadcrumb) . '</div>';
|
15 |
|
|
return $output;
|
16 |
|
|
}
|
17 |
|
|
}
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
|
|
|
22 |
582db59d
|
Assos Assos
|
function garland_preprocess_maintenance_page(&$variables) {
|
23 |
85ad3d82
|
Assos Assos
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
582db59d
|
Assos Assos
|
garland_preprocess_html($variables);
|
29 |
85ad3d82
|
Assos Assos
|
}
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
582db59d
|
Assos Assos
|
function garland_preprocess_html(&$variables) {
|
35 |
85ad3d82
|
Assos Assos
|
|
36 |
|
|
if (theme_get_setting('garland_width') == 'fluid') {
|
37 |
582db59d
|
Assos Assos
|
$variables['classes_array'][] = 'fluid-width';
|
38 |
85ad3d82
|
Assos Assos
|
}
|
39 |
|
|
|
40 |
|
|
drupal_add_css(path_to_theme() . '/fix-ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lt IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
|
41 |
|
|
}
|
42 |
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
582db59d
|
Assos Assos
|
function garland_process_html(&$variables) {
|
47 |
85ad3d82
|
Assos Assos
|
|
48 |
|
|
if (module_exists('color')) {
|
49 |
582db59d
|
Assos Assos
|
_color_html_alter($variables);
|
50 |
85ad3d82
|
Assos Assos
|
}
|
51 |
|
|
}
|
52 |
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
|
|
56 |
582db59d
|
Assos Assos
|
function garland_preprocess_page(&$variables) {
|
57 |
85ad3d82
|
Assos Assos
|
|
58 |
582db59d
|
Assos Assos
|
$variables['tabs2'] = array(
|
59 |
85ad3d82
|
Assos Assos
|
'#theme' => 'menu_local_tasks',
|
60 |
582db59d
|
Assos Assos
|
'#secondary' => $variables['tabs']['#secondary'],
|
61 |
85ad3d82
|
Assos Assos
|
);
|
62 |
582db59d
|
Assos Assos
|
unset($variables['tabs']['#secondary']);
|
63 |
85ad3d82
|
Assos Assos
|
|
64 |
582db59d
|
Assos Assos
|
if (isset($variables['main_menu'])) {
|
65 |
|
|
$variables['primary_nav'] = theme('links__system_main_menu', array(
|
66 |
|
|
'links' => $variables['main_menu'],
|
67 |
85ad3d82
|
Assos Assos
|
'attributes' => array(
|
68 |
|
|
'class' => array('links', 'inline', 'main-menu'),
|
69 |
|
|
),
|
70 |
|
|
'heading' => array(
|
71 |
|
|
'text' => t('Main menu'),
|
72 |
|
|
'level' => 'h2',
|
73 |
|
|
'class' => array('element-invisible'),
|
74 |
|
|
)
|
75 |
|
|
));
|
76 |
|
|
}
|
77 |
|
|
else {
|
78 |
582db59d
|
Assos Assos
|
$variables['primary_nav'] = FALSE;
|
79 |
85ad3d82
|
Assos Assos
|
}
|
80 |
582db59d
|
Assos Assos
|
if (isset($variables['secondary_menu'])) {
|
81 |
|
|
$variables['secondary_nav'] = theme('links__system_secondary_menu', array(
|
82 |
|
|
'links' => $variables['secondary_menu'],
|
83 |
85ad3d82
|
Assos Assos
|
'attributes' => array(
|
84 |
|
|
'class' => array('links', 'inline', 'secondary-menu'),
|
85 |
|
|
),
|
86 |
|
|
'heading' => array(
|
87 |
|
|
'text' => t('Secondary menu'),
|
88 |
|
|
'level' => 'h2',
|
89 |
|
|
'class' => array('element-invisible'),
|
90 |
|
|
)
|
91 |
|
|
));
|
92 |
|
|
}
|
93 |
|
|
else {
|
94 |
582db59d
|
Assos Assos
|
$variables['secondary_nav'] = FALSE;
|
95 |
85ad3d82
|
Assos Assos
|
}
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
$site_fields = array();
|
99 |
582db59d
|
Assos Assos
|
if (!empty($variables['site_name'])) {
|
100 |
|
|
$site_fields[] = $variables['site_name'];
|
101 |
85ad3d82
|
Assos Assos
|
}
|
102 |
582db59d
|
Assos Assos
|
if (!empty($variables['site_slogan'])) {
|
103 |
|
|
$site_fields[] = $variables['site_slogan'];
|
104 |
85ad3d82
|
Assos Assos
|
}
|
105 |
582db59d
|
Assos Assos
|
$variables['site_title'] = implode(' ', $site_fields);
|
106 |
85ad3d82
|
Assos Assos
|
if (!empty($site_fields)) {
|
107 |
|
|
$site_fields[0] = '<span>' . $site_fields[0] . '</span>';
|
108 |
|
|
}
|
109 |
582db59d
|
Assos Assos
|
$variables['site_html'] = implode(' ', $site_fields);
|
110 |
85ad3d82
|
Assos Assos
|
|
111 |
|
|
|
112 |
582db59d
|
Assos Assos
|
$slogan_text = $variables['site_slogan'];
|
113 |
|
|
$site_name_text = $variables['site_name'];
|
114 |
|
|
$variables['site_name_and_slogan'] = $site_name_text . ' ' . $slogan_text;
|
115 |
85ad3d82
|
Assos Assos
|
}
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
|
120 |
582db59d
|
Assos Assos
|
function garland_preprocess_node(&$variables) {
|
121 |
|
|
$variables['submitted'] = $variables['date'] . ' — ' . $variables['name'];
|
122 |
85ad3d82
|
Assos Assos
|
}
|
123 |
|
|
|
124 |
|
|
|
125 |
|
|
|
126 |
|
|
|
127 |
582db59d
|
Assos Assos
|
function garland_preprocess_comment(&$variables) {
|
128 |
|
|
$variables['submitted'] = $variables['created'] . ' — ' . $variables['author'];
|
129 |
85ad3d82
|
Assos Assos
|
}
|
130 |
|
|
|
131 |
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
582db59d
|
Assos Assos
|
function garland_preprocess_block(&$variables) {
|
135 |
|
|
$variables['title_attributes_array']['class'][] = 'title';
|
136 |
|
|
$variables['classes_array'][] = 'clearfix';
|
137 |
85ad3d82
|
Assos Assos
|
}
|
138 |
|
|
|
139 |
|
|
|
140 |
|
|
|
141 |
|
|
|
142 |
582db59d
|
Assos Assos
|
function garland_process_page(&$variables) {
|
143 |
85ad3d82
|
Assos Assos
|
|
144 |
|
|
if (module_exists('color')) {
|
145 |
582db59d
|
Assos Assos
|
_color_page_alter($variables);
|
146 |
85ad3d82
|
Assos Assos
|
}
|
147 |
|
|
}
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
|
151 |
|
|
|
152 |
582db59d
|
Assos Assos
|
function garland_preprocess_region(&$variables) {
|
153 |
|
|
if ($variables['region'] == 'header') {
|
154 |
|
|
$variables['classes_array'][] = 'clearfix';
|
155 |
85ad3d82
|
Assos Assos
|
}
|
156 |
|
|
} |