1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
function blogbuzz_preprocess_html(&$vars) {
|
21 |
|
|
|
22 |
|
|
function get_blogbuzz_style() {
|
23 |
|
|
$style = theme_get_setting('style');
|
24 |
|
|
return $style;
|
25 |
|
|
}
|
26 |
|
|
|
27 |
|
|
drupal_add_css(drupal_get_path('theme','blogbuzz') . '/css/' . get_blogbuzz_style() . '.css', array('group' => CSS_THEME, 'every_page' => TRUE));
|
28 |
|
|
|
29 |
|
|
drupal_add_css(path_to_theme() . '/css/ie7.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
|
30 |
|
|
drupal_add_css(path_to_theme() . '/css/ie8.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 8', '!IE' => FALSE), 'preprocess' => FALSE));
|
31 |
|
|
}
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
function blogbuzz_process_page(&$vars) {
|
37 |
|
|
|
38 |
|
|
if (isset($vars['main_menu'])) {
|
39 |
|
|
$vars['primary_nav'] = theme('links__system_main_menu', array(
|
40 |
|
|
'links' => $vars['main_menu'],
|
41 |
|
|
'attributes' => array(
|
42 |
|
|
'class' => array('links', 'inline', 'main-menu'),
|
43 |
|
|
),
|
44 |
|
|
'heading' => array(
|
45 |
|
|
'text' => t('Main menu'),
|
46 |
|
|
'level' => 'h2',
|
47 |
|
|
'class' => array('element-invisible'),
|
48 |
|
|
)
|
49 |
|
|
));
|
50 |
|
|
}
|
51 |
|
|
else {
|
52 |
|
|
$vars['primary_nav'] = FALSE;
|
53 |
|
|
}
|
54 |
|
|
if (isset($vars['secondary_menu'])) {
|
55 |
|
|
$vars['secondary_nav'] = theme('links__system_secondary_menu', array(
|
56 |
|
|
'links' => $vars['secondary_menu'],
|
57 |
|
|
'attributes' => array(
|
58 |
|
|
'class' => array('links', 'inline', 'secondary-menu'),
|
59 |
|
|
),
|
60 |
|
|
'heading' => array(
|
61 |
|
|
'text' => t('Secondary menu'),
|
62 |
|
|
'level' => 'h2',
|
63 |
|
|
'class' => array('element-invisible'),
|
64 |
|
|
)
|
65 |
|
|
));
|
66 |
|
|
}
|
67 |
|
|
else {
|
68 |
|
|
$vars['secondary_nav'] = FALSE;
|
69 |
|
|
}
|
70 |
|
|
}
|
71 |
|
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
|
function blogbuzz_preprocess_node(&$vars) {
|
76 |
|
|
|
77 |
|
|
if ($vars['view_mode'] != 'full' && $vars['id'] == 1) {
|
78 |
|
|
$vars['classes_array'][] = 'node-first';
|
79 |
|
|
}
|
80 |
|
|
|
81 |
|
|
if ($vars['view_mode'] == 'full' && node_is_page($vars['node'])) {
|
82 |
|
|
$vars['classes_array'][] = 'node-full';
|
83 |
|
|
}
|
84 |
|
|
}
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
function blogbuzz_menu_tree($vars) {
|
90 |
|
|
return '<ul class="menu clearfix">' . $vars['tree'] . '</ul>';
|
91 |
|
|
}
|
92 |
|
|
|
93 |
|
|
function blogbuzz_button($vars) {
|
94 |
|
|
$element = $vars['element'];
|
95 |
|
|
$element['#attributes']['type'] = 'submit';
|
96 |
|
|
element_set_attributes($element, array('id', 'name', 'value'));
|
97 |
|
|
|
98 |
|
|
$element['#attributes']['class'][] = 'form-' . $element['#button_type'];
|
99 |
|
|
if (!empty($element['#attributes']['disabled'])) {
|
100 |
|
|
$element['#attributes']['class'][] = 'form-button-disabled';
|
101 |
|
|
}
|
102 |
|
|
return '<span class="button"><input' . drupal_attributes($element['#attributes']) . ' /></span>';
|
103 |
|
|
} |