1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
function bartik_preprocess_html(&$variables) {
|
7 |
|
|
if (!empty($variables['page']['featured'])) {
|
8 |
|
|
$variables['classes_array'][] = 'featured';
|
9 |
|
|
}
|
10 |
|
|
|
11 |
|
|
if (!empty($variables['page']['triptych_first'])
|
12 |
|
|
|| !empty($variables['page']['triptych_middle'])
|
13 |
|
|
|| !empty($variables['page']['triptych_last'])) {
|
14 |
|
|
$variables['classes_array'][] = 'triptych';
|
15 |
|
|
}
|
16 |
|
|
|
17 |
|
|
if (!empty($variables['page']['footer_firstcolumn'])
|
18 |
|
|
|| !empty($variables['page']['footer_secondcolumn'])
|
19 |
|
|
|| !empty($variables['page']['footer_thirdcolumn'])
|
20 |
|
|
|| !empty($variables['page']['footer_fourthcolumn'])) {
|
21 |
|
|
$variables['classes_array'][] = 'footer-columns';
|
22 |
|
|
}
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
drupal_add_css(path_to_theme() . '/css/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
|
26 |
|
|
drupal_add_css(path_to_theme() . '/css/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 6', '!IE' => FALSE), 'preprocess' => FALSE));
|
27 |
|
|
}
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
|
|
|
32 |
|
|
function bartik_process_html(&$variables) {
|
33 |
|
|
|
34 |
|
|
if (module_exists('color')) {
|
35 |
|
|
_color_html_alter($variables);
|
36 |
|
|
}
|
37 |
|
|
}
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
function bartik_process_page(&$variables) {
|
43 |
|
|
|
44 |
|
|
if (module_exists('color')) {
|
45 |
|
|
_color_page_alter($variables);
|
46 |
|
|
}
|
47 |
|
|
|
48 |
|
|
|
49 |
|
|
$variables['hide_site_name'] = theme_get_setting('toggle_name') ? FALSE : TRUE;
|
50 |
|
|
$variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;
|
51 |
|
|
if ($variables['hide_site_name']) {
|
52 |
|
|
|
53 |
|
|
$variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
|
54 |
|
|
}
|
55 |
|
|
if ($variables['hide_site_slogan']) {
|
56 |
|
|
|
57 |
|
|
$variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));
|
58 |
|
|
}
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) {
|
62 |
|
|
|
63 |
|
|
$variables['title_prefix']['shortcut_wrapper'] = array(
|
64 |
|
|
'#markup' => '<div class="shortcut-wrapper clearfix">',
|
65 |
|
|
'#weight' => 100,
|
66 |
|
|
);
|
67 |
|
|
$variables['title_suffix']['shortcut_wrapper'] = array(
|
68 |
|
|
'#markup' => '</div>',
|
69 |
|
|
'#weight' => -99,
|
70 |
|
|
);
|
71 |
|
|
|
72 |
|
|
$variables['title_suffix']['add_or_remove_shortcut']['#weight'] = -100;
|
73 |
|
|
}
|
74 |
|
|
}
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
|
79 |
|
|
function bartik_preprocess_maintenance_page(&$variables) {
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
if (!$variables['db_is_active']) {
|
85 |
|
|
$variables['site_name'] = '';
|
86 |
|
|
}
|
87 |
|
|
drupal_add_css(drupal_get_path('theme', 'bartik') . '/css/maintenance-page.css');
|
88 |
|
|
}
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
function bartik_process_maintenance_page(&$variables) {
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
$variables['hide_site_name'] = theme_get_setting('toggle_name') ? FALSE : TRUE;
|
97 |
|
|
$variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;
|
98 |
|
|
if ($variables['hide_site_name']) {
|
99 |
|
|
|
100 |
|
|
$variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));
|
101 |
|
|
}
|
102 |
|
|
if ($variables['hide_site_slogan']) {
|
103 |
|
|
|
104 |
|
|
$variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));
|
105 |
|
|
}
|
106 |
|
|
}
|
107 |
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
function bartik_preprocess_node(&$variables) {
|
112 |
|
|
if ($variables['view_mode'] == 'full' && node_is_page($variables['node'])) {
|
113 |
|
|
$variables['classes_array'][] = 'node-full';
|
114 |
|
|
}
|
115 |
|
|
}
|
116 |
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
|
|
|
120 |
|
|
function bartik_preprocess_block(&$variables) {
|
121 |
|
|
|
122 |
|
|
if ($variables['block']->region == 'header') {
|
123 |
|
|
$variables['title_attributes_array']['class'][] = 'element-invisible';
|
124 |
|
|
}
|
125 |
|
|
}
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
|
|
function bartik_menu_tree($variables) {
|
131 |
|
|
return '<ul class="menu clearfix">' . $variables['tree'] . '</ul>';
|
132 |
|
|
}
|
133 |
|
|
|
134 |
|
|
|
135 |
|
|
|
136 |
|
|
|
137 |
|
|
function bartik_field__taxonomy_term_reference($variables) {
|
138 |
|
|
$output = '';
|
139 |
|
|
|
140 |
|
|
|
141 |
|
|
if (!$variables['label_hidden']) {
|
142 |
|
|
$output .= '<h3 class="field-label">' . $variables['label'] . ': </h3>';
|
143 |
|
|
}
|
144 |
|
|
|
145 |
|
|
|
146 |
|
|
$output .= ($variables['element']['#label_display'] == 'inline') ? '<ul class="links inline">' : '<ul class="links">';
|
147 |
|
|
foreach ($variables['items'] as $delta => $item) {
|
148 |
|
|
$output .= '<li class="taxonomy-term-reference-' . $delta . '"' . $variables['item_attributes'][$delta] . '>' . drupal_render($item) . '</li>';
|
149 |
|
|
}
|
150 |
|
|
$output .= '</ul>';
|
151 |
|
|
|
152 |
|
|
|
153 |
|
|
$output = '<div class="' . $variables['classes'] . (!in_array('clearfix', $variables['classes_array']) ? ' clearfix' : '') . '"' . $variables['attributes'] .'>' . $output . '</div>';
|
154 |
|
|
|
155 |
|
|
return $output;
|
156 |
|
|
} |