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

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

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


Revision 1.1 - (show annotations) (download) (as text)
Tue Jul 1 11:15:38 2008 UTC (16 months, 3 weeks ago) by interfacewebdesign
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
*** empty log message ***
1 <?php
2 // $Id: template.php,v 1.16 2007/10/11 09:51:29 goba Exp $
3
4 /**
5 * Sets the body-tag class attribute.
6 *
7 * Adds 'sidebar-left', 'sidebar-right' or 'sidebars' classes as needed.
8 */
9 function phptemplate_body_class($left, $right) {
10 if ($left != '' && $right != '') {
11 $class = 'sidebars';
12 }
13 else {
14 if ($left != '') {
15 $class = 'sidebar-left';
16 }
17 if ($right != '') {
18 $class = 'sidebar-right';
19 }
20 }
21
22 if (isset($class)) {
23 print ' class="'. $class .'"';
24 }
25 }
26
27 /**
28 * Return a themed breadcrumb trail.
29 *
30 * @param $breadcrumb
31 * An array containing the breadcrumb links.
32 * @return a string containing the breadcrumb output.
33 */
34 function phptemplate_breadcrumb($breadcrumb) {
35 if (!empty($breadcrumb)) {
36 return '<div class="breadcrumb">'. implode(' &raquo; ', $breadcrumb) .'</div>';
37 }
38 }
39
40 /**
41 * Allow themable wrapping of all comments.
42 */
43 function phptemplate_comment_wrapper($content, $node) {
44 if (!$content || $node->type == 'forum') {
45 return '<div id="comments">'. $content .'</div>';
46 }
47 else {
48 return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
49 }
50 }
51
52 /**
53 * Override or insert PHPTemplate variables into the templates.
54 */
55 function phptemplate_preprocess_page(&$vars) {
56 $vars['tabs2'] = menu_secondary_local_tasks();
57
58 // Hook into color.module
59 if (module_exists('color')) {
60 _color_page_alter($vars);
61 }
62 }
63
64 /**
65 * Returns the rendered local tasks. The default implementation renders
66 * them as tabs. Overridden to split the secondary tasks.
67 *
68 * @ingroup themeable
69 */
70
71 function phptemplate_menu_local_tasks() {
72 return menu_primary_local_tasks();
73 }
74
75 function phptemplate_comment_submitted($comment) {
76 return t('!datetime — !username',
77 array(
78 '!username' => theme('username', $comment),
79 '!datetime' => format_date($comment->timestamp)
80 ));
81 }
82
83 function phptemplate_node_submitted($node) {
84 return t('!datetime — !username',
85 array(
86 '!username' => theme('username', $node),
87 '!datetime' => format_date($node->created),
88 ));
89 }
90
91 /**
92 * Generates IE CSS links for LTR and RTL languages.
93 */
94 function phptemplate_get_ie_styles() {
95 global $language;
96
97 $iecss = '<link type="text/css" rel="stylesheet" media="all" href="'. base_path() . path_to_theme() .'/fix-ie.css" />';
98 if (defined('LANGUAGE_RTL') && $language->direction == LANGUAGE_RTL) {
99 $iecss .= '<style type="text/css" media="all">@import "'. base_path() . path_to_theme() .'/fix-ie-rtl.css";</style>';
100 }
101
102 return $iecss;
103 }

  ViewVC Help
Powered by ViewVC 1.1.2