drupal/themes/unconed/unconed.theme

229 lines
9.5 KiB
Plaintext

<?php
// $Id$
/*********************************************************************
Theme: UnConeD
Author: Steven Wittens (UnConeD)
Email: unconed@drop.org
Description: Modern theme, gray and blue, high coolness factor.
Notes: Only supports blocks on the right.
*********************************************************************/
class Theme_unconed extends BaseTheme {
var $foreground = "#000000";
var $background = "#FFFFFF";
var $link = "#000000";
var $cl80 = "#8f9399";
var $clc0 = "#c8c8d0";
var $cl00 = "#000000";
// color set #1:
var $brcolor1 = "#000000"; // border color
var $bgcolor1 = "#B5BECE";
var $fgcolor1 = "#000000"; // table body color
var $hlcolor1 = "#000000"; // high-light color
var $sectioncolor = "#202020";
// color set #2:
var $bgcolor2 = "#EEEEEE";
var $fgcolor2 = "#000000";
// color set #3:
var $bgcolor3 = "#D7D7D7";
var $fgcolor3 = "#000000";
function system($field) {
$system["name"] = "UnConeD";
$system["author"] = "Steven Wittens";
$system["description"] = "Internet explorer, Netscape, Opera";
return $system[$field];
}
function header($title = "") {
global $base_url;
srand((double)microtime()*1000000);
?>
<HTML>
<HEAD>
<?php print theme_head($main); ?>
<TITLE><?php echo ($title ? ($title . " - ") : "") . variable_get(site_name, "drupal"); ?></TITLE>
<BASE HREF="<?php echo "$base_url/"; ?>" />
<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>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="<?php print $this->clc0; ?>" ALINK="#000000" LINK="#404040" VLINK="#404040" MARGINHEIGHT="10" MARGINWIDTH="10"<?php print theme_onload_attribute(); ?>>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" ALIGN="CENTER" WIDTH="100%">
<TR><TD BGCOLOR="<?php print $this->cl00; ?>"><IMG SRC="<?php print $this->path; ?>/images/null.gif" WIDTH="10"></TD><TD BGCOLOR="<?php print $this->clc0; ?>"><IMG SRC="<?php print $this->path; ?>/images/null.gif" WIDTH="4"></TD>
<TD BGCOLOR="<?php print $this->cl80; ?>">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="9" BGCOLOR="<?php print $this->cl80; ?>">
<TR>
<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="<?php print $this->path; ?>/images/logo.png" ALT="logo"></TD></TR></TABLE></TD></TR></TABLE>
</TD>
</TR>
<TR>
<TD COLSPAN="2" ALIGN="CENTER">
<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>
</TD>
</TR>
<TR><TD COLSPAN="2"><?php
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=\"" . $this->path . "/images/null.gif\" WIDTH=\"2\" HEIGHT=\"2\"></FONT></TD></TR>";
print "</TABLE>";
print "</TD></TR></TABLE>";
?></TD></TR>
<TR>
<TD VALIGN="top" WIDTH="80%">
<?php
}
function node($node, $main = 0) {
print "\n<!-- node: \"$node->title\" -->\n";
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
<TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%">
<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 "$node->title"; ?></B></FONT></td><td valign="middle" align="center"><IMG SRC="<?php print $this->path; ?>/images/icon.gif" valign="middle"></td></tr></table></TD></TR>
<TR BGCOLOR="<?php echo $this->bgcolor2; ?>">
<?php
if (module_exist("taxonomy")) {
$terms = taxonomy_link("taxonomy terms", $node);
}
$taxo = $this->links($terms);
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>";
?>
</TD>
</TR>
<TR BGCOLOR="<?php echo $this->bgcolor2; ?>">
<TD BGCOLOR="<?php echo $this->bgcolor2 ?>" COLSPAN="2">
<?php
if ($main && $node->teaser) {
echo "<P>". check_output($node->teaser) ."</P>";
}
else {
echo "<P>". check_output($node->body) ."</P>";
}
?>
</TD>
</TR>
<?php
if ($links = link_node($node, $main)) {
echo "<TR BGCOLOR=\"". $this->bgcolor3 ."\"><TD BGCOLOR=\"". $this->bgcolor3 ."\" ALIGN=\"right\" COLSPAN=\"2\">[ ". $this->links($links) ." ]</TD></TR>";
}
?>
</TABLE></TD></TR></TABLE><BR>
<?php
}
function comment($comment, $link) {
print "\n<!-- Comment: \"$comment->subject\" by $comment->name -->\n";
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
<?php
// Create comment header:
echo "<TABLE BORDER=\"0\" CELLPADDING=\"4\" CELLSPACING=\"1\" WIDTH=\"100%\">";
echo " <TR BGCOLOR=\"$this->bgcolor1\">";
echo " <TD BGCOLOR=\"$this->bgcolor1\">";
echo " <TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"1\" WIDTH=\"100%\">";
// Subject:
echo " <TR>";
echo " <TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"5%\"><FONT COLOR=\"$this->hlcolor1\"><B>" . t("Subject") . ":</B></FONT></TD><TD WIDTH=\"80%\">";
echo " <B><FONT COLOR=\"$this->fgcolor1\">$comment->subject</FONT></B>";
echo " </TD>";
echo " </TR>";
// Author:
echo " <TR>";
echo " <TD ALIGN=\"right\" VALIGN=\"top\">" . t("Author") . ":</TD><TD><B>" . format_name($comment) . "</B> ";
echo " </TD>";
echo " </TR>";
// Date
echo " <TR><TD ALIGN=\"right\">" . t("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=\"$this->bgcolor2\">". check_output($comment->comment) ."</TD></TR>";
// Print bottom link(s):
echo " <TR><TD ALIGN=\"right\" BGCOLOR=\"$this->bgcolor3\">[ $link ]</TD></TR>";
echo " </TABLE>";
?></TD></TR></TABLE><BR><?php
}
function box($subject, $content, $region = "main") {
?>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="<?php echo $this->brcolor1; ?>" WIDTH="100%">
<TR><TD>
<?php
print "<TABLE BORDER=\"0\" CELLPADDING=\"3\" CELLSPACING=\"1\" WIDTH=\"100%\">";
print " <TR><TD ALIGN=\"center\" BGCOLOR=\"$this->bgcolor1\"><FONT COLOR=\"$this->fgcolor1\"><B>$subject</B></FONT></TD></TR>";
print " <TR><TD BGCOLOR=\"$this->bgcolor2\">$content</TD></TR>";
print "</TABLE>";
?>
</TD></TR>
</TABLE><BR>
<?php
}
function footer() {
?>
</TD>
<TD VALIGN="top" WIDTH="20%">
<?php
theme_blocks("all", $this);
?>
</TD>
</TR>
<TR><TD COLSPAN="2"><?php
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=\"" . $this->path . "/images/null.gif\" WIDTH=\"2\" HEIGHT=\"2\"></FONT></TD></TR>";
print "</TABLE>";
print "</TD></TR></TABLE>";
?></TD></TR>
<TR>
<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; ?>"><?php print $this->links(link_page()); ?></TD></TR></TABLE></TD></TR></TABLE>
</TD>
</TR>
</TABLE>
</TD><TD BGCOLOR="<?php print $this->clc0; ?>"><IMG SRC="<?php print $this->path; ?>/images/null.gif" WIDTH="4"></TD><TD BGCOLOR="<?php print $this->cl00; ?>"><IMG SRC="<?php print $this->path; ?>/images/null.gif" WIDTH="10"></TD></TR>
</TABLE>
<?php print theme_footer(); ?>
</BODY>
</HTML>
<?php
}
}
?>