-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.php
167 lines (131 loc) · 8.97 KB
/
template.php
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
<?php
/**
* @file
* Process theme data.
*
* Use this file to run your theme specific implimentations of theme functions,
* such preprocess, process, alters, and theme function overrides.
*
* Preprocess and process functions are used to modify or create variables for
* templates and theme functions. They are a common theming tool in Drupal, often
* used as an alternative to directly editing or adding code to templates. Its
* worth spending some time to learn more about these functions - they are a
* powerful way to easily modify the output of any template variable.
*
* Preprocess and Process Functions SEE: http://drupal.org/node/254940#variables-processor
* 1. Rename each function and instance of "adaptivetheme_subtheme" to match
* your subthemes name, e.g. if your theme name is "footheme" then the function
* name will be "footheme_preprocess_hook". Tip - you can search/replace
* on "adaptivetheme_subtheme".
* 2. Uncomment the required function to use.
*/
/**
* Preprocess variables for the html template.
*/
/* -- Delete this line to enable.
function adaptivetheme_subtheme_preprocess_html(&$vars) {
global $theme_key;
// Two examples of adding custom classes to the body.
// Add a body class for the active theme name.
// $vars['classes_array'][] = drupal_html_class($theme_key);
// Browser/platform sniff - adds body classes such as ipad, webkit, chrome etc.
// $vars['classes_array'][] = css_browser_selector();
}
// */
/**
* Process variables for the html template.
*/
/* -- Delete this line if you want to use this function
function adaptivetheme_subtheme_process_html(&$vars) {
}
// */
/**
* Override or insert variables for the page templates.
*/
function millerLiteColTheme_preprocess_page(&$vars) {
if(arg(0)=="node" && arg(1)=="99"){
$vars['theme_hook_suggestions'][] = 'page__lived';
}
$header = drupal_get_http_header('status');
if ($header == '404 Not Found') {
$vars['theme_hook_suggestions'][] = 'page__404';
}
//drupal_add_css(path_to_theme() . '/css/styles.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
//drupal_add_js('https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js('https://maps.googleapis.com/maps/api/js?key=AIzaSyBDUCrY-Ih_wLT96QyP2yu7ARawGCbjPjM', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/jquery-11.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/libs/bootstrap.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/tabs/jquery.tabslet.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/tabs/jquery.tabslet.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/vendor/jquery.tabslet.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/vendor/rainbow-custom.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/vendor/jquery.anchor.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/tabs/initializers.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/popup.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/jasny-bootstrap.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
//drupal_add_css(path_to_theme() . '/css/brmfiles/bootstrap.min.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
drupal_add_css(path_to_theme() . '/css/brmfiles/jasny-bootstrap.min.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
drupal_add_css(path_to_theme() . '/css/style-beertime.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
drupal_add_css(path_to_theme() . '/css/brmfiles/millerLite-drupal.min.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
//drupal_add_css(path_to_theme() . '/css/brmfiles/style.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
//setcookie('ml_accesoF', '', time() - 60);
// Se valida si existe una cookie de la edad
//var_dump($_COOKIE['ml_accesoF']);
if ($_COOKIE['ml_accesoF'] == 'n0'){
//drupal_add_js(path_to_theme() . '/js/jquery.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/libs/bootstrap.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_css(path_to_theme() . '/css/styleHaspe.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
drupal_add_js(path_to_theme() . '/js/validacionInicio.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(drupal_get_path('module', 'BRM_millerlite') . '/js/brmMiller.js');
drupal_add_js(path_to_theme() . '/bxslider/jquery.bxslider.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_css(path_to_theme() . '/bxslider/jquery.bxslider.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
}elseif(!isset($_COOKIE['ml_accesoF']) || ($_COOKIE['ml_accesoF'])=='3sm3nor43d4d'){
drupal_add_js(path_to_theme() . '/js/tabs/jquery.tabslet.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/vendor/jquery.tabslet.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/vendor/rainbow-custom.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/vendor/jquery.anchor.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/tabs/initializers.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/popup.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/vendor/modernizr.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/jquery.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/validacionInicio.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/ga.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_js(path_to_theme() . '/js/tabs/jquery.tabslet.min.js', array( 'scope' => 'header', 'weight' => -20 , 'group' => JS_LIBRARY, 'preprocess' => FALSE));
drupal_add_css(path_to_theme() . '/css/estilos-ss.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
drupal_add_css(path_to_theme() . '/fonts/fonts.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
drupal_add_css(path_to_theme() . '/css/testCris.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
drupal_add_css(path_to_theme() . '/css/webfonkit.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
drupal_add_css(path_to_theme() . '/css/animate.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
drupal_add_css(path_to_theme() . '/js/chosen/chosen.css' , array('group' => CSS_DEFAULT, 'every_page' => TRUE));
$vars['theme_hook_suggestions'][] = 'page__validarEdad';
}
}
function adaptivetheme_subtheme_process_page(&$vars) {
}
/**
* Override or insert variables into the node templates.
*/
/* -- Delete this line if you want to use these functions
function adaptivetheme_subtheme_preprocess_node(&$vars) {
}
function adaptivetheme_subtheme_process_node(&$vars) {
}
// */
/**
* Override or insert variables into the comment templates.
*/
/* -- Delete this line if you want to use these functions
function adaptivetheme_subtheme_preprocess_comment(&$vars) {
}
function adaptivetheme_subtheme_process_comment(&$vars) {
}
// */
/**
* Override or insert variables into the block templates.
*/
/* -- Delete this line if you want to use these functions
function adaptivetheme_subtheme_preprocess_block(&$vars) {
}
function adaptivetheme_subtheme_process_block(&$vars) {
}
// */