/[drupal]/contributions/themes/adt_basetheme/template.php
ViewVC logotype

Contents of /contributions/themes/adt_basetheme/template.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Sat Jul 11 13:57:27 2009 UTC (4 months, 2 weeks ago) by peach
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
File MIME type: text/x-php
*** empty log message ***
1 <?php
2
3 /**
4 * Force refresh of theme registry.
5 * DEVELOPMENT USE ONLY - COMMENT OUT FOR PRODUCTION
6 */
7 // drupal_rebuild_theme_registry();
8
9 /* Store theme paths in variables */
10 GLOBAL $theme;
11 $theme_path = drupal_get_path('theme', $theme) .'/';
12 $abs_theme_path = base_path().$theme_path;
13 /* Store theme paths in Drupal.settings JSON objects - Do not remove this! These bathe paths are used by various other scripts */
14 drupal_add_js(array('current_theme' => $theme), 'setting');
15 drupal_add_js(array('theme_path' => $abs_theme_path), 'setting');
16
17 // include theming utility functions (conditionally includes color-module utility functions)
18 if(is_file($theme_path . 'template-functions.php')) {
19 include('template-functions.php');
20 }
21
22 // include theme settings controller
23 if(is_file($theme_path . 'template-settings-controller.php')) {
24 include('template-settings-controller.php');
25 }
26
27 /**
28 * Implementation of hook_preprocess()
29 *
30 * This function checks to see if a hook has a preprocess file associated with
31 * it, and if so, loads it.
32 *
33 * @param $vars
34 * @param $hook
35 * @return Array
36 */
37 /* if you rename the theme you have to change the the name of this function and of the drupal_get_patch parameter */
38 function adt_basetheme_preprocess(&$vars, $hook) {
39 if(is_file(drupal_get_path('theme', 'adt_basetheme') . '/preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc')) {
40 include('preprocess/preprocess-' . str_replace('_', '-', $hook) . '.inc');
41 }
42 }
43
44 // include theme function overrides
45 if(is_file($theme_path . 'template-overrides.php')) {
46 include('template-overrides.php');
47 }
48
49 // Load the custom stylesheet.
50 if (is_file($theme_path . 'custom/style-custom.css')) {
51 drupal_add_css($theme_path . 'custom/style-custom.css', 'theme', 'all');
52 }
53 // Load custom template.php code
54 if (is_file($theme_path . 'custom/template-custom.php')) {
55 include $theme_path . 'custom/template-custom.php';
56 }
57
58 // Load livepreview jQuery for color module tuning
59 if ((arg(2) == 'themes') && (arg(3) == 'settings') && (arg(4) != FALSE)) {
60 if (is_file($theme_path . 'color/adt-livepreview.js')) {
61 drupal_add_js($theme_path .'color/adt-livepreview.js');
62 drupal_add_js(array('t_s_page' => arg(4)), 'setting');
63 }
64 }

  ViewVC Help
Powered by ViewVC 1.1.2