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

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

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


Revision 1.5 - (show annotations) (download) (as text)
Thu Jan 29 14:32:52 2009 UTC (9 months, 4 weeks ago) by troy
Branch: MAIN
CVS Tags: DRUPAL-6--1-3, HEAD
Changes since 1.4: +2 -2 lines
File MIME type: text/x-php
Logo support was added
1 <?php
2 // $Id: template.php,v 1.4 2008/12/26 09:02:43 troy Exp $
3
4 function phptemplate_preprocess_page(&$vars) {
5 $defaults = array(
6 'admin_left_column' => 1,
7 'admin_right_column' => 0
8 );
9
10 global $theme_key;
11 // Get default theme settings.
12 $settings = theme_get_settings($theme_key);
13 $settings = array_merge($defaults, $settings);
14
15
16
17 if (arg(0) == 'admin' && ($settings['admin_right_column'] == 0) && !(arg(1) == 'build' && arg(2) == 'block')) {
18 $vars['right'] = '';
19 }
20
21 if (arg(0) == 'admin' && ($settings['admin_left_column'] == 0) && !(arg(1) == 'build' && arg(2) == 'block')) {
22 $vars['left'] = '';
23 }
24
25 $vars['registration_enabled'] = variable_get('user_register', 1);
26 $vars['closure'] .= '<span class="developer">
27 <strong><a href="http://russianwebstudio.com" title="Go to RussianWebStudio.com">Drupal theme</a></strong> by <a href="http://russianwebstudio.com" title="Go to RussianWebStudio.com">RussianWebStudio.com</a> <span class="version">ver.1.3</span>
28 </span>';
29 }
30
31
32 /**
33 * Generate the HTML representing a given menu item ID.
34 *
35 * An implementation of theme_menu_item_link()
36 *
37 * @param $link
38 * array The menu item to render.
39 * @return
40 * string The rendered menu item.
41 */
42 function phptemplate_menu_item_link($link) {
43 if (empty($link['options'])) {
44 $link['options'] = array();
45 }
46
47 // If an item is a LOCAL TASK, render it as a tab
48 if ($link['type'] & MENU_IS_LOCAL_TASK) {
49 $link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
50 $link['options']['html'] = TRUE;
51 }
52
53 if (empty($link['type'])) {
54 $true = TRUE;
55 }
56
57 return l($link['title'], $link['href'], $link['options']);
58 }
59
60 /**
61 * Duplicate of theme_menu_local_tasks() but adds clear-block to tabs.
62 */
63 function phptemplate_menu_local_tasks() {
64 $output = '';
65
66 if ($primary = menu_primary_local_tasks()) {
67 $output .= '<ul class="tabs primary clear-block">' . $primary . '</ul>';
68 }
69 if ($secondary = menu_secondary_local_tasks()) {
70 $output .= '<ul class="tabs secondary clear-block">' . $secondary . '</ul>';
71 }
72
73 return $output;
74 }
75
76 ?>

  ViewVC Help
Powered by ViewVC 1.1.2