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

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

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


Revision 1.2 - (show annotations) (download) (as text)
Sat Nov 3 08:53:01 2007 UTC (2 years ago) by manuelcillero
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
Changes since 1.1: +3 -1 lines
File MIME type: text/x-php
Added cvs headers and styles reviewed for IE.
1 <?php /* $Id$
2 CristalX4Drupal Theme
3 */
4 /**
5 * Return a themed breadcrumb trail.
6 *
7 * @param $breadcrumb
8 * An array containing the breadcrumb links.
9 * @return a string containing the breadcrumb output.
10 */
11 function phptemplate_breadcrumb($breadcrumb) {
12 if (!empty($breadcrumb)) {
13 return '<div class="breadcrumb">'. implode(' › ', $breadcrumb) .'</div>';
14 }
15 }
16
17 /**
18 * Allow themable wrapping of all comments.
19 */
20 function phptemplate_comment_wrapper($content, $type = null) {
21 static $node_type;
22 if (isset($type)) $node_type = $type;
23
24 if (!$content || $node_type == 'forum') {
25 return '<div id="comments">'. $content . '</div>';
26 }
27 else {
28 return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
29 }
30 }
31
32 /**
33 * Override or insert PHPTemplate variables into the templates.
34 */
35 function _phptemplate_variables($hook, $vars) {
36 if ($hook == 'page') {
37
38 if ($secondary = menu_secondary_local_tasks()) {
39 $output = '<span class="clear"></span>';
40 $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
41 $vars['tabs2'] = $output;
42 }
43
44 // Hook into color.module
45 if (module_exists('color')) {
46 _color_page_alter($vars);
47 }
48 return $vars;
49 }
50 return array();
51 }
52
53 /**
54 * Returns the rendered local tasks. The default implementation renders
55 * them as tabs.
56 *
57 * @ingroup themeable
58 */
59 function phptemplate_menu_local_tasks() {
60 $output = '';
61
62 if ($primary = menu_primary_local_tasks()) {
63 $output .= "<ul class=\"tabs primary\">\n". $primary ."</ul>\n";
64 }
65
66 return $output;
67 }
68
69 /**
70 * Quick fix for the XHTML validation error: 'ID "edit-submit" already defined'.
71 * See http://drupal.org/node/111719.
72 */
73 $elementCountForHack = 0;
74 function phptemplate_submit($element) {
75 global $elementCountForHack;
76 return str_replace('edit-submit', 'edit-submit-' . ++$elementCountForHack, theme('button', $element));
77 }

  ViewVC Help
Powered by ViewVC 1.1.2