unconed.theme 9.98 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 $themename = "unconed";

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

Dries's avatar
   
Dries committed
25
   // color set #1:
Dries's avatar
Dries committed
26
27
28
29
   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
30
   var $sectioncolor = "#202020";
Dries's avatar
Dries committed
31

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

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

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

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

48
   function header($title = "") {
Dries's avatar
Dries committed
49
50
51
52
     srand((double)microtime()*1000000);
    ?>
     <HTML>
     <HEAD>
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%">
Steven Wittens's avatar
Steven Wittens committed
68
69
70
     <TR><TD BGCOLOR="<?php print $this->cl00; ?>"><IMG SRC="themes/<?php print $this->themename; ?>/images/null.gif" WIDTH="10"></TD><TD BGCOLOR="<?php print $this->clc0; ?>"><IMG SRC="themes/<?php print $this->themename; ?>/images/null.gif" WIDTH="4"></TD>
     <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
73
74
        <TD COLSPAN="2">
         <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="themes/<?php print $this->themename; ?>/images/logo.gif" ALT="logo"></TD></TR></TABLE></TD></TR></TABLE>
        </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
85
86
            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%\">";
            print "<TR><TD ALIGN=\"center\" BGCOLOR=\"$this->bgcolor2\"><FONT COLOR=\"$this->fgcolor1\"><IMG SRC=\"themes/" . $this->themename . "/images/null.gif\" WIDTH=\"2\" HEIGHT=\"2\"></FONT></TD></TR>";
            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%">
Dries's avatar
   
Dries committed
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="themes/<?php print $this->themename; ?>/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
112
113
                }
                $taxo = $this->links($taxlinks);
              }
            }            
            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) {
Steven Wittens's avatar
Steven Wittens committed
139
     print "<A NAME=\"$comment->cid\"></A>\n";
Dries's avatar
Dries committed
140

Dries's avatar
   
Dries committed
141
     print "\n<!-- Comment: \"$comment->subject\" by $comment->name -->\n";
Dries's avatar
Dries committed
142
143

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

Dries's avatar
   
Dries committed
148
     // Create comment header:
Dries's avatar
Dries committed
149
150
151
     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
152
     echo "   <TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"1\" WIDTH=\"100%\">";
Dries's avatar
Dries committed
153

Dries's avatar
   
Dries committed
154
     // Subject:
Dries's avatar
Dries committed
155
     echo "    <TR>";
Steven Wittens's avatar
Steven Wittens committed
156
     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
157
     echo "      <B><FONT COLOR=\"$this->fgcolor1\">" . check_output($comment->subject) . "</FONT></B>";
Dries's avatar
Dries committed
158
159
     echo "     </TD>";

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

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

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

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

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

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

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

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

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

Dries's avatar
Dries committed
204
205
206
207
208
   }

   function footer() {
    ?>
       </TD>
209
       <TD VALIGN="top" WIDTH="20%">
Jeroen's avatar
Hi,    
Jeroen committed
210
        <?php
211
          theme_blocks("all", $this);
Dries's avatar
Dries committed
212
213
214
        ?>
       </TD>
      </TR>
Jeroen's avatar
Hi,    
Jeroen committed
215
       <TR><TD COLSPAN="2"><?php
Dries's avatar
Dries committed
216
217
218
219
220
            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%\">";
            print "<TR><TD ALIGN=\"center\" BGCOLOR=\"$this->bgcolor2\"><FONT COLOR=\"$this->fgcolor1\"><IMG SRC=\"themes/" . $this->themename . "/images/null.gif\" WIDTH=\"2\" HEIGHT=\"2\"></FONT></TD></TR>";
            print "</TABLE>";
Steven Wittens's avatar
Steven Wittens committed
221
            print "</TD></TR></TABLE>";
Dries's avatar
Dries committed
222
223
224
       ?></TD></TR>
      <TR>
       <TD COLSPAN="2">
225
        <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
226
227
228
       </TD>
      </TR>
     </TABLE>
Jeroen's avatar
Hi,    
Jeroen committed
229
    </TD><TD BGCOLOR="<?php print $this->clc0; ?>"><IMG SRC="themes/<?php print $this->themename; ?>/images/null.gif" WIDTH="4"></TD><TD BGCOLOR="<?php print $this->cl00; ?>"><IMG SRC="themes/<?php print $this->themename; ?>/images/null.gif" WIDTH="10"></TD></TR>
Dries's avatar
Dries committed
230
    </TABLE>
Dries's avatar
   
Dries committed
231
    </BODY>
Dries's avatar
Dries committed
232
    </HTML>
Jeroen's avatar
Hi,    
Jeroen committed
233
    <?php
Dries's avatar
Dries committed
234
235
   }
 }
Dries's avatar
   
Dries committed
236

Dries's avatar
Dries committed
237
?>