marvin.theme 5.9 KB
Newer Older
1 2
<?php
// $Id$
Dries's avatar
 
Dries committed
3

4
  /*********************************************************************
Dries's avatar
 
Dries committed
5

6 7 8 9 10
   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.
Dries's avatar
 
Dries committed
11

12
  *********************************************************************/
Dries's avatar
 
Dries committed
13

Kjartan's avatar
Changes  
Kjartan committed
14
 class Theme extends BaseTheme {
15 16
   var $link = "#666699";

Dries's avatar
 
Dries committed
17
   // General colorset that can be used for this theme
18 19 20
   var $foreground = "#000000";
   var $background = "#EAEAEA";

Dries's avatar
 
Dries committed
21
   function header() {
22
    ?>
Dries's avatar
 
Dries committed
23 24 25 26
     <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
     <html>
     <head>
      <title><?php print variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", ""); ?></title>
Dries's avatar
 
Dries committed
27 28 29 30 31 32 33
      <style type="text/css">
       <!--
        BODY { margin: 10px; font-size: 12pt; font-family: Verdana, Helvetica; }
        SMALL { font-size: 10pt; }
        FONT, P, TH, TD, TR, FORM, OL, UL, LI, INPUT, TEXTAREA, SELECT, A { font-size: 12pt; font-family: Verdana, Helvetica; }
       -->
      </style>
Dries's avatar
 
Dries committed
34
     </head>
Dries's avatar
 
Dries committed
35
     <body text="#000000" bgcolor="#ffffff" alink="#cccccc" link="#665566" vlink="#665566">
Dries's avatar
 
Dries committed
36 37 38 39 40 41 42
      <table border="0" cellpadding="8" cellspacing="0">
       <tr>
        <td><a href="index.php"><img src="themes/marvin/images/logo.gif" alt="" border="0" /></a></td>
        <td>&nbsp;</td>
       </tr>
       <tr>
        <td align="right" colspan="2">
Dries's avatar
 
Dries committed
43
         <small>
Dries's avatar
 
Dries committed
44
         <?php
Dries's avatar
 
Dries committed
45
           print $this->links(link_page());
Dries's avatar
 
Dries committed
46
         ?>
Dries's avatar
 
Dries committed
47
         </small>
Dries's avatar
 
Dries committed
48 49 50 51
        </td>
       </tr>
       <tr>
        <td valign="top" width="85%">
Dries's avatar
 
Dries committed
52
    <?php
53 54
   }

Dries's avatar
 
Dries committed
55
   function node($node, $main = 0) {
Dries's avatar
 
Dries committed
56
     print "\n<!-- node: \"$node->title\" -->\n";
Dries's avatar
 
Dries committed
57
     print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n";
Dries's avatar
 
Dries committed
58
     print " <tr><td colspan=\"2\"><img src=\"themes/marvin/images/drop.gif\" alt=\"\" /> &nbsp; <b>". check_output($node->title) ."</b></td></tr>\n";
Dries's avatar
 
Dries committed
59
     print " <tr valign=\"bottom\"><td colspan=\"2\" bgcolor=\"#000000\" width=\"100%\"><img src=\"themes/marvin/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" /></td></tr>\n";
Dries's avatar
 
Dries committed
60
     print " <tr><td nowrap=\"nowrap\"><font color=\"#7C7C7C\"><small>". strtr(t("Submitted by %a on %b"), array("%a" => format_name($node), "%b" => format_date($node->timestamp, "large"))); ?><?php print "</small></font></td><td align=\"right\" valign=\"top\" nowrap><small>". node_index($node) ."</small></td></tr>\n";
Dries's avatar
 
Dries committed
61 62
     print " <tr><td colspan=\"2\">&nbsp;</td></tr>\n";
     print " <tr><td colspan=\"2\"><p>". check_output($node->body, 1) ."</p></td></tr>\n";
Dries's avatar
 
Dries committed
63
     print " <tr><td colspan=\"2\">&nbsp;</td></tr>\n";
Dries's avatar
 
Dries committed
64
     if ($main) print " <tr><td colspan=\"2\">". $this->links(link_node($node)) ."</td></tr>\n";
Dries's avatar
 
Dries committed
65 66
     print "</table>\n";
     print "<br /><br />\n\n";
67 68
   }

Dries's avatar
 
Dries committed
69
   function comment($comment, $link = "") {
Dries's avatar
 
Dries committed
70
     print "<a name=\"$comment->cid\">\n";
71

Dries's avatar
 
Dries committed
72
     // Create comment header:
Dries's avatar
 
Dries committed
73 74 75 76 77 78 79 80
     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";
81

Dries's avatar
 
Dries committed
82
     // Subject:
Dries's avatar
 
Dries committed
83 84
     print "        <td align=\"right\" width=\"5%\"><b>". t("Subject") .":</b></td>\n";
     print "        <td width=\"80%\"><b><font color=\"#666699\">". check_output($comment->subject) ."</font></b></td>\n";
85

Dries's avatar
 
Dries committed
86
     // Moderation:
Dries's avatar
 
Dries committed
87
     print "        <td align=\"right\" rowspan=\"3\" valign=\"middle\" width=\"15%\">\n";
Dries's avatar
 
Dries committed
88
     print comment_moderation($comment);
Dries's avatar
 
Dries committed
89 90
     print "        </td>\n";
     print "       </tr>\n";
91

Dries's avatar
 
Dries committed
92
     // Author:
Dries's avatar
 
Dries committed
93
     print "       <tr>\n";
Dries's avatar
 
Dries committed
94
     print "        <td align=\"right\" valign=\"top\">". t("Author") .":</td><td>". format_name($comment) ."</td>\n";
Dries's avatar
 
Dries committed
95
     print "       </tr>\n";
96

Dries's avatar
 
Dries committed
97
     // Date
Dries's avatar
 
Dries committed
98 99 100
     print "       <tr>\n";
     print "        <td align=\"right\">". t("Date") .":</td><td>". format_date($comment->timestamp) ."</td>\n";
     print "       </tr>\n";
101

Dries's avatar
 
Dries committed
102 103 104
     print "      </table>\n";
     print "     </td>\n";
     print "    </tr>\n";
105

Dries's avatar
 
Dries committed
106
     // Print body of comment:
Dries's avatar
 
Dries committed
107 108 109
     if ($comment->comment) {
       print "    <tr><td bgcolor=\"#FFFFFF\">". check_output($comment->comment, 1) ."</td></tr>\n";
     }
110

Dries's avatar
 
Dries committed
111
     // Print bottom link(s):
Dries's avatar
 
Dries committed
112 113 114 115 116 117
     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";
118 119
   }

120
   function box($subject, $content, $region = "main") {
121
     print "\n<!-- box: \"$subject\" -->\n";
Dries's avatar
 
Dries committed
122 123 124 125
     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";
Dries's avatar
 
Dries committed
126 127
     print "    <tr><td align=\"center\" bgcolor=\"#eaeaea\" nowrap=\"nowrap\"><font color=\"#404040\"><b>$subject</b></font></td></tr>\n";
     print "    <tr><td bgcolor=\"#ffffff\" valign=\"top\">$content</td></tr>\n";
Dries's avatar
 
Dries committed
128 129 130 131 132
     print "   </table>\n";
     print "  </td>\n";
     print " </tr>\n";
     print "</table>\n";
     print "<br />\n\n";
133
   }
Dries's avatar
 
Dries committed
134

Dries's avatar
 
Dries committed
135
   function links($links, $delimiter = " &middot; ") {
Dries's avatar
 
Dries committed
136 137
     return implode($delimiter, $links);
   }
138 139 140

   function footer() {
     ?>
Dries's avatar
 
Dries committed
141 142
       </td>
       <td valign="top" width="200">
Dries's avatar
 
Dries committed
143
         <?php
Dries's avatar
 
Dries committed
144
          $this->user("all", $this);
Dries's avatar
 
Dries committed
145
          theme_blocks("all", $this);
Dries's avatar
 
Dries committed
146
         ?>
Dries's avatar
 
Dries committed
147
       </td>
Dries's avatar
 
Dries committed
148 149 150
      </tr>
      <tr>
       <td align="center" colspan="2">
Dries's avatar
 
Dries committed
151
        <?php
Dries's avatar
 
Dries committed
152
          print "<p><small>". $this->links(link_page()) ."</small></p><p>". variable_get("site_footer", "") ."</p>\n";
Dries's avatar
 
Dries committed
153
        ?>
Dries's avatar
 
Dries committed
154 155 156 157 158
       </td>
      </tr>
     </table>
    </body>
    </html>
Dries's avatar
 
Dries committed
159
    <?php
160 161
   }
 }
162

Dries's avatar
 
Dries committed
163
?>