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

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

Steven Wittens's avatar
Steven Wittens committed
6
   Theme: UnConeD
7
   Author: Steven Wittens (UnConeD)
Steven Wittens's avatar
Steven Wittens committed
8
9
   Email: unconed@drop.org
   Description: Modern theme, gray and blue, high coolness factor.
10
   Notes: Only supports blocks on the right.
Dries's avatar
   
Dries committed
11

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

14
 class Theme_unconed extends BaseTheme {
15
16
17
   var $foreground = "#000000";
   var $background = "#FFFFFF";

18
   var $link = "#000000";
Dries's avatar
Dries committed
19

20
   var $cl80 = "#8f9399";
Steven Wittens's avatar
Steven Wittens committed
21
22
   var $clc0 = "#c8c8d0";
   var $cl00 = "#000000";
Dries's avatar
   
Dries committed
23

Dries's avatar
   
Dries committed
24
   // color set #1:
Dries's avatar
Dries committed
25
26
27
28
   var $brcolor1 = "#000000";   // border color
   var $bgcolor1 = "#B5BECE";
   var $fgcolor1 = "#000000";   // table body color
   var $hlcolor1 = "#000000";   // high-light color
Dries's avatar
   
Dries committed
29
   var $sectioncolor = "#202020";
Dries's avatar
Dries committed
30

Dries's avatar
   
Dries committed
31
   // color set #2:
Dries's avatar
Dries committed
32
33
34
   var $bgcolor2 = "#EEEEEE";
   var $fgcolor2 = "#000000";

Dries's avatar
   
Dries committed
35
   // color set #3:
Dries's avatar
Dries committed
36
37
   var $bgcolor3 = "#D7D7D7";
   var $fgcolor3 = "#000000";
Dries's avatar
   
Dries committed
38

39
40
41
42
   function system($field) {
     $system["name"] = "UnConeD";
     $system["author"] = "Steven Wittens";
     $system["description"] = "Internet explorer, Netscape, Opera";
Dries's avatar
   
Dries committed
43

44
45
46
     return $system[$field];
   }

47
   function header($title = "") {
Dries's avatar
Dries committed
48
49
50
51
     srand((double)microtime()*1000000);
    ?>
     <HTML>
     <HEAD>
Dries's avatar
   
Dries committed
52
      <?php print theme_head($main); ?>
53
      <TITLE><?php echo ($title ? ($title . " - ") : "") . variable_get(site_name, "drupal"); ?></TITLE>
Dries's avatar
   
Dries committed
54
55
56
57
58
59
60
61
62
63
64
      <STYLE type="text/css">
       <!--
        TABLE { border-width: 0; }
        TD { border-width: 0; font-size: 10pt; font-family: verdana,helvetica,arial; }
        P,UL,LI,DIV,FORM,EM,BLOCKQUOTE { font-size: 10pt; font-family: verdana,helvetica,arial; }
        BODY { margin: 10px; font-size: 10pt; font-family: verdana,helvetica,arial; }
        SMALL { font-size: 8pt; }
        BIG { font-size: 12pt; }
        HR { height: 1px; color: #000000; }
       -->
      </STYLE>
Dries's avatar
Dries committed
65
     </HEAD>
Steven Wittens's avatar
Steven Wittens committed
66
     <BODY TEXT="#000000" BGCOLOR="<?php print $this->clc0; ?>" ALINK="#000000" LINK="#404040" VLINK="#404040" MARGINHEIGHT="10" MARGINWIDTH="10">
67
     <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" WIDTH="100%">
68
     <TR><TD BGCOLOR="<?php print $this->cl00; ?>"><IMG SRC="<?php print $this->path; ?>/images/null.gif" WIDTH="10"></TD><TD BGCOLOR="<?php print $this->clc0; ?>"><IMG SRC="<?php print $this->path; ?>/images/null.gif" WIDTH="4"></TD>
Steven Wittens's avatar
Steven Wittens committed
69
70
     <TD BGCOLOR="<?php print $this->cl80; ?>">
      <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="9" BGCOLOR="<?php print $this->cl80; ?>">
Dries's avatar
Dries committed
71
       <TR>
Dries's avatar
   
Dries committed
72
        <TD COLSPAN="2">
73
         <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BGCOLOR="<?php echo $this->brcolor1; ?>"><TR><TD ALIGN="CENTER"><TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="4"><TR><TD ALIGN="CENTER" BGCOLOR="<?php echo $this->bgcolor2; ?>"><IMG SRC="<?php print $this->path; ?>/images/logo.png" ALT="logo"></TD></TR></TABLE></TD></TR></TABLE>
Dries's avatar
   
Dries committed
74
        </TD>
Dries's avatar
Dries committed
75
76
77
       </TR>
       <TR>
        <TD COLSPAN="2" ALIGN="CENTER">
78
         <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BGCOLOR="<?php echo $this->brcolor1; ?>"><TR><TD ALIGN="CENTER"><TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="4"><TR><TD ALIGN="CENTER" BGCOLOR="<?php echo $this->bgcolor2; ?>"><?php print $this->links(link_page()); ?></TD></TR></TABLE></TD></TR></TABLE>
Dries's avatar
Dries committed
79
80
        </TD>
       </TR>
Steven Wittens's avatar
Steven Wittens committed
81
       <TR><TD COLSPAN="2"><?php
Dries's avatar
Dries committed
82
83
84
            print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" BGCOLOR=\"$this->brcolor1;\" WIDTH=\"100%\">";
            print "<TR><TD>";
            print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"1\" WIDTH=\"100%\">";
85
            print "<TR><TD ALIGN=\"center\" BGCOLOR=\"$this->bgcolor2\"><FONT COLOR=\"$this->fgcolor1\"><IMG SRC=\"" . $this->path . "/images/null.gif\" WIDTH=\"2\" HEIGHT=\"2\"></FONT></TD></TR>";
Dries's avatar
Dries committed
86
            print "</TABLE>";
Dries's avatar
   
Dries committed
87
            print "</TD></TR></TABLE>";
Dries's avatar
Dries committed
88
89
       ?></TD></TR>
       <TR>
90
       <TD VALIGN="top" WIDTH="80%">
Steven Wittens's avatar
Steven Wittens committed
91
    <?php
Dries's avatar
Dries committed
92
93
   }

Dries's avatar
   
Dries committed
94
   function node($node, $main = 0) {
Dries's avatar
Dries committed
95

Dries's avatar
   
Dries committed
96
        print "\n<!-- node: \"$node->title\" -->\n";
Dries's avatar
Dries committed
97
        ?>
Steven Wittens's avatar
Steven Wittens committed
98
        <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%">
Dries's avatar
   
Dries committed
99
100
        <TR><TD>
         <TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
101
          <TR><TD COLSPAN="2" BGCOLOR="<?php echo $this->bgcolor1; ?>" WIDTH="100%"><table width="100%" cellpadding="0" cellspacing="0"><tr><td width="100%"><FONT COLOR="<?php echo $this->fgcolor1; ?>"><B><?php echo "". check_output($node->title) .""; ?></B></FONT></td><td valign="middle" align="center"><IMG SRC="<?php print $this->path; ?>/images/icon.gif" valign="middle"></td></tr></table></TD></TR>
Steven Wittens's avatar
Steven Wittens committed
102
103
          <TR BGCOLOR="<?php echo $this->bgcolor2; ?>">
           <?php
104
105
106
107
            if (function_exists("taxonomy_node_get_terms")) {
              if ($terms = taxonomy_node_get_terms($node->nid)) {
                $taxlinks = array();
                foreach ($terms as $term) {
108
                  $taxlinks[] = l($term->name, array("or" => $term->tid), "index");
109
110
111
                }
                $taxo = $this->links($taxlinks);
              }
Dries's avatar
   
Dries committed
112
            }
113
            print "<TD WIDTH=\"70%\" BGCOLOR=\"$this->bgcolor2\"><SMALL>" . t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))) . "</TD><TD WIDTH=\"30%\" BGCOLOR=\"$this->bgcolor2\" ALIGN=\"center\" NOWRAP><B>". $taxo ."</B>";
Dries's avatar
   
Dries committed
114
115
116
           ?>
          </TD>
         </TR>
Steven Wittens's avatar
Steven Wittens committed
117
118
119
         <TR BGCOLOR="<?php echo $this->bgcolor2; ?>">
          <TD BGCOLOR="<?php echo $this->bgcolor2 ?>" COLSPAN="2">
          <?php
Dries's avatar
   
Dries committed
120
121
122
123
124
125
           if ($main && $node->teaser) {
             echo "<P>". check_output($node->teaser, 1) ."</P>";
           }
           else {
             echo "<P>". check_output($node->body, 1) ."</P>";
           }
Dries's avatar
   
Dries committed
126
127
128
          ?>
          </TD>
         </TR>
Jeroen's avatar
Hi,    
Jeroen committed
129
         <?php
130
131
           if ($links = link_node($node, $main)) {
             echo "<TR BGCOLOR=\"". $this->bgcolor3 ."\"><TD BGCOLOR=\"". $this->bgcolor3 ."\" ALIGN=\"right\" COLSPAN=\"2\">[ ". $this->links($links) ." ]</TD></TR>";
Dries's avatar
   
Dries committed
132
           }
Dries's avatar
Dries committed
133
         ?>
Dries's avatar
   
Dries committed
134
       </TABLE></TD></TR></TABLE><BR>
Steven Wittens's avatar
Steven Wittens committed
135
      <?php
Dries's avatar
Dries committed
136
137
   }

Dries's avatar
   
Dries committed
138
   function comment($comment, $link) {
Dries's avatar
   
Dries committed
139
     print "\n<!-- Comment: \"$comment->subject\" by $comment->name -->\n";
Dries's avatar
Dries committed
140
141

     ?>
Jeroen's avatar
Hi,    
Jeroen committed
142
      <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%">
Dries's avatar
Dries committed
143
      <TR><TD>
Jeroen's avatar
Hi,    
Jeroen committed
144
     <?php
Dries's avatar
Dries committed
145

Dries's avatar
   
Dries committed
146
     // Create comment header:
Dries's avatar
Dries committed
147
148
149
     echo "<TABLE BORDER=\"0\" CELLPADDING=\"4\" CELLSPACING=\"1\" WIDTH=\"100%\">";
     echo " <TR BGCOLOR=\"$this->bgcolor1\">";
     echo "  <TD BGCOLOR=\"$this->bgcolor1\">";
Steven Wittens's avatar
Steven Wittens committed
150
     echo "   <TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"1\" WIDTH=\"100%\">";
Dries's avatar
Dries committed
151

Dries's avatar
   
Dries committed
152
     // Subject:
Dries's avatar
Dries committed
153
     echo "    <TR>";
Steven Wittens's avatar
Steven Wittens committed
154
     echo "     <TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"5%\"><FONT COLOR=\"$this->hlcolor1\"><B>" . t("Subject") . ":</B></FONT></TD><TD WIDTH=\"80%\">";
Steven Wittens's avatar
Steven Wittens committed
155
     echo "      <B><FONT COLOR=\"$this->fgcolor1\">" . check_output($comment->subject) . "</FONT></B>";
Dries's avatar
Dries committed
156
157
     echo "     </TD>";

Dries's avatar
   
Dries committed
158
     // Moderation:
Dries's avatar
Dries committed
159
     echo "     <TD ALIGN=\"right\" ROWSPAN=\"3\" VALIGN=\"middle\" WIDTH=\"15%\">";
Dries's avatar
   
Dries committed
160
     print comment_moderation($comment);
Dries's avatar
Dries committed
161
162
163
     echo "     </TD>";
     echo "    </TR>";

Dries's avatar
   
Dries committed
164
     // Author:
Dries's avatar
Dries committed
165
     echo "    <TR>";
Dries's avatar
   
Dries committed
166
     echo "     <TD ALIGN=\"right\" VALIGN=\"top\">" . t("Author") . ":</TD><TD><B>" . format_name($comment) . "</B> ";
Dries's avatar
Dries committed
167
168
169
     echo "     </TD>";
     echo "    </TR>";

Dries's avatar
   
Dries committed
170
     // Date
Steven Wittens's avatar
Steven Wittens committed
171
     echo "    <TR><TD ALIGN=\"right\">" . t("Date") . ":</TD><TD>". format_date($comment->timestamp) ."</TD></TR>";
Dries's avatar
Dries committed
172
173
174
175
176

     echo "   </TABLE>";
     echo "  </TD>";
     echo " </TR>";

Dries's avatar
   
Dries committed
177
     // Print body of comment:
Steven Wittens's avatar
Steven Wittens committed
178
     if ($comment) echo " <TR><TD BGCOLOR=\"$this->bgcolor2\">". check_output($comment->comment, 1) ."</TD></TR>";
Dries's avatar
Dries committed
179

Dries's avatar
   
Dries committed
180
     // Print bottom link(s):
Dries's avatar
Dries committed
181
182
     echo " <TR><TD ALIGN=\"right\" BGCOLOR=\"$this->bgcolor3\">[ $link ]</TD></TR>";
     echo " </TABLE>";
Jeroen's avatar
Hi,    
Jeroen committed
183
     ?></TD></TR></TABLE><BR><?php
Dries's avatar
Dries committed
184
185
   }

186
   function box($subject, $content, $region = "main") {
Dries's avatar
Dries committed
187
     ?>
Jeroen's avatar
Hi,    
Jeroen committed
188
      <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%">
Dries's avatar
Dries committed
189
      <TR><TD>
Jeroen's avatar
Hi,    
Jeroen committed
190
     <?php
Dries's avatar
Dries committed
191
192

     print "<TABLE BORDER=\"0\" CELLPADDING=\"3\" CELLSPACING=\"1\" WIDTH=\"100%\">";
Steven Wittens's avatar
Steven Wittens committed
193
     print " <TR><TD ALIGN=\"center\" BGCOLOR=\"$this->bgcolor1\"><FONT COLOR=\"$this->fgcolor1\"><B>$subject</B></FONT></TD></TR>";
Dries's avatar
   
Dries committed
194
     print " <TR><TD BGCOLOR=\"$this->bgcolor2\">$content</TD></TR>";
Dries's avatar
Dries committed
195
196
197
198
199
     print "</TABLE>";

     ?>
      </TD></TR>
      </TABLE><BR>
Jeroen's avatar
Hi,    
Jeroen committed
200
     <?php
Dries's avatar
   
Dries committed
201

Dries's avatar
Dries committed
202
203
204
205
206
   }

   function footer() {
    ?>
       </TD>
207
       <TD VALIGN="top" WIDTH="20%">
Jeroen's avatar
Hi,    
Jeroen committed
208
        <?php
209
          theme_blocks("all", $this);
Dries's avatar
Dries committed
210
211
212
        ?>
       </TD>
      </TR>
Jeroen's avatar
Hi,    
Jeroen committed
213
       <TR><TD COLSPAN="2"><?php
Dries's avatar
Dries committed
214
215
216
            print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"0\" BGCOLOR=\"$this->brcolor1;\" WIDTH=\"100%\">";
            print "<TR><TD>";
            print "<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"1\" WIDTH=\"100%\">";
217
            print "<TR><TD ALIGN=\"center\" BGCOLOR=\"$this->bgcolor2\"><FONT COLOR=\"$this->fgcolor1\"><IMG SRC=\"" . $this->path . "/images/null.gif\" WIDTH=\"2\" HEIGHT=\"2\"></FONT></TD></TR>";
Dries's avatar
Dries committed
218
            print "</TABLE>";
Steven Wittens's avatar
Steven Wittens committed
219
            print "</TD></TR></TABLE>";
Dries's avatar
Dries committed
220
221
222
       ?></TD></TR>
      <TR>
       <TD COLSPAN="2">
223
        <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0" BGCOLOR="<?php echo $this->brcolor1; ?>"><TR><TD ALIGN="CENTER"><TABLE BORDER="0" WIDTH="100%" CELLSPACING="1" CELLPADDING="4"><TR><TD ALIGN="CENTER" BGCOLOR="<?php echo $this->bgcolor2; ?>"><?php print $this->links(link_page()); ?></TD></TR></TABLE></TD></TR></TABLE>
Dries's avatar
Dries committed
224
225
226
       </TD>
      </TR>
     </TABLE>
227
    </TD><TD BGCOLOR="<?php print $this->clc0; ?>"><IMG SRC="<?php print $this->path; ?>/images/null.gif" WIDTH="4"></TD><TD BGCOLOR="<?php print $this->cl00; ?>"><IMG SRC="<?php print $this->path; ?>/images/null.gif" WIDTH="10"></TD></TR>
Dries's avatar
Dries committed
228
    </TABLE>
Dries's avatar
   
Dries committed
229
    </BODY>
Dries's avatar
Dries committed
230
    </HTML>
Jeroen's avatar
Hi,    
Jeroen committed
231
    <?php
Dries's avatar
Dries committed
232
233
   }
 }
Dries's avatar
   
Dries committed
234

Dries's avatar
Dries committed
235
?>