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

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

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


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

  ViewVC Help
Powered by ViewVC 1.1.2