-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.php
More file actions
204 lines (183 loc) · 6.02 KB
/
Copy pathtemplate.php
File metadata and controls
204 lines (183 loc) · 6.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<?php
/**
* Implements template_preprocess_html().
*
*/
//function ns_preprocess_html(&$variables) {
// // Add conditional CSS for IE. To use uncomment below and add IE css file
// drupal_add_css(path_to_theme() . '/css/ie.css', array('weight' => CSS_THEME, 'browsers' => array('!IE' => FALSE), 'preprocess' => FALSE));
//
// // Need legacy support for IE downgrade to Foundation 2 or use JS file below
// // drupal_add_js('http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE7.js', 'external');
//}
/**
* Implements template_preprocess_page
*
*/
//function ns_preprocess_page(&$variables) {
//}
/**
* Implements template_preprocess_node
*
*/
//function ns_preprocess_node(&$variables) {
//}
/**
* Implements hook_preprocess_block()
*/
//function ns_preprocess_block(&$variables) {
// // Add wrapping div with global class to all block content sections.
// $variables['content_attributes_array']['class'][] = 'block-content';
//
// // Convenience variable for classes based on block ID
// $block_id = $variables['block']->module . '-' . $variables['block']->delta;
//
// // Add classes based on a specific block
// switch ($block_id) {
// // System Navigation block
// case 'system-navigation':
// // Custom class for entire block
// $variables['classes_array'][] = 'system-nav';
// // Custom class for block title
// $variables['title_attributes_array']['class'][] = 'system-nav-title';
// // Wrapping div with custom class for block content
// $variables['content_attributes_array']['class'] = 'system-nav-content';
// break;
//
// // User Login block
// case 'user-login':
// // Hide title
// $variables['title_attributes_array']['class'][] = 'element-invisible';
// break;
//
// // Example of adding Foundation classes
// case 'block-foo': // Target the block ID
// // Set grid column or mobile classes or anything else you want.
// $variables['classes_array'][] = 'six columns';
// break;
// }
//
// // Add template suggestions for blocks from specific modules.
// switch($variables['elements']['#block']->module) {
// case 'menu':
// $variables['theme_hook_suggestions'][] = 'block__nav';
// break;
// }
//}
//function ns_preprocess_views_view(&$variables) {
//}
/**
* Implements template_preprocess_panels_pane().
*
*/
//function ns_preprocess_panels_pane(&$variables) {
//}
/**
* Implements template_preprocess_views_views_fields().
*
*/
//function ns_preprocess_views_view_fields(&$variables) {
//}
/**
* Implements theme_form_element_label()
* Use foundation tooltips
*/
//function ns_form_element_label($variables) {
// if (!empty($variables['element']['#title'])) {
// $variables['element']['#title'] = '<span class="secondary label">' . $variables['element']['#title'] . '</span>';
// }
// if (!empty($variables['element']['#description'])) {
// $variables['element']['#description'] = ' <span data-tooltip="top" class="has-tip tip-top" data-width="250" title="' . $variables['element']['#description'] . '">' . t('More information?') . '</span>';
// }
// return theme_form_element_label($variables);
//}
/**
* Implements hook_preprocess_button().
*/
//function ns_preprocess_button(&$variables) {
// $variables['element']['#attributes']['class'][] = 'button';
// if (isset($variables['element']['#parents'][0]) && $variables['element']['#parents'][0] == 'submit') {
// $variables['element']['#attributes']['class'][] = 'secondary';
// }
//}
/**
* Implements hook_form_alter()
* Example of using foundation sexy buttons
*/
//function ns_form_alter(&$form, &$form_state, $form_id) {
// // Sexy submit buttons
// if (!empty($form['actions']) && !empty($form['actions']['submit'])) {
// $classes = (is_array($form['actions']['submit']['#attributes']['class']))
// ? $form['actions']['submit']['#attributes']['class']
// : array();
// $classes = array_merge($classes, array('secondary', 'button', 'radius'));
// $form['actions']['submit']['#attributes']['class'] = $classes;
// }
//}
/**
* Implements hook_form_FORM_ID_alter()
* Example of using foundation sexy buttons on comment form
*/
//function ns_form_comment_form_alter(&$form, &$form_state) {
// Sexy preview buttons
// $classes = (is_array($form['actions']['preview']['#attributes']['class']))
// ? $form['actions']['preview']['#attributes']['class']
// : array();
// $classes = array_merge($classes, array('secondary', 'button', 'radius'));
// $form['actions']['preview']['#attributes']['class'] = $classes;
//}
/**
* Implements template_preprocess_panels_pane().
*/
// function zurb_foundation_preprocess_panels_pane(&$variables) {
// }
/**
* Implements template_preprocess_views_views_fields().
*/
/* Delete me to enable
function THEMENAME_preprocess_views_view_fields(&$variables) {
if ($variables['view']->name == 'nodequeue_1') {
// Check if we have both an image and a summary
if (isset($variables['fields']['field_image'])) {
// If a combined field has been created, unset it and just show image
if (isset($variables['fields']['nothing'])) {
unset($variables['fields']['nothing']);
}
} elseif (isset($variables['fields']['title'])) {
unset ($variables['fields']['title']);
}
// Always unset the separate summary if set
if (isset($variables['fields']['field_summary'])) {
unset($variables['fields']['field_summary']);
}
}
}
// */
/**
* Implements hook_css_alter().
*/
//function ns_css_alter(&$css) {
// // Always remove base theme CSS.
// $theme_path = drupal_get_path('theme', 'zurb_foundation');
//
// foreach($css as $path => $values) {
// if(strpos($path, $theme_path) === 0) {
// unset($css[$path]);
// }
// }
//}
/**
* Implements hook_js_alter().
*/
//function ns_js_alter(&$js) {
// // Always remove base theme JS.
// $theme_path = drupal_get_path('theme', 'zurb_foundation');
//
// foreach($js as $path => $values) {
// if(strpos($path, $theme_path) === 0) {
// unset($js[$path]);
// }
// }
//}
//
// drupal_add_js('sites/all/themes/ns/js/slidr.min.js', array('scope'=>'footer'));