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

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

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


Revision 1.1 - (show annotations) (download) (as text)
Tue Apr 15 18:31:16 2008 UTC (19 months, 1 week ago) by dm66
Branch: MAIN
CVS Tags: DRUPAL-6--1-0, HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/x-php
Add to CVS
1 <?php
2 // $Id$
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, $node) {
21 if (!$content || $node->type == 'forum') {
22 return '<div id="comments">'. $content .'</div>';
23 }
24 else {
25 return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
26 }
27 }
28
29
30
31 function phptemplate_comment_submitted($comment) {
32 return t('!username - !datetime',
33 array(
34 '!username' => theme('username', $comment),
35 '!datetime' => format_date($comment->timestamp)
36 ));
37 }
38
39 function phptemplate_node_submitted($node) {
40 return t('!username - !datetime',
41 array(
42 '!username' => theme('username', $node),
43 '!datetime' => format_date($node->created),
44 ));
45 }
46
47
48
49 function phptemplate_menu_item_link($link) {
50 if (empty($link['options'])) {
51 $link['options'] = array();
52 }
53
54 // If an item is a LOCAL TASK, render it as a tab
55 if ($link['type'] & MENU_IS_LOCAL_TASK) {
56 $link['title'] = '<span class="tab">'. check_plain($link['title']) .'</span>';
57 $link['options']['html'] = TRUE;
58 }
59
60 if (empty($link['type'])) {
61 $true = TRUE;
62 }
63
64 return l($link['title'], $link['href'], $link['options']);
65 }
66
67 /**
68 * Duplicate of theme_menu_local_tasks() but adds clear-block to tabs.
69 */
70
71 function phptemplate_menu_local_tasks() {
72 $output = '';
73
74 if ($primary = menu_primary_local_tasks()) {
75 $output .= '<ul class="tabs primary clear-block">'. $primary .'</ul>';
76 }
77 return $output;
78 }
79

  ViewVC Help
Powered by ViewVC 1.1.2