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

Diff of /contributions/themes/marvinclassic/marvinclassic.theme

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

revision 1.5, Sat Apr 30 18:42:48 2005 UTC revision 1.6, Sun Mar 5 09:13:56 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: marvinclassic.theme,v 1.4 2005/03/31 19:53:49 tdobes Exp $  // $Id: marvinclassic.theme,v 1.5 2005/04/30 18:42:48 tdobes Exp $
3    
4  function marvinclassic_features() {  function marvinclassic_features() {
5    return array('logo', 'toggle_primary_links', 'toggle_secondary_links');    return array('logo', 'toggle_favicon');
6    }
7    
8    function marvinclassic_regions() {
9      return array(
10           'left' => t('left sidebar'),
11           'right' => t('right sidebar')
12      );
13  }  }
14    
15  function marvinclassic_page($content) {  function marvinclassic_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>\n";    $output .= "<html>\n";
22    $output .= "<head>\n";    $output .= "<head>\n";
# Line 23  function marvinclassic_page($content) { Line 34  function marvinclassic_page($content) {
34    $output .= "</title>\n";    $output .= "</title>\n";
35    $output .= theme_get_styles();    $output .= theme_get_styles();
36    $output .= "</head>\n";    $output .= "</head>\n";
37    $output .= "<body ". theme_onload_attribute() .">\n";    $output .= "<body>\n";
38    
39    $output .= "<table border=\"0\" style=\"width: 100%\" cellpadding=\"8\" cellspacing=\"0\">\n";    $output .= "<table border=\"0\" style=\"width: 100%\" cellpadding=\"8\" cellspacing=\"0\">\n";
40    $output .= "  <tr>\n";    $output .= "  <tr>\n";
41    $output .= "      <td>";    $output .= "      <td>";
42    if ($logo = theme_get_setting('logo')) {    if ($logo = theme_get_setting('logo')) {
43      $output .= "<a href=\"./\" title=\"Home\"><img src=\"$logo\" alt=\"Home\" /></a>";      $output .= l('<img src="'. theme_get_setting('logo') .'" alt="'. t('Home') .'" />', '', array('title' => t('Home')), NULL, NULL, FALSE, TRUE);
44    }    }
45    $output .= "</td>\n";    $output .= "</td>\n";
46    $output .= "      <td>&nbsp;" . theme_get_setting('secondary_links') ."</td>\n";    $output .= "      <td>&nbsp;". theme('links', menu_secondary_links()) ."</td>\n";
47    $output .= "  </tr>\n";    $output .= "  </tr>\n";
48    $output .= "  <tr>\n";    $output .= "  <tr>\n";
49    $output .= "    <td colspan=\"2\" style=\"text-align: right;\">". theme_get_setting('primary_links') ."</td>\n";    $output .= "    <td colspan=\"2\" style=\"text-align: right;\">". theme('links', menu_primary_links()) ."</td>\n";
50    $output .= "  </tr>\n";    $output .= "  </tr>\n";
51    $output .= "</table>\n";    $output .= "</table>\n";
52    
# Line 78  function marvinclassic_page($content) { Line 89  function marvinclassic_page($content) {
89    $output .= "<table border=\"0\" style=\"width: 100%\" cellpadding=\"8\" cellspacing=\"0\">\n";    $output .= "<table border=\"0\" style=\"width: 100%\" cellpadding=\"8\" cellspacing=\"0\">\n";
90    $output .= "  <tr>\n";    $output .= "  <tr>\n";
91    $output .= "    <td colspan=\"2\" style=\"text-align: center;\">";    $output .= "    <td colspan=\"2\" style=\"text-align: center;\">";
92    $output .= "<p>". theme_get_setting('primary_links') ."</p><p>". variable_get("site_footer", "") ."</p>\n";    $output .= "<p>". theme('links', menu_primary_links()) ."</p><p>". variable_get("site_footer", "") ."</p>\n";
93    $output .= "    </td>\n";    $output .= "    </td>\n";
94    $output .= "  </tr>\n";    $output .= "  </tr>\n";
95    $output .= "</table>\n";    $output .= "</table>\n";
# Line 88  function marvinclassic_page($content) { Line 99  function marvinclassic_page($content) {
99    return $output;    return $output;
100  }  }
101    
102  function marvinclassic_node($node, $main = 0, $page = 0) {  function marvinclassic_node($node, $teaser = 0, $page = 0) {
103    
104    $output = "<div class=\"node\">\n";    $output = "<div class=\"node\">\n";
105    if (!$page) {    if (!$page) {
106      $output .= "<h2 class=\"title\">". l($node->title, "node/$node->nid") ."</h2>\n";      $output .= "<h2 class=\"title\">". ($teaser ? l($node->title, "node/$node->nid") : check_plain($node->title)) ."</h2>\n";
107    }    }
108    
109    if (theme_get_setting("toggle_node_info_$node->type")) {    if (theme_get_setting("toggle_node_info_$node->type")) {
110      $output .= "<div class=\"submitted\">". t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))) ."</div>";      $output .= "<div class=\"submitted\">". t("Submitted by %a on %b", array("%a" => theme('username', $node), "%b" => format_date($node->created, "large"))) ."</div>";
111    }    }
112    
113    if (module_exist("taxonomy") && ($taxonomy = taxonomy_link("taxonomy terms", $node))) {    if (module_exist("taxonomy") && ($taxonomy = taxonomy_link("taxonomy terms", $node))) {
# Line 105  function marvinclassic_node($node, $main Line 116  function marvinclassic_node($node, $main
116    
117    $output .= "<div class=\"content\">";    $output .= "<div class=\"content\">";
118    
119    if ($main && $node->teaser) {    if ($teaser && $node->teaser) {
120      $output .= $node->teaser;      $output .= $node->teaser;
121    }    }
122    else {    else {
# Line 124  function marvinclassic_node($node, $main Line 135  function marvinclassic_node($node, $main
135    
136  }  }
137    
138  function marvinclassic_comment($comment, $link = "") {  function marvinclassic_comment($comment, $links = array()) {
139    // Create comment header:    // Create comment header:
140    $output = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #000000; width: 100%;\">\n";    $output = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #000000; width: 100%;\">\n";
141    $output .= " <tr style=\"background-color: #000000;\">\n";    $output .= " <tr style=\"background-color: #000000;\">\n";
# Line 143  function marvinclassic_comment($comment, Line 154  function marvinclassic_comment($comment,
154    
155    // Author:    // Author:
156    $output .= "       <tr>\n";    $output .= "       <tr>\n";
157    $output .= "        <td style=\"text-align: right; vertical-align: top;\">". t("Author") .":</td><td>". format_name($comment) ."</td>\n";    $output .= "        <td style=\"text-align: right; vertical-align: top;\">". t("Author") .":</td><td>". theme('username', $comment) ."</td>\n";
158    $output .= "       </tr>\n";    $output .= "       </tr>\n";
159    
160    // Date    // Date
# Line 161  function marvinclassic_comment($comment, Line 172  function marvinclassic_comment($comment,
172    }    }
173    
174    // Print bottom link(s):    // Print bottom link(s):
175    $output .= "    <tr><td style=\"background-color: #eaeaea; text-align: right;\">$link</td></tr>\n";    $output .= "    <tr><td style=\"background-color: #eaeaea; text-align: right;\">". theme('links', $links) ."</td></tr>\n";
176    $output .= "   </table>\n";    $output .= "   </table>\n";
177    $output .= "  </td>\n";    $output .= "  </td>\n";
178    $output .= " </tr>\n";    $output .= " </tr>\n";
# Line 172  function marvinclassic_comment($comment, Line 183  function marvinclassic_comment($comment,
183  }  }
184    
185  function marvinclassic_links($links, $delimiter = " &middot; ") {  function marvinclassic_links($links, $delimiter = " &middot; ") {
186      if (!is_array($links)) {
187        return '';
188      }
189    return implode($delimiter, $links);    return implode($delimiter, $links);
190  }  }
191    
# Line 180  function marvinclassic_help() { Line 194  function marvinclassic_help() {
194      return '<div class="help">'. $help .'</div><hr />';      return '<div class="help">'. $help .'</div><hr />';
195    }    }
196  }  }
   
 ?>  

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.2