drupal/themes/jeroen/jeroen.theme

331 lines
14 KiB
Plaintext

<?php
/*********************************************************************
Theme: Jeroen
Author: Jeroen Bensch (Jeroen)
Email: jeroen@drop.org
Description: Very graphical theme using a cool pipe-design.
*********************************************************************/
class Theme extends BaseTheme {
// General colorset that can be used for this theme
var $foreground = "#000000";
var $background = "#E7E7E7";
/*
I am going to use some colors throughout this theme:
#000000 : black used for all links and the table in every box you'll see, I use it to create the thin black border around each.
#E7E7E7 : light grey bgcolor for every box you'll see before the background gets drawn over it.
#6C6C6C : grey used as bgcolor before the articles' and abstacts' background is drawn.
#202020 : dark grey text used on the headers in abstract and article.
#FEFEFE : white text on the dark grey headers of all boxes with the drop.org background in it.
#E09226 : orange-brown rust color used to give some finishing touches around links, you'll see. :)
*/
function header() {
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?php echo variable_get(site_name, "drupal"); ?> - Tears of technology</title>
<style type="text/css">
<!--
body,p,div,li,ul,td,em,FONT,BLOCKQUOTE,FORM{ font-size: 10pt; font-family: Helvetica,Lucida,sans-serif; }
SMALL { font-size: 10pt; }
-->
</style>
</head>
<body text="#202020" bgcolor="#FEFEFE" background="themes/jeroen/images/background.gif" alink="#000000" link="#000000" vlink="#000000">
<table width="100%" align="left" cellpadding="0" cellspacing="6" border="0">
<tr>
<td colspan="2" width="80%">
<?php $img = (rand(0,150) == 75) ? "logo2.gif" : "logo.gif"; ?>
<img src="themes/jeroen/images/<?php echo $img; ?>" alt=""><br /><br />
</td>
<td width="20%">
<?php
$mybox = 1;
$this->box("Drop where?", "<td align=\"left\" valign=\"top\">
<a href=\"index.php\">home</a><br />
<a href=\"module.php?mod=book\">handbook</a><br />
<a href=\"module.php?mod=search\">search</a>
</td>
<td align=\"right\" valign=\"top\">
<a href=\"module.php?mod=diary\">diary</a><br />
<a href=\"submit.php\">submit</a><br />
<a href=\"account.php\">account</a>
</td>");
?>
</td>
</tr>
<tr>
<td valign="top" align="right">
<?php
theme_blocks("left", $this);
?>
</td>
<td width="80%" valign="top" align="left">
<?php
} // close header function
function node($node, $main = 0) {
?>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="left" valign="bottom" width="20" height="20" background="themes/jeroen/images/<?php echo (rand(0, 1) ? "news1.gif" : "news3.gif"); ?>" nowrap>&nbsp;</td>
<td align="center" valign="top" width="100%" background="themes/jeroen/images/newsmiddle.gif" nowrap>
<B><?php echo "". check_output($node->title) .""; ?></B>
</td>
<td align="right" valign="bottom" width="20" background="themes/jeroen/images/<?php echo (rand(0, 1) == 0) ? "news2.gif" : "news4.gif"; if (rand(0,100) == 50) "news5.gif"; ?>" nowrap>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>
<table border="0" cellpadding="1" cellspacing="0" BGCOLOR="#000000" width="100%">
<tr>
<td>
<table border="0" cellpadding="2" cellspacing="0" width="100%" BGCOLOR="#E7E7E7" background="themes/jeroen/images/sketch.gif">
<tr>
<td align="left" background="themes/jeroen/images/menutitle.gif" nowrap>
<FONT COLOR="#FEFEFE">
<?php
switch (rand(0,13)) {
case 0: $how = "Yelled"; break; case 1: $how = "Whispered"; break;
case 2: $how = "Reported"; break; case 3: $how = "Posted"; break;
case 4: $how = "Beamed through"; break; case 5: $how = "Faxed"; break;
case 6: $how = "Tossed"; break; case 7: $how = "Morsed"; break;
case 8: $how = "Flagged"; break; case 9: $how = "Written"; break;
case 10: $how = "Made up"; break; case 11: $how = "Uploaded"; break;
case 12: $how = "Forged"; break;
default: $how = "Sneaked through";
}
echo "<FONT SIZE=\"-1\">". strtr(t("$how by %a on %b"), array("%a" => format_username($node->userid), "%b" => format_date($node->timestamp), "large")) ."</FONT>";
?>
</FONT>
</td>
<?php
echo "<td align=\"right\" background=\"themes/jeroen/images/menutitle.gif\" nowrap><b>". node_index($node) ."</b>";
?>
</td>
</tr>
<tr>
<td colspan="2" valign="top" width="100%">
<?php
echo "<br />". check_output($node->body, 1) ."<br />";
?>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<?php
if ($main)
echo $this->links(node_link($node));
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
<?php
} // close node function
function comment($comment, $link = "") {
echo "<A NAME=\"$comment->cid\"></a>\n";
// Create comment header:
echo " <table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" width=\"100%\">";
echo " <tr>";
echo " <td>";
echo " <table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" BGCOLOR=\"#000000\" width=\"100%\">";
echo " <tr>";
echo " <td>";
echo " <table background=\"themes/jeroen/images/menutitle.gif\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">";
echo " <tr>";
echo " <td>";
echo " <table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\">";
// Subject:
echo " <tr>";
echo " <td align=\"right\" width=\"5%\">";
echo " <FONT COLOR=\"#FEFEFE\"><B>". t("Subject") .":</B>";
echo " </td>";
echo " <td width=\"80%\">";
echo " <B>". check_output($comment->subject) ."</B>";
echo " </FONT>";
echo " </td>";
// Moderation:
echo " <td BGCOLOR=\"#6C6C6C\" background=\"themes/jeroen/images/menutitle.gif\" align=\"right\" ROWSPAN=\"2\" valign=\"middle\" width=\"15%\">";
echo " <FONT COLOR=\"#000000\">";
echo comment_moderation($comment);
echo " </FONT>";
echo " </td>";
echo " </tr>";
// Author:
echo " <tr>";
echo " <td align=\"right\"><FONT COLOR=\"#FEFEFE\">". t("Author") .":</FONT></td><td><B>". format_username($comment->userid) ."</B> ";
if ($comment->userid) {
// Display extra information line:
if ($comment->fake_email) $info .= format_email($comment->fake_email);
if (eregi("http://",$comment->url)) $info .= " | " . format_url($comment->url);
}
// Date:
echo " <FONT COLOR=\"#FEFEFE\">on ". format_date($comment->timestamp) ."</FONT>";
echo " </td>";
echo " </tr>";
echo " </table>";
echo " </td>";
echo " </tr>";
// Print body of comment:
if ($comment) echo "
<tr>
<td BGCOLOR=\"#E7E7E7\" background=\"themes/jeroen/images/sketch.gif\">". check_output($comment->comment, 1) ."</td>
</tr>";
// Print bottom link(s):
echo " <tr><td align=\"right\" BGCOLOR=\"#E7E7E7\" background=\"themes/jeroen/images/sketch.gif\"><FONT COLOR=\"#E09226\">[</FONT> $link <FONT COLOR=\"#E09226\">]</FONT></td></tr>";
echo " </table>";
echo " </td>";
echo " </tr>";
echo " </table>";
echo " </td>";
echo " </tr>";
echo " </table>";
echo " <br />";
} // close comment function
function box($subject, $content, $region = "main") {
$img = (rand(0, 50) == 25) ? "boxbottomright2.gif" : "boxbottomright1.gif";
$width = rand(10, 200);
$img2 = (rand(0, 100) == 50) ? "boxtopleftside2.gif" : "boxtopleftside1.gif";
?>
<table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td background="themes/jeroen/images/boxtopleft.gif" width="20" height="20" border="0" nowrap>&nbsp;</td>
<td width="<?php echo $width; ?>" background="themes/jeroen/images/boxtop.gif">&nbsp;</td>
<td background="themes/jeroen/images/boxtopmiddle.gif" nowrap>&nbsp;</td>
<td background="themes/jeroen/images/boxtop.gif"nowrap>&nbsp;</td>
<td width="20" background="themes/jeroen/images/boxtopright.gif" nowrap>&nbsp;</td>
</tr>
<tr>
<td background="themes/jeroen/images/<?php echo $img2; ?>" height="20">&nbsp;</td>
<td align="center" width="100%" colspan="3" background="themes/jeroen/images/menutitle.gif" nowrap>
<FONT COLOR="#FEFEFE"><?php echo $subject; ?></FONT>
</td>
<td background="themes/jeroen/images/boxtoprightside.gif">&nbsp;</td>
</tr>
<tr>
<td background="themes/jeroen/images/boxleft.gif" nowrap>&nbsp;</td>
<td colspan="3" align="center" BGCOLOR="#E7E7E7" background="themes/jeroen/images/sketch.gif">
<table width="100%" border="0">
<tr>
<?php
if ($mybox == 1) {
echo $content;
$mybox = 0;
}
else {
echo "<td>";
echo $content;
echo "</td>";
}
?>
</tr>
</table>
</td>
<td background="themes/jeroen/images/boxright.gif" nowrap>&nbsp;</td>
</tr>
<tr>
<td background="themes/jeroen/images/boxbottomleft.gif" height="20" nowrap>&nbsp;</td>
<td colspan="3" background="themes/jeroen/images/boxbottom.gif">&nbsp;</td>
<td background="themes/jeroen/images/<?php echo $img; ?>" nowrap>&nbsp;</td>
</tr>
</table>
<br />
<?php
} // close box function
function footer() {
?>
</td>
<td width="20%" valign="top" align="right">
<?php
global $PHP_SELF;
theme_account("right", $this);
theme_blocks("right", $this);
?>
</td>
</tr>
<tr>
<td></td>
<td>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="left" width="20" height="20" background="themes/jeroen/images/footerleft.gif" nowrap>&nbsp;</td>
<td width="100%" background="themes/jeroen/images/footer.gif" align="center" valign="middle">
<FONT COLOR="#E09226" SIZE="2">[ <?php print $this->links(link_page()); ?> ] </FONT>
</td>
<td align="right" width="20" background="themes/jeroen/images/footerright.gif" nowrap>&nbsp;</td>
</tr>
</table>
</td>
<td></td>
</tr>
</table>
</body>
</html>
<?php
}
}
?>