drupal/themes/jeroen/jeroen.theme

383 lines
18 KiB
Plaintext
Raw Normal View History

<?
class Theme {
// color set #1:
var $bgc1 = "#6C6C6C"; // header color
var $fgc1 = "#000000"; // link color
var $hlc1 = "#"; // ? color
// color set #2:
var $bgc2 = "#E7E7E7"; // color
var $fgc2 = "#FEFEFE"; // header-text color
var $hlc2 = "#E09226"; // rust color
function header() {
global $site_name;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
<HEAD>
<TITLE><? echo $site_name; ?> - Tears of technology</TITLE>
<META NAME="description" CONTENT="drop.org">
<META NAME="keywords" CONTENT="drop, weblog, portal, community, news, article, announcements, stories, story, computer, science, space, hype, cult, geek, nerd, foo, bar">
<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: 8pt;}
-->
</STYLE>
</HEAD>
<BODY TEXT="#202020" BGCOLOR="#FEFEFE" BACKGROUND="themes/jeroen/images/background.gif" ALINK="#000000" LINK="#000000" VLINK="#000000">
<TABLE WIDTH="770" ALIGN="left" BORDER="0" CELLPADDING="0" CELLSPACING="6">
<TR>
<TD COLSPAN="2">
<? if (rand(0,150) == 75) $img = "logo2.gif"; else $img = "logo.gif"; ?>
<IMG SRC="themes/jeroen/images/<? echo $img; ?>" ALT="drop.org logo"><BR><BR>
</TD>
</TR>
<TR>
<TD WIDTH="160" VALIGN="top" ALIGN="right">
<?
theme_blocks("all", $this);
?>
</TD>
<TD WIDTH="430" VALIGN="top" ALIGN="left">
<?
}
function abstract($story) {
$timestamp = format_date($story->timestamp);
?>
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD ALIGN="left" VALIGN="bottom" HEIGHT="20">
<? if (rand(0,1) == 0) $img = "news1.gif"; else $img = "news3.gif"; ?>
<IMG SRC="themes/jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT="">
</TD>
<TD COLSPAN="3" ALIGN="center" VALIGN="center" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsmiddle.gif">
<B><? echo "". check_output($story->subject) .""; ?></B>
</TD>
<TD ALIGN="right" VALIGN="bottom" HEIGHT="20">
<? if (rand(0,1) == 0) $img = "news2.gif"; else $img = "news4.gif"; if (rand(0,100) == 50) $img = "news5.gif"; ?>
<IMG SRC="themes/jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT="">
</TD>
</TR>
<TR>
<TD ALIGN="left" VALIGN="bottom" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxleft.gif">
&nbsp;
</TD>
<TD COLSPAN="2" ALIGN="left" WIDTH="100%" HEIGHT="20" BACKGROUND="themes/jeroen/images/menutitle.gif">
&nbsp;
<FONT COLOR="<? echo $this->fgc2; ?>">
<?
switch (rand(0,12)) {
case 0: $how = "Yelled at us"; 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 at us"; break; case 7: $how = "Morsed"; break;
case 8: $how = "Flagged"; break; case 9: $how = "Written to us"; break;
case 10: $how = "Made up"; break; case 11: $how = "Uploaded"; break;
default: $how = "Sneaked through";
}
if ($story->userid) {
print "<FONT SIZE=\"-1\">$how by " . format_username($story->userid) . " on $timestamp</FONT>;
</TD>
<TD ALIGN=\"right\" BGCOLOR=\"#6C6C6C\" BACKGROUND=\"themes/jeroen/images/menutitle.gif\">
<B><A HREF=\"search.php?category=$story->category\"><FONT COLOR=\"<? $this->fgc3; ?>\">$story->category</FONT></A></B>&nbsp;";
}
else {
print "<FONT SIZE=\"-1\">Reported to us by $anonymous on $timestamp"; ?><? print "</FONT>
</TD>
<TD ALIGN=\"right\" WIDTH=\"65\"><A HREF=\"search.php?category=$story->category\">
<FONT COLOR=\"<? $this->fgc3; ?>\">$story->category</FONT></A>";
}
?>
</FONT>
</TD>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxright.gif">
&nbsp;
</TD>
</TR>
<TR>
<TD ALIGN="left" BACKGROUND="themes/jeroen/images/newsboxleft.gif" WIDTH="20">
&nbsp;
</TD>
<TD COLSPAN="3" ALIGN="center" VALIGN="top" WIDTH="100%" BGCOLOR="#E7E7E7" BACKGROUND="themes/jeroen/images/sketch.gif">
<TABLE WIDTH="100%">
<TR>
<TD>
<?
if ($story->updates) {
echo "<P><FONT COLOR=\"$this->hlc1\">Editor's note:</FONT> ". check_output($story->updates, 1) ."</P>";
}
if ($story->abstract) {
echo "<P>". check_output($story->abstract, 1) ."</P>";
}
?>
</TD>
</TR>
<TR>
<TD ALIGN="right">
<FONT COLOR="<? echo $this->hlc2;?>"><? echo theme_morelink($this, $story);?></FONT>
</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxright.gif">
<IMG SRC="themes/jeroen/images/newsboxright.gif" WIDTH="20" HEIGHT="20" ALT="">
</TD>
</TR>
<TR>
<TD ALIGN="left" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxbottomleft.gif">&nbsp;</TD>
<TD WIDTH="100%" COLSPAN="3" ALIGN="center" HEIGHT="20" VALIGN="top" BACKGROUND="themes/jeroen/images/newsboxbottom.gif">&nbsp;</TD>
<TD ALIGN="right" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxbottomright.gif">&nbsp;</TD>
</TR>
</TABLE>
<?
}
function article($story, $reply) {
$timestamp = format_date($story->timestamp);
?>
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20">
<? if (rand(0,1) == 0) $img = "news1.gif"; else $img = "news3.gif"; ?>
<IMG SRC="themes/jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT="">
</TD>
<TD colspan="3" ALIGN="center" VALIGN="center" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsmiddle.gif">
<IMG SRC="themes/jeroen/images/newsmiddle.gif" width="1" height="1" alt=""><B><? echo $story->subject; ?></B>
</TD>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20">
<? if (rand(0,1) == 0) $img = "news2.gif"; else $img = "news4.gif"; ?>
<IMG SRC="themes/jeroen/images/<? echo $img; ?>" WIDTH="20" HEIGHT="20" ALT="">
</TD>
</TR>
<TR>
<TD ALIGN="left" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxleft.gif" >
<IMG SRC="themes/jeroen/images/newsboxleft.gif" WIDTH="20" HEIGHT="20" alt="">
</TD>
<TD COLSPAN="2" ALIGN="left" WIDTH="100%" BGCOLOR="#6C6C6C" HEIGHT="20" BACKGROUND="themes/jeroen/images/menutitle.gif" NOWRAP>
&nbsp;
<FONT COLOR="<? echo $this->fgc2; ?>">
<?
switch (rand(0,12)) {
case 0: $how = "Yelled at us"; 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 at us"; break; case 7: $how = "Morsed"; break;
case 8: $how = "Flagged"; break; case 9: $how = "Written to us"; break;
case 10: $how = "Made up"; break; case 11: $how = "Uploaded"; break;
default: $how = "Sneaked through";
}
if ($story->userid) {
print "<FONT SIZE=\"-1\">$how by <A HREF=\"account.php?op=userinfo&uname=$story->userid\">$story->userid</A> on $story->timestamp"; ?><? print "</FONT>
</TD>
<TD ALIGN=\"right\" WIDTH=\"80\" BGOLOR=\"6C6C6C\" BACKGROUND=\"themes/jeroen/images/menutitle.gif\">
<B><A HREF=\"search.php?category=$story->category\"><FONT COLOR=\"<? $this->fgc3; ?>\">$story->category</FONT></A></B>&nbsp;";
}
else {
print "<FONT SIZE=\"-1\">Reported to us by $anonymous on $story->timestamp"; ?><? print "</FONT>
</TD>
<TD ALIGN=\"center\" WIDTH=\"80\" BGOLOR=\"6C6C6C\" BACKGROUND=\"themes/jeroen/images/menutitle.gif\">
<A HREF=\"search.php?category=$category\"><FONT COLOR=\"<? $this->fgcolor3; ?>\">$story->category</FONT></A>";
}
?>
</FONT>
</TD>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxright.gif">
<IMG SRC="themes/jeroen/images/newsboxright.gif" width="20" height="20" alt="">
</TD>
</TR>
<TR>
<TD ALIGN="left" BACKGROUND="themes/jeroen/images/newsboxleft.gif" WIDTH="20">
&nbsp;
</TD>
<TD COLSPAN="3" VALIGN="top" width="100%" BGCOLOR="#E7E7E7" BACKGROUND="themes/jeroen/images/sketch.gif">
<TABLE WIDTH="100%">
<TR>
<TD>
<?
if ($story->updates) {
echo "<P>$story->abstract</P><P><FONT COLOR=\"$this->hlcolor1\">Editor's note by <A HREF=\"account.php?op=userinfo&uname=$story->editor\">$story->editor</A>:</FONT>$story->updates</P>";
}
else {
echo $story->abstract;
}
if ($story->article)
echo "<P>". check_output($story->article) ."</P>";
?>
</TD>
</TR>
<TR>
<TD ALIGN="right">
<? echo $reply; ?>
</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="bottom" WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxright.gif">
<IMG SRC="themes/jeroen/images/newsboxright.gif" WIDTH="20" HEIGHT="20" ALT="">
</TD>
</TR>
<TR>
<TD ALIGN="left" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxbottomleft.gif">&nbsp;</TD>
<TD COLSPAN="3" ALIGN="center" HEIGHT="20" VALIGN="top" BACKGROUND="themes/jeroen/images/newsboxbottom.gif">&nbsp;</TD>
<TD ALIGN="right" VALIGN="top" WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/newsboxbottomright.gif">&nbsp;</TD>
</TR>
</TABLE>
<?
}
function control() {
print comment_controls();
}
function comment($comment, $link = "", $thread = "") {
print "<A NAME=\"$comment->cid\"></A>\n";
// Create comment header:
echo " <TABLE BORDER=\"0\" CELLPADDING=\"4\" CELLSPACING=\"2\" WIDTH=\"100%\">";
echo " <TR BGCOLOR=\"#E7E7E\" BACKGROUND=\"themes/jeroen/images/sketch.gif\">";
echo " <TD>";
echo " <TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"2\"WIDTH=\"100%\">";
// Subject:
echo " <TR>";
echo " <TD ALIGN=\"right\" WIDTH=\"5%\"><B>Subject:</B></TD><TD WIDTH=\"80%\">";
echo " <B>". check_output($subject) ."</B>";
echo " </TD>";
// Moderation:
echo " <TD ALIGN=\"right\" ROWSPAN=\"3\" VALIGN=\"middle\" WIDTH=\"15%\">";
print comment_moderation($comment);
echo " </TD>";
echo " </TR>";
// Author:
echo " <TR>";
echo " <TD ALIGN=\"right\" VALIGN=\"top\">Author:</TD><TD><B>" .format_username($comment->userid) . "</B> ";
if ($comment->userid != $anonymous) {
// Display extra information line:
if ($comment->fake_email) $info .= format_email($comment->fake_email);
if (eregi("http://",$comment->url)) $info .= " | " . format_url($comment->url);
}
echo " </TD>";
echo " </TR>";
// Date
echo " <TR><TD ALIGN=\"right\">Date:</TD><TD>". format_date($comment->timestamp) ."</TD></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 thread (if any):
if ($thread) echo " <TR><TD BGCOLOR=\"#E7E7E7\" BACKGROUND=\"themes/jeroen/images/sketch.gif\">$thread</TD></TR>";
// Print bottom link(s):
echo " <TR><TD ALIGN=\"right\" BGCOLOR=\"#E7E7E7\" BACKGROUND=\"themes/jeroen/images/sketch.gif\">[ $link ]</TD></TR>";
echo " </TABLE>";
}
function box($subject, $content, $options = "") {
if (rand(0,50) == 25) $img = "boxbottomright2.gif";
else $img = "boxbottomright1.gif";
$width = rand(10,200);
if (rand(0,100) == 50) $img2 = "boxtopleftside2.gif";
else $img2 ="boxtopleftside1.gif";
?>
<TABLE WIDTH="100%" ALIGN="center" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD HEIGHT="20" WIDTH="20"><IMG SRC="themes/jeroen/images/boxtopleft.gif"></TD>
<TD HEIGHT="20" WIDTH="<? echo $width; ?>" BACKGROUND="themes/jeroen/images/boxtop.gif">&nbsp;</TD>
<TD HEIGHT="20" WIDTH="20" BACKGROUND="themes/jeroen/images/boxtopmiddle.gif">&nbsp;</TD>
<TD HEIGHT="20" BACKGROUND="themes/jeroen/images/boxtop.gif">&nbsp;</TD>
<TD HEIGHT="20" WIDTH="20" BACKGROUND="themes/jeroen/images/boxtopright.gif">&nbsp;</TD>
</TR>
<TR>
<TD WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/<? echo $img2;?>">&nbsp;</TD>
<TD COLSPAN="3" BGCOLOR="#6C6C6C" HEIGHT="20" BACKGROUND="themes/jeroen/images/menutitle.gif">
<FONT COLOR="<? echo $this->fgc2; ?>"><? echo $subject; ?></FONT>
</TD>
<TD WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/boxtoprightside.gif">&nbsp;</TD>
</TR>
<TR>
<TD BACKGROUND="themes/jeroen/images/boxleft.gif" WIDTH="20">&nbsp;</TD>
<TD COLSPAN="3" WIDTH="100%" BGCOLOR="#E7E7E7" BACKGROUND="themes/jeroen/images/sketch.gif">
<TABLE WIDTH="100%">
<TR>
<TD>
<? echo $content; ?>
</TD>
</TR>
</TABLE>
</TD>
<TD BACKGROUND="themes/jeroen/images/boxright.gif" WIDTH="20">&nbsp;</TD>
</TR>
<TR>
<TD WIDTH="20" HEIGHT="20" BACKGROUND="themes/jeroen/images/boxbottomleft.gif">
&nbsp;
</TD>
<TD COLSPAN="3" ALIGN="center" HEIGHT="20" VALIGN="top" BACKGROUND="themes/jeroen/images/boxbottom.gif">
&nbsp;
</TD>
<TD ALIGN="right" VALIGN="top" WIDTH="20" HEIGHT="20">
<IMG SRC="themes/jeroen/images/<? echo $img; ?>" ALT="">
</TD>
</TR>
</TABLE>
<BR>
<?
}
function footer() {
?>
</TD>
<TD WIDTH="180" VALIGN="top" ALIGN="right">
<?
global $PHP_SELF;
$this->box("Drop where?", "<TD ALIGN=\"left\" VALIGN=\"top\"><A HREF=\"index.php\">home</A><BR><A HREF=\"faq.php\">faq</A><BR><A HREF=\"search.php\">search</A></TD><TD ALIGN=\"right\" VALIGN=\"top\"><A HREF=\"submit.php\">submit news</A><BR><A HREF=\"account.php\">your account</A></TD>");
theme_account($this);
?>
</TD>
</TR>
<TR>
<TD WIDTH="160 ALIGN="right" VALIGN="bottom" HEIGHT="20">
<IMG SRC="themes/jeroen/images/footerleft.gif" WIDTH="20" HEIGHT="20" ALT="">
</TD>
<TD WIDTH="100%" BACKGROUND="themes/jeroen/images/footer.gif" ALIGN="center" VALIGN="center" HEIGHT="20">
<FONT COLOR="<? echo $this->hlc2; ?>" SIZE="2">[ <A HREF="">home</A> | <A HREF="faq.php">faq</A> | <A HREF="search.php">search</A> | <A HREF="submit.php">submit news</A> | <A HREF="account.php">your account</A> ] </FONT>
</TD>
<TD WIDTH="160" ALIGN="left" VALIGN="bottom" HEIGHT="20">
<IMG SRC="themes/jeroen/images/footerright.gif" WIDTH="20" HEIGHT="20" ALT="">
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
<?
}
}
?>