goofy.theme 11.7 KB
Newer Older
1 2 3
<?php

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

5
   Theme: Goofy
6
   Author: Steven Wittens (UnConeD)
7
   Email: unconed@drop.org
Steven Wittens's avatar
Steven Wittens committed
8
   Description: Colourful, graphical, orange theme for high-resolutions.
9
   Notes: Only boxes on the right, because the graphics take up a lot
Steven Wittens's avatar
Steven Wittens committed
10
          of horizontal space.
Dries's avatar
 
Dries committed
11

12 13 14 15 16 17
  *********************************************************************/

  class Theme {

    function header() {
?>
Dries's avatar
 
Dries committed
18 19
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
20
  <head>
Dries's avatar
 
Dries committed
21
   <title><?php echo variable_get(site_name, "drupal"); ?></title>
22
   <style type="text/css">
Dries's avatar
 
Dries committed
23
   <!--
24 25 26
     body { background-color: #FFFFFF; font-size: 10pt; font-family: tahoma,helvetica,arial; }
     p,ul,li,div,form,em,blockquote,quote { font-size: 10pt; font-family: tahoma,helvetica,arial; }
     td { font-family: tahoma,arial,helvetica; font-size: 10pt; }
Dries's avatar
 
Dries committed
27 28 29
     td.oru { background: url("themes/goofy/images/or-u.png"); width: 100%; }
     td.ord { background: url("themes/goofy/images/or-d.png"); width: 100%; }
     td.orl { background: url("themes/goofy/images/or-l.png"); }
30
     td.orr { background: url("themes/goofy/images/or-r.png"); }
Dries's avatar
 
Dries committed
31 32 33 34
     td.orcnt { background: #FBC636; width: 100%; font-family: tahoma,arial,helvetica; font-size: 10pt; font-weight: bold; text-align: center; }
     td.gru { background: url("themes/goofy/images/gr-u.png"); width: 100%; }
     td.grd { background: url("themes/goofy/images/gr-d.png"); width: 100%; }
     td.grl { background: url("themes/goofy/images/gr-l.png"); }
35
     td.grr { background: url("themes/goofy/images/gr-r.png"); }
Dries's avatar
 
Dries committed
36 37 38 39
     td.grcnt { background: #C6C6C6; width: 100%; font-family: tahoma,arial,helvetica; font-size: 10pt; }
     td.lgu { background: url("themes/goofy/images/lg-u.png"); width: 100%; }
     td.lgd { background: url("themes/goofy/images/lg-d.png"); width: 100%; }
     td.lgl { background: url("themes/goofy/images/lg-l.png"); }
40 41
     td.lgr { background: url("themes/goofy/images/lg-r.png"); }
     td.lgcnt { background: #E4E4E4; width: 100%; font-family: tahoma,arial,helvetica; font-size: 10pt; white-space: normal; }
Dries's avatar
 
Dries committed
42

43 44
     small { font-size: 8pt; }
     big { font-size: 12pt; }
Dries's avatar
 
Dries committed
45

46
     hr { color: #404040; height: 1px; }
Dries's avatar
 
Dries committed
47

48 49 50 51
     a { color: #804000; text-decoration: none; }
     a:link { color: #804000; }
     a:visited { color: #804000; }
     a:active { color: #804000; }
Dries's avatar
 
Dries committed
52

53 54
   -->
   </style>
55 56 57 58
   </head>
   <body>
    <table border="0" cellspacing="3" cellpadding="0" width="100%">
     <tr>
Dries's avatar
 
Dries committed
59
      <td colspan="2" width="100%"><img src="themes/goofy/images/logo.png" alt=""><br>
60 61 62 63
       <?php $this->linksbar(); ?>
      </td>
     </tr>
     <tr>
64
      <td valign="top" width="100%">
65 66 67
<?php

    } // close header function
Dries's avatar
 
Dries committed
68

69 70 71 72
    function linksbar() {
    ?>
           <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
Steven Wittens's avatar
Steven Wittens committed
73 74 75
         <td><img src="themes/goofy/images/lg-ul.png" alt=""></td>
         <td class="lgu" width="100%"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td><img src="themes/goofy/images/lg-ur.png" alt=""></td>
76 77
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
78
         <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
Dries's avatar
 
Dries committed
79
         <td class="lgcnt" width="100%" valign="top"><div align="center"><big><?php print theme_link(" | "); ?></big></div></td>
Steven Wittens's avatar
Steven Wittens committed
80
         <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
81 82
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
83 84 85
         <td><img src="themes/goofy/images/lg-dl.png" alt=""></td>
         <td class="lgd" width="100%"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td><img src="themes/goofy/images/lg-dr.png" alt=""></td>
86 87 88 89 90
        </tr>
       </table>
   <?php
    }

Dries's avatar
 
Dries committed
91
    function story($story, $main = 0) {
Dries's avatar
 
Dries committed
92

Dries's avatar
 
Dries committed
93
    echo "\n<!-- story: \"$story->title\" -->\n";
94 95 96 97
?>

       <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
Steven Wittens's avatar
Steven Wittens committed
98 99 100
         <td><img src="themes/goofy/images/or-ul.png" alt=""></td>
         <td class="oru" width="100%" colspan="2"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td><img src="themes/goofy/images/or-ur.png" alt=""></td>
101 102
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
103
         <td class="orl"><img src="themes/goofy/images/null.gif" alt=""></td>
Dries's avatar
 
Dries committed
104
         <td class="orcnt" width="100%" valign="top" colspan="2"><?php echo check_output($story->title); ?></td>
Steven Wittens's avatar
Steven Wittens committed
105
         <td class="orr"><img src="themes/goofy/images/null.gif" alt=""></td>
106 107
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
108 109 110
         <td class="orl"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td class="orcnt" width="100%" colspan="2"><img src="themes/goofy/images/null.gif" height="5" alt=""></td>
         <td class="orr"><img src="themes/goofy/images/null.gif" alt=""></td>
111 112
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
113 114 115
         <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td class="lgcnt" width="100%" colspan="2"><img src="themes/goofy/images/null.gif" height="4" alt=""></td>
         <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
116 117
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
118
         <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
Steven Wittens's avatar
Steven Wittens committed
119
         <td class="lgcnt"><small><?php echo strtr(t("Submitted by %a on %b"), array("%a" => format_username($story->userid), "%b" => format_date($story->timestamp, "large"))); ?></small></td>
120
         <td class="lgcnt" nowrap><div align="right"><?php echo category_name($story->cid) ." / ". topic_name($story->tid); ?></div></td>
Steven Wittens's avatar
Steven Wittens committed
121
         <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
122 123
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
124
         <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
125 126
         <td class="lgcnt" width="100%" colspan="2"><hr color="#404040" size="1">
         <?php
Steven Wittens's avatar
Steven Wittens committed
127
          echo check_output($story->abstract, 1) . "<br>";
Dries's avatar
 
Dries committed
128
          if (!$main && $story->body)
Steven Wittens's avatar
Steven Wittens committed
129
            echo "<br>" . check_output($story->body, 1);
130 131
         ?>
         <hr color="#404040" size="1"><div align="right">
Dries's avatar
 
Dries committed
132
         <?php
Dries's avatar
 
Dries committed
133
          if ($main)
134 135
            echo theme_morelink($this, $story);
         ?></div></td>
Steven Wittens's avatar
Steven Wittens committed
136
         <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
137 138
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
139 140 141
         <td><img src="themes/goofy/images/lg-dl.png" alt=""></td>
         <td class="lgd" width="100%" colspan="2"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td><img src="themes/goofy/images/lg-dr.png" alt=""></td>
142 143 144 145 146 147 148 149 150 151 152
        </tr>
       </table><br>
<?php
    } // close story function

    function comment($comment, $link = "") {
      echo "<A NAME=\"$comment->cid\"></A>\n";
      ?>

       <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
Steven Wittens's avatar
Steven Wittens committed
153 154 155
         <td><img src="themes/goofy/images/or-ul.png" alt=""></td>
         <td class="oru" width="100%" colspan="2"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td><img src="themes/goofy/images/or-ur.png" alt=""></td>
156 157
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
158
         <td class="orl"><img src="themes/goofy/images/null.gif" alt=""></td>
159 160 161 162 163 164 165 166 167 168 169 170 171 172
         <td class="orcnt" width="100%" valign="top" colspan="2"><?php
     echo "   <table border=\"0\" cellpadding=\"0\" cellspacing=\"1\" width=\"100%\">";

     // Subject:
     echo "    <tr>";
     echo "     <td valign=\"top\" width=\"5%\"><div align=\"right\"><b>" . t("Subject") . ":</b>&nbsp;</div></td><td width=\"80%\"><b>" . check_output($comment->subject) . "</b></td>";

     // Moderation:
     echo "     <td rowspan=\"3\" valign=\"middle\" width=\"15%\"><div align=\"right\">" . comment_moderation($comment) . "</div></td>";
     echo "    </tr>";

     // Author:
     echo "    <tr>";
     echo "     <td valign=\"top\"><div align=\"right\">" . t("Author") . ":&nbsp;</div></td><td><b>" . format_username($comment->userid) . "</b>";
Dries's avatar
 
Dries committed
173
     if ($comment->userid) {
174 175 176 177 178 179 180 181 182 183 184 185
       // Display extra information line:
       if ($comment->fake_email) $info .= format_email($comment->fake_email);
       if (eregi("http://",$comment->url)) $info .= ($info?" | ":"") . format_url($comment->url);
       if ($info) echo "<br>[ $info ]";
     }
     echo "     </td>";
     echo "    </tr>";

     // Date
     echo "    <tr><td><div align=\"right\">" . t("Date:") . "&nbsp;</div></td><td>". format_date($comment->timestamp) ."</td></tr>";

     echo "   </table>";
Dries's avatar
 
Dries committed
186

187
         ?></td>
Steven Wittens's avatar
Steven Wittens committed
188
         <td class="orr"><img src="themes/goofy/images/null.gif" alt=""></td>
189 190
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
191 192 193
         <td class="orl"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td class="orcnt" width="100%" colspan="2"><img src="themes/goofy/images/null.gif" height="5" alt=""></td>
         <td class="orr"><img src="themes/goofy/images/null.gif" alt=""></td>
194 195
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
196 197 198
         <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td class="lgcnt" width="100%" colspan="2"><img src="themes/goofy/images/null.gif" height="4" alt=""></td>
         <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
199 200
        </tr>
        <?php
Dries's avatar
 
Dries committed
201
        if ($comment) {
202 203
        ?>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
204
         <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
Dries's avatar
 
Dries committed
205
         <td class="lgcnt" width="100%" colspan="2"><?php
206 207 208
          echo check_output($comment->comment, 1);
          echo "<br><hr color=\"#404040\" size=\"1\"><div align=\"right\">[ $link ]</div>";
          ?></td>
Steven Wittens's avatar
Steven Wittens committed
209
         <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
210 211 212 213 214
        </tr>
        <?php
        }
        ?>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
215 216 217
         <td><img src="themes/goofy/images/lg-dl.png" alt=""></td>
         <td class="lgd" width="100%" colspan="2"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td><img src="themes/goofy/images/lg-dr.png" alt=""></td>
218 219 220
        </tr>
       </table><br>
       <?php
Dries's avatar
 
Dries committed
221

222 223 224 225 226 227 228
    } // close comment function

    function box($subject, $content, $options = "") {

?>
       <table border="0" cellspacing="0" cellpadding="0" width="100%">
        <tr>
Steven Wittens's avatar
Steven Wittens committed
229 230 231
         <td><img src="themes/goofy/images/or-ul.png" alt=""></td>
         <td class="oru" width="100%"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td><img src="themes/goofy/images/or-ur.png" alt=""></td>
232 233
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
234
         <td class="orl"><img src="themes/goofy/images/null.gif" alt=""></td>
235
         <td class="orcnt" width="100%" valign="top"><?php echo $subject; ?></td>
Steven Wittens's avatar
Steven Wittens committed
236
         <td class="orr"><img src="themes/goofy/images/null.gif" alt=""></td>
237 238
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
239 240 241
         <td class="orl"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td class="orcnt" width="100%"><img src="themes/goofy/images/null.gif" height="5" alt=""></td>
         <td class="orr"><img src="themes/goofy/images/null.gif" alt=""></td>
242 243
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
244 245 246
         <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
         <td class="lgcnt" width="100%"><img src="themes/goofy/images/null.gif" height="4" alt=""></td>
         <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
247 248
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
249
         <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
250
         <td class="lgcnt" width="100%"><?php echo $content; ?></td>
Steven Wittens's avatar
Steven Wittens committed
251
         <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
252 253
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
254 255 256
         <td><img src="themes/goofy/images/lg-dl.png" alt=""></td>
         <td class="lgd" width="100%"><img src="themes/goofy/images/null.gif" width="150" height="1" alt=""></td>
         <td><img src="themes/goofy/images/lg-dr.png" alt=""></td>
257 258 259 260 261 262 263 264 265 266
        </tr>
       </table><br>

<?php

    } // close box function

    function footer() {
?>
              </td>
267
              <td valign="top">
268 269 270 271 272
<?php
         global $PHP_SELF;

          theme_account($this);
          theme_blocks("all", $this);
Dries's avatar
 
Dries committed
273 274

?>
275
     </td>
Dries's avatar
 
Dries committed
276 277
    </tr>
    <tr><td colspan="2"><?php $this->linksbar(); ?></td></tr>
278 279 280 281 282 283 284 285
   </table>
  </body>
 </html>
<?
    }
  }

?>