goofy.theme 12.2 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
  *********************************************************************/

natrak's avatar
Changes  
natrak committed
14
  class Theme extends BaseTheme {
Dries's avatar
 
Dries committed
15
    // General colorset that can be used for this theme
16 17 18
    var $foreground = "#000000";
    var $background = "#FFFFFF";

19 20
    function header() {
?>
Dries's avatar
 
Dries committed
21 22
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
23
  <head>
Dries's avatar
 
Dries committed
24
   <title><?php echo variable_get(site_name, "drupal"); ?></title>
25
   <style type="text/css">
Dries's avatar
 
Dries committed
26
   <!--
27 28 29
     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
30 31 32
     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"); }
33
     td.orr { background: url("themes/goofy/images/or-r.png"); }
Dries's avatar
 
Dries committed
34 35 36 37
     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"); }
38
     td.grr { background: url("themes/goofy/images/gr-r.png"); }
Dries's avatar
 
Dries committed
39 40 41 42
     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"); }
43 44
     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
45

46 47
     small { font-size: 8pt; }
     big { font-size: 12pt; }
Dries's avatar
 
Dries committed
48

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

51 52 53 54
     a { color: #804000; text-decoration: none; }
     a:link { color: #804000; }
     a:visited { color: #804000; }
     a:active { color: #804000; }
Dries's avatar
 
Dries committed
55

56 57
   -->
   </style>
Dries's avatar
 
Dries committed
58
   <script language="JavaScript" type="text/javascript"><!--
59 60
function b(title,content) {document.writeln("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><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></tr><tr><td class=\"orl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"orcnt\" width=\"100%\" valign=\"top\">" + title + "</td><td class=\"orr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><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></tr><tr><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></tr><tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\" width=\"100%\">" + content + "</td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><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></tr></table><br>");}
function s(title,subleft,subright,body) {document.writeln("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><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></tr><tr><td class=\"orl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"orcnt\" width=\"100%\" valign=\"top\" colspan=\"2\">" + title + "</td><td class=\"orr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><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></tr><tr><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></tr><tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\"><small>" + subleft + "</small></td><td class=\"lgcnt\" nowrap><div align=\"right\">" + subright + "</div></td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\" width=\"100%\" colspan=\"2\"><hr color=\"#404040\" size=\"1\">" + body + "</div></td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><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></tr></table><br>");}
Dries's avatar
 
Dries committed
61
function c(subject,mod,author,date,body) {document.writeln("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><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></tr><tr><td class=\"orl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"orcnt\" width=\"100%\" valign=\"top\" colspan=\"2\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"1\" width=\"100%\"><tr><td valign=\"top\" width=\"5%\"><div align=\"right\"><b><?php echo t("Subject");  ?>:</b>&nbsp;</div></td><td width=\"80%\"><b>" + subject + "</b></td><td rowspan=\"3\" valign=\"middle\" width=\"15%\"><div align=\"right\">" + mod + "</div></td></tr><tr><td valign=\"top\"><div align=\"right\"><?php echo t("Author"); ?>:&nbsp;</div></td><td>" + author + "</td></tr><tr><td><div align=\"right\"><?php echo t("Date"); ?>:&nbsp;</div></td><td>" + date + "</td></tr></table></td><td class=\"orr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr><tr><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></tr><tr><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></tr>");if(body){document.writeln("<tr><td class=\"lgl\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td><td class=\"lgcnt\" width=\"100%\" colspan=\"2\">" + body + "</td><td class=\"lgr\"><img src=\"themes/goofy/images/null.gif\" alt=\"\"></td></tr>");};document.writeln("<tr><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></tr></table><br>");}
62 63
   //-->
   </script>
64 65 66 67
   </head>
   <body>
    <table border="0" cellspacing="3" cellpadding="0" width="100%">
     <tr>
Dries's avatar
 
Dries committed
68
      <td colspan="2" width="100%"><table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="left"><img src="themes/goofy/images/logo.png" alt=""></td><td align="right"><img src="themes/goofy/images/drupal.png" alt="Powered by Drupal"></td></tr></table>
69
<?php $this->linksbar(); ?>
70 71 72
      </td>
     </tr>
     <tr>
73
      <td valign="top" width="100%">
74 75
<?php
    } // close header function
Dries's avatar
 
Dries committed
76

Dries's avatar
 
Dries committed
77 78


79 80 81
    function linksbar() { // helper function to prevent double code
?>
       <table border="0" cellspacing="0" cellpadding="0" width="100%">
82
        <tr>
Steven Wittens's avatar
Steven Wittens committed
83 84 85
         <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>
86 87
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
88
         <td class="lgl"><img src="themes/goofy/images/null.gif" alt=""></td>
89
         <td class="lgcnt" width="100%" valign="top"><div align="center"><?php print $this->links(link_page()); ?></div></td>
Steven Wittens's avatar
Steven Wittens committed
90
         <td class="lgr"><img src="themes/goofy/images/null.gif" alt=""></td>
91 92
        </tr>
        <tr>
Steven Wittens's avatar
Steven Wittens committed
93 94 95
         <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>
96 97
        </tr>
       </table>
98 99
<?php
    } // close linksbar function
Dries's avatar
 
Dries committed
100

101

Dries's avatar
 
Dries committed
102
    function node($node, $main = 0) {
Dries's avatar
 
Dries committed
103 104
      echo "\n<!-- node: \"$node->title\" -->\n";
      $title = check_output($node->title);
Dries's avatar
 
Dries committed
105
      $subleft = strtr(t("Submitted by %a on %b"), array("%a" => format_name($node), "%b" => format_date($node->timestamp, "large")));
106
      $subright = node_index($node);
Dries's avatar
 
Dries committed
107
      $body = check_output($node->body, 1) . ($main ? "<hr color=\"#404040\" size=\"1\"><div align=\"right\">[ " . $this->links(link_node($node)) . " ]</div>" : "");
108
      print "<script language=\"JavaScript\"><!--\ns(\"". $this->stripbreaks(addslashes($title)) ."\",\"". $this->stripbreaks(addslashes($subleft)) ."\",\"". $this->stripbreaks(addslashes($subright)) ."\",\"". $this->stripbreaks(addslashes($body)) ."\"); // -->\n</script>\n";
Dries's avatar
 
Dries committed
109
    } // close node function
110

Dries's avatar
 
Dries committed
111

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

Dries's avatar
 
Dries committed
115
      $author = "<b>" . format_name($comment) . "</b>";
Dries's avatar
 
Dries committed
116
      if ($comment->name) {
117 118
        if ($comment->fake_email) $info[] = format_email($comment->fake_email);
        if (eregi("http://",$comment->url)) $info[] = format_url($comment->url);
119
        if ($info) $author .= "<br>[ ". implode(" | ",$info) . " ]";
120 121
      }
      $body = check_output($comment->comment, 1) . "<br><hr color=\"#404040\" size=\"1\"><div align=\"right\">[ $link ]</div>";
Dries's avatar
 
Dries committed
122

Dries's avatar
 
Dries committed
123
      print "<script language=\"JavaScript\"><!--\nc(\"". $this->stripbreaks(addslashes(check_output($comment->subject))) ."\",\"". $this->stripbreaks(addslashes(comment_moderation($comment))) ."\",\"". $this->stripbreaks(addslashes($author)) ."\",\"". $this->stripbreaks(addslashes(format_date($comment->timestamp))) ."\",\"". $this->stripbreaks(addslashes($body)) ."\"); // -->\n</script>\n";
124
    } // close comment function
Dries's avatar
 
Dries committed
125 126


127 128 129 130
    function stripbreaks($a) { // helper function for generating the javascripted boxes
      return str_replace("\n","\\n",str_replace("\r","\\r",$a));
    } // close stripbreaks function

Dries's avatar
 
Dries committed
131

132
    function box($subject, $content, $region = "main") {
133
      print "<script language=\"JavaScript\"><!--\nb(\"". $this->stripbreaks(addslashes($subject)) ."\",\"". $this->stripbreaks(addslashes($content)) ."\"); // -->\n</script>\n";
134 135
    } // close box function

Dries's avatar
 
Dries committed
136

137 138 139
    function footer() {
?>
              </td>
140
              <td valign="top">
141
<?php
Dries's avatar
 
Dries committed
142
          $this->user("all", $this);
143
          theme_blocks("all", $this);
Dries's avatar
 
Dries committed
144
?>
145
     </td>
Dries's avatar
 
Dries committed
146
    </tr>
147 148 149
    <tr><td colspan="2">
<?php $this->linksbar(); ?>
    </td></tr>
150 151 152 153
   </table>
  </body>
 </html>
<?
154 155
    } // close footer function
  } // close theme-class
156 157

?>