Index: page.tpl.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/lightfantastic/page.tpl.php,v
retrieving revision 1.13
diff -u -r1.13 page.tpl.php
--- page.tpl.php	28 May 2008 03:47:05 -0000	1.13
+++ page.tpl.php	29 May 2008 14:40:04 -0000
@@ -6,21 +6,17 @@
     <title><?php print $head_title ?></title>
     <?php print $head ?>
 
-    <link type="text/css" rel="stylesheet" media="screen, projection" href="<?php print base_path() . path_to_theme(); ?>/assets/style/initial.css" />
+    <link type="text/css" rel="stylesheet" media="screen, projection" href="<?php print $base_path . $directory; ?>/assets/style/initial.css" />
     <?php print $styles ?>
-
+    
     <!--[if lte IE 6]>
-      <link type="text/css" rel="stylesheet" href="<?php print base_path() . path_to_theme(); ?>/assets/style/ie6.css" />
+      <?php print $ie_styles ?>
     <![endif]-->
-
-    <!--[if lt IE 7]>
-      <link type="text/css" rel="stylesheet" href="<?php print base_path() . path_to_theme(); ?>/assets/style/ie7.css" />
-    <![endif]-->
-
+    
     <?php print $scripts ?>
     <?php print $layout_style ?>
   </head>
-  <body<?php print $body_class ?>>
+  <body class="<?php print $body_classes ?>">
     <div id="container">
       <div id="wrapper">
         <div id="header">
@@ -33,29 +29,21 @@
           <?php } ?>
           <div id="logowrap">
             <div id="logo">
-            <?php
-              $site_fields = array();
-              if ($site_name) {
-                $site_fields[] = check_plain($site_name);
-              }
-              $site_title = implode(' ', $site_fields);
-              $site_fields[0] = '<span>'. $site_fields[0] .'</span>';
-              $site_html = implode(' ', $site_fields);
-              if ($logo || $site_title) {
-                print '<h1><a href="'. check_url($base_path) .'" title="'. $site_title .'">';
-                if ($logo) {
-                  print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo-image" />';
-                }
-                print $site_html .'</a></h1>';
-              } ?>
+            <?php if ($logo || $site_title) { ?>
+              <h1><a href="<?php print $front_page ?>" title="<?php print $site_title ?>">
+                <?php if ($logo) { ?>
+                  <img src="<?php print $logo ?>" alt="<?php print $site_title ?>" id="logo-image" />
+                <?php } ?>
+                <span><?php print $site_title ?></span></a></h1>
+              <?php } ?>
             </div>
-            <?php if ($primary_links || $header) { ?>
+            <?php if ($primary_nav || $header) { ?>
               <div id="ie7menuhack">
                 <div id="topmenu">
                   <?php print $header ?>
-                  <?php if ($primary_links) { ?>
+                  <?php if ($primary_nav) { ?>
                     <div id="primary-links">
-                      <?php print theme('links', $primary_links, array('id' => 'main-menu'));  ?>
+                      <?php print $primary_nav ?>
                     </div><!-- /primary-links -->
                   <?php } ?>
                 </div>
@@ -87,7 +75,7 @@
             <?php if ($tabs): ?><div id="tabs-wrapper"><?php endif; ?>
             <?php if ($title): print '<h1'. ($tabs ? ' class="title with-tabs"' : ' class="title"') .'>'. $title .'</h1>'; endif; ?>
             <?php if ($tabs): ?><?php print $tabs ?></div><!-- /tabs-wrapper --><?php endif; ?>
-            <?php if (isset($tabs2)): print $tabs2; endif; ?>
+            <?php if ($tabs2): ?><span class="clear"></span><ul class="tabs secondary"><?php print $tabs2 ?></ul><?php endif; ?>
             <?php if ($help): print $help; endif; ?>
             <?php if ($show_messages && $messages): print $messages; endif; ?>
             <?php print $content ?>
Index: template.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/lightfantastic/template.php,v
retrieving revision 1.10
diff -u -r1.10 template.php
--- template.php	28 May 2008 03:47:05 -0000	1.10
+++ template.php	29 May 2008 14:40:04 -0000
@@ -4,7 +4,14 @@
 /**
  * Override or insert PHPTemplate variables into the templates.
  */
-function phptemplate_preprocess_page(&$vars) {
+function lightfantastic_preprocess_page(&$vars) {
+  if (!empty($vars['site_name'])) {
+    $vars['site_title'] = check_plain($vars['site_name']);
+  }
+  $vars['ie_styles'] = lightfantastic_get_ie_styles();
+  $vars['primary_nav'] = isset($vars['primary_links']) ? theme('links', $vars['primary_links'], array('id' => 'main-menu')) : FALSE;
+  $vars['tabs2'] = menu_secondary_local_tasks();
+  
   /**
    * Set width for the site and two sidebars:
    * This theme allows the site to have a fluid or fixed width layout.
@@ -13,7 +20,6 @@
    * For any layout, Left and Right column widths could be set.
    * If fixed width, maximum and minimum widths would be ignored.
    */
-  
   $site_fixed_width    = '960px'; // Width if fixed-width layout. Leave blank ('') for fluid layout.
   $site_min_width      = '760px'; // Minimum width if fluid layout.
   $site_max_width      = '960px'; // Maximum width if fluid layout.
@@ -127,12 +133,6 @@
     default:
       $vars['banner_chunk'] = "chunk-unknown";
   }
-
-  if ($secondary = menu_secondary_local_tasks()) {
-    $output = '<span class="clear"></span>';
-    $output .= "<ul class=\"tabs secondary\">\n". $secondary ."</ul>\n";
-    $vars['tabs2'] = $output;
-  }
 }
 
 /**
@@ -142,7 +142,7 @@
  *   An array containing the breadcrumb links.
  * @return a string containing the breadcrumb output.
  */
-function phptemplate_breadcrumb($breadcrumb) {
+function lightfantastic_breadcrumb($breadcrumb) {
   if (!empty($breadcrumb)) {
     return '<div id="breadcrumb">'. implode(' &raquo; ', $breadcrumb) .'</div>';
   }
@@ -151,7 +151,7 @@
 /**
  * Allow themable wrapping of all comments.
  */
-function phptemplate_comment_wrapper($content, $node) {
+function lightfantastic_comment_wrapper($content, $node) {
   if (!$content || $node->type == 'forum') {
     return '<div id="comments">'. $content .'</div>';
   }
@@ -166,7 +166,7 @@
  *
  * @ingroup themeable
  */
-function phptemplate_menu_local_tasks() {
+function lightfantastic_menu_local_tasks() {
   $output = '';
 
   if ($primary = menu_primary_local_tasks()) {
@@ -176,7 +176,7 @@
   return $output;
 }
 
-function phptemplate_comment_submitted($comment) {
+function lightfantastic_comment_submitted($comment) {
   return t('!datetime — !username',
     array(
       '!username' => theme('username', $comment),
@@ -184,10 +184,18 @@
     ));
 }
 
-function phptemplate_node_submitted($node) {
+function lightfantastic_node_submitted($node) {
   return t('!datetime — !username',
     array(
       '!username' => theme('username', $node),
       '!datetime' => format_date($node->created),
     ));
 }
+
+/**
+ * Generates IE CSS link.
+ */
+function lightfantastic_get_ie_styles() {
+  $ie_styles = '<link type="text/css" rel="stylesheet" media="all" href="' . base_path() . path_to_theme() . '/assets/style/ie6.css" />'. "\n";
+  return $ie_styles;
+}
