summaryrefslogtreecommitdiff
path: root/themes/marvin/marvin.theme
blob: abc582278840726bf263b236af10aa0e9f46632d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<?php
// $Id$

  /*********************************************************************

   Theme: Marvin
   Author: Dries Buytaert (Dries)
   Email: dries@drop.org
   Description: Classic theme, white, basic design with a fresh look.
   Notes: Only supports blocks on the right.

  *********************************************************************/

 class Theme_marvin extends BaseTheme {
   var $link = "#666699";

   // General colorset that can be used for this theme
   var $foreground = "#000000";
   var $background = "#EAEAEA";

   function system($field) {
     $system["name"] = "Marvin";
     $system["author"] = "Dries";
     $system["description"] = "Internet explorer, Netscape, Opera";

     return $system[$field];
   }

   function header($title = "") {
     global $HTTP_USER_AGENT, $base_url;
    ?>
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     <html>
     <head>
      <?php print theme_head($main); ?>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <base href="<?php echo "$base_url/" ?>" />
      <title>
       <?php
         if ($title) {
           print $title ." - ". variable_get("site_name", "drupal");
         }
         else {
           print variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", "");
         }
       ?>
      </title>
      <style type="text/css">
       <!--
       <?php
        if (eregi("Windows", $HTTP_USER_AGENT)) {
          // Windows / MSIE specific settings:
          print "BODY { margin: 10px; font-size: 10pt; font-family: Verdana, Helvetica; }";
          print "SMALL { font-size: 9pt; }";
          print "FONT, P, TH, TD, TR, FORM, OL, UL, LI, INPUT, TEXTAREA, SELECT, A { font-size: 10pt; font-family: Verdana, Helvetica; }";
        }
        else {
          // Linux specific settings:
          print "BODY { margin: 10px; font-size: 12pt; font-family: Verdana, Helvetica; }";
          print "SMALL { font-size: 10pt; }";
          print "FONT, P, TH, TD, TR, FORM, OL, UL, LI, INPUT, TEXTAREA, SELECT, A { font-size: 12pt; font-family: Verdana, Helvetica; }";
        }
       ?>
       -->
      </style>
     </head>
     <body text="#000000" bgcolor="#ffffff" alink="#cccccc" link="#665566" vlink="#665566"<?php print theme_onload_attribute(); ?>>
      <table border="0" cellpadding="8" cellspacing="0">
       <tr>
        <td><a href="index.php"><img src="<?php print $this->path; ?>/images/logo.png" alt="" border="0" /></a></td>
        <td>&nbsp;</td>
       </tr>
       <tr>
        <td align="right" colspan="2">
         <small>
         <?php
           print $this->links(link_page());
         ?>
         </small>
        </td>
       </tr>
       <tr>
        <td valign="top" width="85%">
    <?php
   }

   function node($node, $main = 0) {

     if (module_exist("taxonomy")) {
      $terms = taxonomy_link("taxonomy terms", $node);
     }

     print "\n<!-- node: \"$node->title\" -->\n";
     print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n";
     print " <tr><td colspan=\"2\"><img src=\"$this->path/images/drop.gif\" alt=\"\" /> &nbsp; <b>$node->title</b></td></tr>\n";
     print " <tr valign=\"bottom\"><td colspan=\"2\" bgcolor=\"#000000\" width=\"100%\"><img src=\"$this->path/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" /></td></tr>\n";
     print " <tr><td nowrap=\"nowrap\"><font color=\"#7C7C7C\"><small>". t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))); ?><?php print "</small></font></td><td align=\"right\" valign=\"top\" nowrap=\"nowrap\"><small>". $this->links($terms) ."</small></td></tr>\n";
     print " <tr><td colspan=\"2\">&nbsp;</td></tr>\n";

     if ($main && $node->teaser) {
       print " <tr><td colspan=\"2\"><p>". check_output($node->teaser) ."</p></td></tr>\n";
     }
     else {
       print " <tr><td colspan=\"2\"><p>". check_output($node->body) ."</p></td></tr>\n";
     }

     print " <tr><td colspan=\"2\">&nbsp;</td></tr>\n";

     if ($links = link_node($node, $main)) {
       print " <tr><td colspan=\"2\">". $this->links($links) ."</td></tr>\n";
     }

     print "</table>\n";
     print "<br /><br />\n\n";
   }

   function comment($comment, $link = "") {
     // Create comment header:
     print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#000000\" width=\"100%\">\n";
     print " <tr bgcolor=\"#000000\">\n";
     print "  <td>\n";
     print "   <table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"100%\">\n";
     print "    <tr>\n";
     print "     <td bgcolor=\"#eaeaea\">\n";
     print "      <table border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"100%\">\n";
     print "       <tr>\n";

     // Subject:
     print "        <td align=\"right\" width=\"5%\"><b>". t("Subject") .":</b></td>\n";
     print "        <td width=\"80%\"><b><font color=\"#666699\">$comment->subject</font></b></td>\n";

     print "       </tr>\n";

     // Author:
     print "       <tr>\n";
     print "        <td align=\"right\" valign=\"top\">". t("Author") .":</td><td>". format_name($comment) ."</td>\n";
     print "       </tr>\n";

     // Date
     print "       <tr>\n";
     print "        <td align=\"right\">". t("Date") .":</td><td>". format_date($comment->timestamp) ."</td>\n";
     print "       </tr>\n";

     print "      </table>\n";
     print "     </td>\n";
     print "    </tr>\n";

     // Print body of comment:
     if ($comment->comment) {
       print "    <tr><td bgcolor=\"#FFFFFF\">". check_output($comment->comment) ."</td></tr>\n";
     }

     // Print bottom link(s):
     print "    <tr><td align=\"right\" bgcolor=\"#EAEAEA\">[ $link ]</td></tr>\n";
     print "   </table>\n";
     print "  </td>\n";
     print " </tr>\n";
     print "</table>\n";
     print "<br />\n\n";
   }

   function box($subject, $content, $region = "main") {
     print "\n<!-- box: \"$subject\" -->\n";
     print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#000000\" width=\"100%\">\n";
     print " <tr>\n";
     print "  <td>\n";
     print "   <table border=\"0\" cellpadding=\"5\" cellspacing=\"1\" width=\"100%\">\n";
     print "    <tr><td align=\"center\" bgcolor=\"#eaeaea\"><font color=\"#404040\"><b>$subject</b></font></td></tr>\n";
     print "    <tr><td bgcolor=\"#ffffff\" valign=\"top\">$content</td></tr>\n";
     print "   </table>\n";
     print "  </td>\n";
     print " </tr>\n";
     print "</table>\n";
     print "<br />\n\n";
   }

   function links($links, $delimiter = " &middot; ") {
     return implode($delimiter, $links);
   }

   function footer() {
     ?>
       </td>
       <td valign="top" width="200">
         <?php
          theme_blocks("all", $this);
         ?>
       </td>
      </tr>
      <tr>
       <td align="center" colspan="2">
        <?php
          print "<p><small>". $this->links(link_page()) ."</small></p><p>". variable_get("site_footer", "") ."</p>\n";
        ?>
       </td>
      </tr>
     </table>
     <?php print theme_footer(); ?>
    </body>
    </html>
    <?php
   }
 }

?>