* @param $vars * An array of variables to pass to the theme template. * @param $hook * The name of the template being rendered. */ function adaptivetheme_preprocess(&$vars, $hook) { global $user; $vars['is_admin'] = in_array('admin', $user->roles); $vars['logged_in'] = $user->uid > 0 ? TRUE : FALSE; $vars['theme_path'] = base_path() . path_to_theme() . '/'; // Include preprocess functions if and when required. if (is_file(drupal_get_path('theme', 'adaptivetheme') . '/inc/template.preprocess-' . str_replace('_', '-', $hook) . '.inc')) { include drupal_get_path('theme', 'adaptivetheme') . '/inc/template.preprocess-' . str_replace('_', '-', $hook) . '.inc'; } } // Include custom functions. include_once drupal_get_path('theme', 'adaptivetheme') . '/inc/template.custom-functions.inc'; // Include theme overrides. include_once drupal_get_path('theme', 'adaptivetheme') . '/inc/template.theme-overrides.inc'; // Include some jQuery. include_once drupal_get_path('theme', 'adaptivetheme') . '/inc/template.theme-js.inc'; // Auto-rebuild the theme registry during theme development. if (theme_get_setting('rebuild_registry')) { drupal_set_message(t('The theme registry has been rebuilt. <a href="!link">Turn off</a> this feature on production websites.', array('!link' => url('admin/build/themes/settings/' . $GLOBALS['theme']))), 'warning'); } // Add the color scheme stylesheets. if (theme_get_setting('color_enable_schemes') == 'on') { drupal_add_css(drupal_get_path('theme', 'adaptivetheme') . '/css/theme/' . get_at_colors(), 'theme'); } }
// $Id: template.php,v 1.1.2.6 2009/12/24 01:47:01 jmburnz Exp $ // adaptivethemes.com /** * @file template.php */ // Don't include custom functions if the database is inactive. if (db_is_active()) { // Include base theme custom functions. include_once drupal_get_path('theme', 'adaptivetheme') . '/inc/template.custom-functions.inc'; } /** * Add the color scheme stylesheet if color_enable_schemes is set to 'on'. * Note: you must have at minimum a color-default.css stylesheet in /css/theme/ */ if (theme_get_setting('color_enable_schemes') == 'on') { drupal_add_css(drupal_get_path('theme', 'bccgbcrm') . '/css/theme/' . get_at_colors(), 'theme'); } /** * USAGE * 1. Rename each function to match your subthemes name, * e.g. if you name your theme "themeName" then the function * name will be "themeName_preprocess_hook". * 2. Uncomment the required function to use. You can delete the * "sample_variable". */ /** * Override or insert variables into all templates. * * @param $vars * An array of variables to pass to the theme template. * @param $hook
// $Id: template.php,v 1.1.2.6 2009/12/24 01:47:01 jmburnz Exp $ // adaptivethemes.com /** * @file template.php */ // Don't include custom functions if the database is inactive. if (db_is_active()) { // Include base theme custom functions. include_once drupal_get_path('theme', 'adaptivetheme') . '/inc/template.custom-functions.inc'; } /** * Add the color scheme stylesheet if color_enable_schemes is set to 'on'. * Note: you must have at minimum a color-default.css stylesheet in /css/theme/ */ if (theme_get_setting('color_enable_schemes') == 'on') { drupal_add_css(drupal_get_path('theme', 'southkonafarms') . '/css/theme/' . get_at_colors(), 'theme'); } /** * USAGE * 1. Rename each function to match your subthemes name, * e.g. if you name your theme "themeName" then the function * name will be "themeName_preprocess_hook". * 2. Uncomment the required function to use. You can delete the * "sample_variable". */ /** * Override or insert variables into all templates. * * @param $vars * An array of variables to pass to the theme template. * @param $hook