2001-10-20 18:57:09 +00:00
|
|
|
<?php
|
|
|
|
// $Id$
|
2001-01-26 13:38:46 +00:00
|
|
|
|
2002-02-17 13:04:50 +00:00
|
|
|
class Theme_marvin extends BaseTheme {
|
2001-02-04 22:09:38 +00:00
|
|
|
var $link = "#666699";
|
|
|
|
|
This a rather large commit that needs a lot of fine-tuning. If you
update, you'll break your site as you need switching from structure
to index.module: so this can be considered an intermediate commit.
If you upgrade, and you are welcome to, just create a collection
called "section" (for now) and assign your nodes some attributes
in the described format.
Feedback and bugreports are welcomed. Questions will be answered.
CHANGES:
- comment system:
+ when replying to a node (rather then to a comment), that
node is displayed above the reply form.
+ when replying to a comment (rather then to a node), that
comment is displayd above the reply form.
- removed structure.inc, removed structure.module.
- node.inc:
+ added 2 new node functions called 'node_attribute_edit()' and
'node_attribute_save()' used to 'hook in' any indexing system
including your home-brewed stuff if you'd want to. Currently,
index.module is the facto default index system.
See story.module for usage.
- book.module, story.module, poll.module, page.module, forum.module:
+ added preview functionality to administration section (via node
module).
+ removed all references to structure.inc (category, topic).
- moderate.module:
+ removed all references to structure.inc (category, topic).
- book.module, story.module, page.module, forum.module:
+ increased the sizes of some textareas.
- submit.php:
+ removed all references to structure.inc (category, topic).
- marvin.theme:
+ removed dead code: function story() was depricated.
- unconed.theme:
+ removed hardcoded references to drop.org.
- marvin.theme, unconed.theme, jeroen.theme, yaroon.theme, example.theme:
+ removed all references to structure.inc (category, topic).
TODO:
- file.module, trip_link.module:
+ update preview functionality:
see story.module for example.
+ remove references to 'cid' and 'tid', use 'attribute' instead:
see story.module for example.
- extend and build upon index.module as well as making it configurable
2001-06-10 15:01:20 +00:00
|
|
|
// General colorset that can be used for this theme
|
2001-06-09 19:31:34 +00:00
|
|
|
var $foreground = "#000000";
|
2003-06-16 17:09:23 +00:00
|
|
|
var $background = "#eaeaea";
|
2002-12-24 15:40:32 +00:00
|
|
|
|
2002-04-14 19:34:04 +00:00
|
|
|
function system($field) {
|
|
|
|
$system["name"] = "Marvin";
|
2002-04-14 19:59:39 +00:00
|
|
|
$system["author"] = "Dries";
|
2002-04-14 19:34:04 +00:00
|
|
|
$system["description"] = "Internet explorer, Netscape, Opera";
|
|
|
|
|
|
|
|
return $system[$field];
|
|
|
|
}
|
|
|
|
|
2001-12-15 22:31:32 +00:00
|
|
|
function header($title = "") {
|
2000-09-26 07:34:33 +00:00
|
|
|
?>
|
2001-11-25 14:40:40 +00:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2001-06-17 18:31:25 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
2002-11-09 16:24:46 +00:00
|
|
|
<?php print theme_head($main); ?>
|
2001-11-25 14:40:40 +00:00
|
|
|
<title>
|
|
|
|
<?php
|
2001-12-02 21:46:12 +00:00
|
|
|
if ($title) {
|
2001-12-16 01:28:41 +00:00
|
|
|
print $title ." - ". variable_get("site_name", "drupal");
|
2001-12-02 21:46:12 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
print variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", "");
|
|
|
|
}
|
2001-11-25 14:40:40 +00:00
|
|
|
?>
|
|
|
|
</title>
|
2001-09-21 21:10:47 +00:00
|
|
|
<style type="text/css">
|
2003-05-27 21:03:48 +00:00
|
|
|
@import "themes/marvin/marvin.css";
|
2001-09-21 21:10:47 +00:00
|
|
|
</style>
|
2001-06-17 18:31:25 +00:00
|
|
|
</head>
|
2003-06-16 17:09:23 +00:00
|
|
|
<body<?php print theme_onload_attribute(); ?>>
|
2001-06-17 18:31:25 +00:00
|
|
|
<table border="0" cellpadding="8" cellspacing="0">
|
|
|
|
<tr>
|
2003-06-16 17:09:23 +00:00
|
|
|
<td><a href="index.php"><img src="<?php print $this->path; ?>/images/logo.png" style="border: 0px;" alt="" title="" /></a></td>
|
2001-06-17 18:31:25 +00:00
|
|
|
<td> </td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2003-06-15 19:06:25 +00:00
|
|
|
<td colspan="2" style="text-align: right;">
|
2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2001-08-24 15:40:24 +00:00
|
|
|
print $this->links(link_page());
|
2001-03-02 08:14:42 +00:00
|
|
|
?>
|
2001-06-17 18:31:25 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2003-06-15 19:06:25 +00:00
|
|
|
<td style="vertical-align: top; width: 85%;">
|
2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2000-09-26 07:34:33 +00:00
|
|
|
}
|
|
|
|
|
2001-06-29 22:08:57 +00:00
|
|
|
function node($node, $main = 0) {
|
2002-05-24 21:29:33 +00:00
|
|
|
|
2003-02-09 17:39:40 +00:00
|
|
|
if (module_exist("taxonomy")) {
|
2003-08-12 20:37:16 +00:00
|
|
|
$terms = taxonomy_link("taxonomy terms", $node);
|
2002-05-24 21:29:33 +00:00
|
|
|
}
|
|
|
|
|
2001-05-24 10:05:18 +00:00
|
|
|
print "\n<!-- node: \"$node->title\" -->\n";
|
2003-06-15 19:06:25 +00:00
|
|
|
print "<table cellpadding=\"0\" cellspacing=\"0\" style=\"border 0px; width: 100%;\">\n";
|
2003-06-16 17:09:23 +00:00
|
|
|
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";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <tr><td colspan=\"2\"> </td></tr>\n";
|
2001-11-01 11:00:51 +00:00
|
|
|
|
|
|
|
if ($main && $node->teaser) {
|
2003-05-26 19:50:39 +00:00
|
|
|
print " <tr><td colspan=\"2\"><p>$node->teaser</p></td></tr>\n";
|
2001-11-01 11:00:51 +00:00
|
|
|
}
|
|
|
|
else {
|
2003-05-26 19:50:39 +00:00
|
|
|
print " <tr><td colspan=\"2\"><p>$node->body</p></td></tr>\n";
|
2001-11-01 11:00:51 +00:00
|
|
|
}
|
|
|
|
|
2001-09-21 21:10:47 +00:00
|
|
|
print " <tr><td colspan=\"2\"> </td></tr>\n";
|
2001-11-01 11:00:51 +00:00
|
|
|
|
2001-11-23 17:10:46 +00:00
|
|
|
if ($links = link_node($node, $main)) {
|
|
|
|
print " <tr><td colspan=\"2\">". $this->links($links) ."</td></tr>\n";
|
2001-11-01 11:00:51 +00:00
|
|
|
}
|
|
|
|
|
2001-06-17 18:31:25 +00:00
|
|
|
print "</table>\n";
|
|
|
|
print "<br /><br />\n\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
}
|
|
|
|
|
2001-02-27 20:58:51 +00:00
|
|
|
function comment($comment, $link = "") {
|
2000-12-23 23:25:28 +00:00
|
|
|
// Create comment header:
|
2003-06-16 17:09:23 +00:00
|
|
|
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #000000; width: 100%;\">\n";
|
|
|
|
print " <tr style=\"background-color: #000000;\">\n";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <td>\n";
|
2003-06-16 17:09:23 +00:00
|
|
|
print " <table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" style=\"width: 100%;\">\n";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <tr>\n";
|
2003-06-16 17:09:23 +00:00
|
|
|
print " <td style=\"background-color: #eaeaea;\">\n";
|
|
|
|
print " <table border=\"0\" cellpadding=\"2\" cellspacing=\"1\" style=\"width: 100%;\">\n";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <tr>\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2000-12-23 23:25:28 +00:00
|
|
|
// Subject:
|
2003-06-16 17:09:23 +00:00
|
|
|
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";
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2001-06-17 18:31:25 +00:00
|
|
|
print " </tr>\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2000-12-23 23:25:28 +00:00
|
|
|
// Author:
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <tr>\n";
|
2003-06-16 17:09:23 +00:00
|
|
|
print " <td style=\"text-align: right; vertical-align: top;\">". t("Author") .":</td><td>". format_name($comment) ."</td>\n";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " </tr>\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2000-12-23 23:25:28 +00:00
|
|
|
// Date
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <tr>\n";
|
2003-06-16 17:09:23 +00:00
|
|
|
print " <td style=\"text-align: right;\">". t("Date") .":</td><td>". format_date($comment->timestamp) ."</td>\n";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " </tr>\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2001-06-17 18:31:25 +00:00
|
|
|
print " </table>\n";
|
|
|
|
print " </td>\n";
|
|
|
|
print " </tr>\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2000-12-23 23:25:28 +00:00
|
|
|
// Print body of comment:
|
2001-06-17 18:31:25 +00:00
|
|
|
if ($comment->comment) {
|
2003-06-16 17:09:23 +00:00
|
|
|
print " <tr><td style=\"background-color: #ffffff;\">$comment->comment</td></tr>\n";
|
2001-06-17 18:31:25 +00:00
|
|
|
}
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2000-12-23 23:25:28 +00:00
|
|
|
// Print bottom link(s):
|
2003-06-16 17:09:23 +00:00
|
|
|
print " <tr><td style=\"background-color: #eaeaea; text-align: right;\">[ $link ]</td></tr>\n";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " </table>\n";
|
|
|
|
print " </td>\n";
|
|
|
|
print " </tr>\n";
|
|
|
|
print "</table>\n";
|
|
|
|
print "<br />\n\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
}
|
|
|
|
|
2001-07-14 01:01:45 +00:00
|
|
|
function box($subject, $content, $region = "main") {
|
2000-09-26 07:34:33 +00:00
|
|
|
print "\n<!-- box: \"$subject\" -->\n";
|
2003-06-16 17:09:23 +00:00
|
|
|
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color: #000000; width: 100%;\">\n";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <tr>\n";
|
|
|
|
print " <td>\n";
|
2003-06-16 17:09:23 +00:00
|
|
|
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";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " </table>\n";
|
|
|
|
print " </td>\n";
|
|
|
|
print " </tr>\n";
|
|
|
|
print "</table>\n";
|
|
|
|
print "<br />\n\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
}
|
2001-07-14 19:02:36 +00:00
|
|
|
|
2001-09-21 21:10:47 +00:00
|
|
|
function links($links, $delimiter = " · ") {
|
2001-07-14 12:12:41 +00:00
|
|
|
return implode($delimiter, $links);
|
|
|
|
}
|
2000-09-26 07:34:33 +00:00
|
|
|
|
|
|
|
function footer() {
|
|
|
|
?>
|
2001-06-17 18:31:25 +00:00
|
|
|
</td>
|
2003-06-16 17:09:23 +00:00
|
|
|
<td style="width: 200px; vertical-align: top;">
|
2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2001-01-13 16:41:35 +00:00
|
|
|
theme_blocks("all", $this);
|
2000-12-23 23:25:28 +00:00
|
|
|
?>
|
2001-09-21 21:10:47 +00:00
|
|
|
</td>
|
2001-06-17 18:31:25 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2003-06-16 17:09:23 +00:00
|
|
|
<td colspan="2" style="text-align: center;">
|
2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2003-08-23 10:11:10 +00:00
|
|
|
print "<p>". $this->links(link_page()) ."</p><p>". variable_get("site_footer", "") ."</p>\n";
|
2001-03-02 08:14:42 +00:00
|
|
|
?>
|
2001-06-17 18:31:25 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2003-04-21 13:56:09 +00:00
|
|
|
<?php print theme_footer(); ?>
|
2001-06-17 18:31:25 +00:00
|
|
|
</body>
|
|
|
|
</html>
|
2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2000-09-26 07:34:33 +00:00
|
|
|
}
|
|
|
|
}
|
2001-11-01 11:00:51 +00:00
|
|
|
|
2000-12-27 12:44:27 +00:00
|
|
|
?>
|