178 lines
6.1 KiB
Plaintext
178 lines
6.1 KiB
Plaintext
<?php
|
|
// $Id$
|
|
|
|
class Theme_marvin extends BaseTheme {
|
|
var $link = "#666699";
|
|
|
|
// General colorset that can be used for this theme
|
|
var $foreground = "#000000";
|
|
var $background = "#eaeaea";
|
|
|
|
function system($field) {
|
|
$system["name"] = "Marvin";
|
|
$system["author"] = "Dries";
|
|
$system["description"] = "Internet explorer, Netscape, Opera";
|
|
|
|
return $system[$field];
|
|
}
|
|
|
|
function header($title = "") {
|
|
?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html>
|
|
<head>
|
|
<?php print theme_head($main); ?>
|
|
<title>
|
|
<?php
|
|
if ($title) {
|
|
print $title ." - ". variable_get("site_name", "drupal");
|
|
}
|
|
else {
|
|
print variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", "");
|
|
}
|
|
?>
|
|
</title>
|
|
<style type="text/css">
|
|
@import "themes/marvin/marvin.css";
|
|
</style>
|
|
</head>
|
|
<body<?php print theme_onload_attribute(); ?>>
|
|
<table border="0" cellpadding="8" cellspacing="0">
|
|
<tr>
|
|
<td><a href="index.php"><img src="<?php print $this->path; ?>/images/logo.png" style="border: 0px;" alt="" title="" /></a></td>
|
|
<td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" style="text-align: right;">
|
|
<small>
|
|
<?php
|
|
print $this->links(link_page());
|
|
?>
|
|
</small>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style="vertical-align: top; width: 85%;">
|
|
<?php
|
|
}
|
|
|
|
function node($node, $main = 0) {
|
|
|
|
if (module_exist("taxonomy")) {
|
|
$terms = taxonomy_link("taxonomy terms", $node);
|
|
}
|
|
|
|
print "\n<!-- node: \"$node->title\" -->\n";
|
|
print "<table cellpadding=\"0\" cellspacing=\"0\" style=\"border 0px; width: 100%;\">\n";
|
|
print " <tr><td colspan=\"2\"><img src=\"$this->path/images/drop.gif\" alt=\"\" title=\"\" /> <b>$node->title</b></td></tr>\n";
|
|
print " <tr style=\"vertical-align: bottom;\"><td colspan=\"2\" style=\"background-color: #000000; width: 100%;\"><img src=\"$this->path/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" title=\"\" /></td></tr>\n";
|
|
print " <tr><td><div style=\"color: #7c7c7c;\"><small>". t("Submitted by %a on %b", array("%a" => format_name($node), "%b" => format_date($node->created, "large"))); ?><?php print "</small></div></td><td style=\"text-align: right; vertical-align: top;\"><small>". $this->links($terms) ."</small></td></tr>\n";
|
|
print " <tr><td colspan=\"2\"> </td></tr>\n";
|
|
|
|
if ($main && $node->teaser) {
|
|
print " <tr><td colspan=\"2\"><p>$node->teaser</p></td></tr>\n";
|
|
}
|
|
else {
|
|
print " <tr><td colspan=\"2\"><p>$node->body</p></td></tr>\n";
|
|
}
|
|
|
|
print " <tr><td colspan=\"2\"> </td></tr>\n";
|
|
|
|
if ($links = link_node($node, $main)) {
|
|
print " <tr><td colspan=\"2\">". $this->links($links) ."</td></tr>\n";
|
|
}
|
|
|
|
print "</table>\n";
|
|
print "<br /><br />\n\n";
|
|
}
|
|
|
|
function comment($comment, $link = "") {
|
|
// Create comment header:
|
|
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #000000; width: 100%;\">\n";
|
|
print " <tr style=\"background-color: #000000;\">\n";
|
|
print " <td>\n";
|
|
print " <table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" style=\"width: 100%;\">\n";
|
|
print " <tr>\n";
|
|
print " <td style=\"background-color: #eaeaea;\">\n";
|
|
print " <table border=\"0\" cellpadding=\"2\" cellspacing=\"1\" style=\"width: 100%;\">\n";
|
|
print " <tr>\n";
|
|
|
|
// Subject:
|
|
print " <td style=\"text-align: right; width: 5%;\"><b>". t("Subject") .":</b></td>\n";
|
|
print " <td style=\"width: 80%;\"><b><div style=\"color: #666699;\">$comment->subject</div></b></td>\n";
|
|
|
|
print " </tr>\n";
|
|
|
|
// Author:
|
|
print " <tr>\n";
|
|
print " <td style=\"text-align: right; vertical-align: top;\">". t("Author") .":</td><td>". format_name($comment) ."</td>\n";
|
|
print " </tr>\n";
|
|
|
|
// Date
|
|
print " <tr>\n";
|
|
print " <td style=\"text-align: right;\">". t("Date") .":</td><td>". format_date($comment->timestamp) ."</td>\n";
|
|
print " </tr>\n";
|
|
|
|
print " </table>\n";
|
|
print " </td>\n";
|
|
print " </tr>\n";
|
|
|
|
// Print body of comment:
|
|
if ($comment->comment) {
|
|
print " <tr><td style=\"background-color: #ffffff;\">$comment->comment</td></tr>\n";
|
|
}
|
|
|
|
// Print bottom link(s):
|
|
print " <tr><td style=\"background-color: #eaeaea; text-align: right;\">[ $link ]</td></tr>\n";
|
|
print " </table>\n";
|
|
print " </td>\n";
|
|
print " </tr>\n";
|
|
print "</table>\n";
|
|
print "<br />\n\n";
|
|
}
|
|
|
|
function box($subject, $content, $region = "main") {
|
|
print "\n<!-- box: \"$subject\" -->\n";
|
|
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #000000; width: 100%;\">\n";
|
|
print " <tr>\n";
|
|
print " <td>\n";
|
|
print " <table border=\"0\" cellpadding=\"5\" cellspacing=\"1\" style=\"width: 100%;\">\n";
|
|
print " <tr><td style=\"background-color: #eaeaea; text-align: center;\"><div style=\"color: #404040;\"><b>$subject</b></div></td></tr>\n";
|
|
print " <tr><td style=\"background-color: #ffffff; vertical-align: top;\">$content</td></tr>\n";
|
|
print " </table>\n";
|
|
print " </td>\n";
|
|
print " </tr>\n";
|
|
print "</table>\n";
|
|
print "<br />\n\n";
|
|
}
|
|
|
|
function links($links, $delimiter = " · ") {
|
|
return implode($delimiter, $links);
|
|
}
|
|
|
|
function footer() {
|
|
?>
|
|
</td>
|
|
<td style="width: 200px; vertical-align: top;">
|
|
<?php
|
|
theme_blocks("all", $this);
|
|
?>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" style="text-align: center;">
|
|
<?php
|
|
print "<p><small>". $this->links(link_page()) ."</small></p><p>". variable_get("site_footer", "") ."</p>\n";
|
|
?>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<?php print theme_footer(); ?>
|
|
</body>
|
|
</html>
|
|
<?php
|
|
}
|
|
}
|
|
|
|
?>
|