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

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

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


Revision 1.4 - (show annotations) (download) (as text)
Wed May 13 11:14:06 2009 UTC (6 months, 2 weeks ago) by robby
Branch: MAIN
CVS Tags: DRUPAL-6--1-5, DRUPAL-6--1-6, HEAD
Changes since 1.3: +2 -2 lines
File MIME type: text/x-php
some little php variables rewriting changes in page.tpl.php
1 <?php
2 // $Id: template.php,v 1.3 2008/10/30 11:22:07 robby Exp $
3 // beginning drupal 6.x theme, created by robin / biboo.net / gazwal.net */
4 /**
5 * Override or insert PHPTemplate variables into the templates .
6 */
7 function phptemplate_preprocess_page(&$vars) {
8 // set variables for the logo and slogan (from Deco drupal 6.x theme)
9 $site_fields = array();
10 if ($vars['site_name']) {
11 $site_fields[] = check_plain($vars['site_name']);
12 }
13 if ($vars['site_slogan']) {
14 $site_fields[] = check_plain($vars['site_slogan']);
15 }
16
17 $vars['site_title'] = implode(' ', $site_fields);
18
19 if (isset($site_fields[0])) {
20 $site_fields[0] = '<span class="site-name">'. $site_fields[0] .'</span>';
21 }
22 if (isset($site_fields[1])) {
23 $site_fields[1] = '<span class="site-slogan">'. $site_fields[1] .'</span>';
24 }
25
26 $vars['site_title_html'] = implode(' ', $site_fields);
27
28 }
29
30 /**
31 * Allow themable wrapping of all comments (from garland).
32 */
33 function phptemplate_comment_wrapper($content, $node) {
34 if (!$content || $node->type == 'forum') {
35 return '<div id="comments">'. $content .'</div>';
36 }
37 else {
38 return '<div id="comments"><h2 class="comments">'. t('Comments :') .'</h2>'. $content .'</div>';
39 }
40 }

  ViewVC Help
Powered by ViewVC 1.1.2