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

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

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


Revision 1.1 - (show annotations) (download) (as text)
Fri May 23 21:13:14 2008 UTC (18 months ago) by crashtest
Branch: MAIN
CVS Tags: DRUPAL-5--1-1, DRUPAL-5--1-0, DRUPAL-5--1-2, HEAD
Branch point for: DRUPAL-5
File MIME type: text/x-php
Initial commit of the Ranch theme, a standards compliant CSS theme with easy to change color.
1 <?php
2 // $Id$
3
4 /*
5 * Ranch Theme - Patrick Teglia - http://brauerranch.com
6 */
7
8 $theme_path = path_to_theme();
9
10 // Add javascript and stylesheets here.
11 drupal_add_js($theme_path .'/niftycube.js');
12 drupal_add_css($theme_path .'/html-elements.css', 'theme', 'all');
13 drupal_add_css($theme_path .'/layout.css', 'theme', 'all');
14 drupal_add_css($theme_path .'/ranch.css', 'theme', 'all');
15 drupal_add_css($theme_path .'/niftyCorners.css','theme','all');
16
17
18 /**
19 * Declare the available regions implemented by this theme.
20 *
21 * @return
22 * An array of regions.
23 */
24 function ranch_regions() {
25 return array(
26 'right' => t('right sidebar'),
27 'navbar' => t('navigation bar'),
28 'content_top' => t('content top'),
29 'content_bottom' => t('content bottom'),
30 'content_below_left' => t('below content left'),
31 'content_below_middle' => t('below content middle'),
32 'content_below_right' => t('below content right'),
33 'header' => t('header'),
34 'header_left' => t('header left side'),
35 'header_right' => t('header right side'),
36 'footer' => t('footer'),
37 'closure_region' => t('closure'),
38 'search_box' => t('search box'),
39 );
40 }
41
42 /**
43 * Declare variables that you will use in the template.
44 */
45 function _phptemplate_variables($hook, $variables = array()) {
46 $variables['theme_path'] = path_to_theme();
47 $variables['home_text'] = t('Home');
48 $variables['skip_to_nav'] = t('Skip to Navigation');
49 $variables['themed_primary_links'] = theme('links', menu_primary_links());
50 $variables['themed_secondary_links'] = theme('links', menu_secondary_links());
51 return $variables;
52 }
53
54 /**
55 * Correct 'ID "edit-submit" already defined' validation error caused by search forms.
56 */
57 function phptemplate_search_theme_form($form) {
58 return '<div id="search" class="container-inline">'. str_replace('edit-submit','edit-submit-search',drupal_render($form)) .'</div>';
59 }
60 function phptemplate_search_block_form($form) {
61 return '<div class="container-inline">'. str_replace('edit-submit','edit-submit-search',drupal_render($form)) .'</div>';
62 }

  ViewVC Help
Powered by ViewVC 1.1.2