/[drupal]/contributions/themes/interlaced/interlaced.theme
ViewVC logotype

Diff of /contributions/themes/interlaced/interlaced.theme

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

revision 1.22, Thu Aug 25 20:59:51 2005 UTC revision 1.23, Sun Mar 5 09:13:56 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: interlaced.theme,v 1.21 2005/04/30 18:42:47 tdobes Exp $  // $Id: interlaced.theme,v 1.22 2005/08/25 20:59:51 dries Exp $
3    
4  function interlaced_features() {  function interlaced_features() {
5    return array('toggle_name', 'toggle_primary_links');    return array('toggle_name', 'toggle_favicon');
6    }
7    
8    function interlaced_regions() {
9      return array(
10           'left' => t('left sidebar'),
11           'right' => t('right sidebar')
12      );
13  }  }
14    
15  function interlaced_page($content) {  function interlaced_page($content) {
16      if (theme_get_setting('toggle_favicon')) {
17        drupal_set_html_head('<link rel="shortcut icon" href="'. check_url(theme_get_setting('favicon')) .'" type="image/x-icon" />');
18      }
19    
20    $output  = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";    $output  = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
21    $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";    $output .= "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
22    $output .= "<head>\n";    $output .= "<head>\n";
# Line 21  function interlaced_page($content) { Line 32  function interlaced_page($content) {
32    }    }
33    
34    $output .= "</title>\n";    $output .= "</title>\n";
35    $output .= '  <link href="themes/interlaced/default.css" rel="stylesheet" type="text/css" />    $output .= '  <link href="'. base_path() . path_to_theme() .'/default.css" rel="stylesheet" type="text/css" />
36    <link title="one" href="themes/interlaced/styles1.css" rel="stylesheet" type="text/css" />    <link title="one" href="'. base_path() . path_to_theme() .'/styles1.css" rel="stylesheet" type="text/css" />
37    <link title="two" href="themes/interlaced/styles2.css" rel="alternate stylesheet" type="text/css" />    <link title="two" href="'. base_path() . path_to_theme() .'/styles2.css" rel="alternate stylesheet" type="text/css" />
38    <link title="three" href="themes/interlaced/styles3.css" rel="alternate stylesheet" type="text/css" />    <link title="three" href="'. base_path() . path_to_theme() .'/styles3.css" rel="alternate stylesheet" type="text/css" />
39    <link title="four" href="themes/interlaced/styles4.css" rel="alternate stylesheet" type="text/css" />';    <link title="four" href="'. base_path() . path_to_theme() .'/styles4.css" rel="alternate stylesheet" type="text/css" />';
40    $output .= "</head>\n";    $output .= "</head>\n";
41    $output .= "<body ". theme_onload_attribute() .">\n";    $output .= "<body>\n";
42    
43    $output .= '<table style="width: 100%; vertical-align: top;" cellspacing="0" cellpadding="0">    $output .= '<table style="width: 100%; vertical-align: top;" cellspacing="0" cellpadding="0">
44    
# Line 41  function interlaced_page($content) { Line 52  function interlaced_page($content) {
52    
53    ';    ';
54    
55    $primary_links = theme_get_setting('primary_links');    $primary_links = theme('links', menu_primary_links());
56    if ($primary_links) {    if ($primary_links) {
57      $output .= '<tr>      $output .= '<tr>
58      <td class="headerlinks">      <td class="headerlinks">
# Line 122  $output .= '
Line 133  $output .= '
133    return $output;    return $output;
134  }  }
135    
136  function interlaced_node($node, $main = 0, $page = 0) {  function interlaced_node($node, $teaser = 0, $page = 0) {
137    $output = '      <!-- node: "'. check_plain($node->title) .'" -->';    $output = '      <!-- node: "'. check_plain($node->title) .'" -->';
138    if (!$page) {    if (!$page) {
139      $output .= '      <div class="nodetitle">' . l($node->title, "node/$node->nid") . '</div>';      $output .= '      <div class="nodetitle">' . ($teaser ? l($node->title, "node/$node->nid") : check_plain($node->title)) . '</div>';
140    }    }
141    $output .= '    $output .= '
142        <div class="nodebody">        <div class="nodebody">
# Line 150  function interlaced_node($node, $main = Line 161  function interlaced_node($node, $main =
161    
162    $output .= "</span>\n";    $output .= "</span>\n";
163    
164    if ($main && $node->teaser) {    if ($teaser && $node->teaser) {
165      $output .= $node->teaser;      $output .= $node->teaser;
166    }    }
167    else {    else {
# Line 165  function interlaced_node($node, $main = Line 176  function interlaced_node($node, $main =
176    return $output;    return $output;
177  }  }
178    
179  function interlaced_comment($comment, $link = "") {  function interlaced_comment($comment, $links = array()) {
180    $output = "<div class=\"boxtitle\">$comment->subject</div>\n";    $output = "<div class=\"boxtitle\">$comment->subject</div>\n";
181    
182    $output .= "<div class=\"nodebody\"><span class=\"nodedate\">".theme("links", array(theme('username', $comment),format_date($comment->timestamp, "small"),"&nbsp;"))."</span>\n";    $output .= "<div class=\"nodebody\"><span class=\"nodedate\">".theme("links", array(theme('username', $comment),format_date($comment->timestamp, "small"),"&nbsp;"))."</span>\n";
# Line 176  function interlaced_comment($comment, $l Line 187  function interlaced_comment($comment, $l
187    
188    $output .= "</div>";    $output .= "</div>";
189    
190    $output .= " <div class=\"nodelinks\">". $link ."</div>\n";    $output .= " <div class=\"nodelinks\">". theme('links', $links) ."</div>\n";
191    $output .= "<br />\n\n";    $output .= "<br />\n\n";
192    
193    return $output;    return $output;
# Line 204  function interlaced_block($block) { Line 215  function interlaced_block($block) {
215  }  }
216    
217  function interlaced_links($links, $delimiter = " &middot; ") {  function interlaced_links($links, $delimiter = " &middot; ") {
218      if (!is_array($links)) {
219        return '';
220      }
221    return implode("<span class=\"delimiter\">&nbsp;&nbsp;</span>", $links);    return implode("<span class=\"delimiter\">&nbsp;&nbsp;</span>", $links);
222  }  }
223    
# Line 212  function interlaced_help() { Line 226  function interlaced_help() {
226      return '<div class="help">'. $help .'</div><hr />';      return '<div class="help">'. $help .'</div><hr />';
227    }    }
228  }  }
   
 ?>  

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.2