2001-10-20 18:57:09 +00:00
|
|
|
<?php
|
|
|
|
// $Id$
|
2001-01-26 13:38:46 +00:00
|
|
|
|
2001-03-31 11:57:31 +00:00
|
|
|
/*********************************************************************
|
2001-03-31 14:58:37 +00:00
|
|
|
|
2001-03-31 11:57:31 +00:00
|
|
|
Theme: Marvin
|
|
|
|
Author: Dries Buytaert (Dries)
|
|
|
|
Email: dries@drop.org
|
|
|
|
Description: Classic theme, white, basic design with a fresh look.
|
|
|
|
Notes: Only supports blocks on the right.
|
2001-03-31 14:58:37 +00:00
|
|
|
|
2001-03-31 11:57:31 +00:00
|
|
|
*********************************************************************/
|
2001-03-31 14:58:37 +00:00
|
|
|
|
2001-06-10 13:53:44 +00:00
|
|
|
class Theme 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";
|
|
|
|
var $background = "#EAEAEA";
|
|
|
|
|
2000-12-29 11:00:56 +00:00
|
|
|
function header() {
|
2000-09-26 07:34:33 +00:00
|
|
|
?>
|
2001-06-17 18:31:25 +00:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title><?php print variable_get("site_name", "drupal") ." - ". variable_get("site_slogan", ""); ?></title>
|
2001-09-21 21:10:47 +00:00
|
|
|
<style type="text/css">
|
|
|
|
<!--
|
|
|
|
BODY { margin: 10px; font-size: 12pt; font-family: Verdana, Helvetica; }
|
|
|
|
SMALL { font-size: 10pt; }
|
|
|
|
FONT, P, TH, TD, TR, FORM, OL, UL, LI, INPUT, TEXTAREA, SELECT, A { font-size: 12pt; font-family: Verdana, Helvetica; }
|
|
|
|
-->
|
|
|
|
</style>
|
2001-06-17 18:31:25 +00:00
|
|
|
</head>
|
2001-07-14 19:02:36 +00:00
|
|
|
<body text="#000000" bgcolor="#ffffff" alink="#cccccc" link="#665566" vlink="#665566">
|
2001-06-17 18:31:25 +00:00
|
|
|
<table border="0" cellpadding="8" cellspacing="0">
|
|
|
|
<tr>
|
|
|
|
<td><a href="index.php"><img src="themes/marvin/images/logo.gif" alt="" border="0" /></a></td>
|
|
|
|
<td> </td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td align="right" colspan="2">
|
2001-08-24 15:40:24 +00:00
|
|
|
<small>
|
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-08-24 15:40:24 +00:00
|
|
|
</small>
|
2001-06-17 18:31:25 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td valign="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) {
|
2001-05-24 10:05:18 +00:00
|
|
|
print "\n<!-- node: \"$node->title\" -->\n";
|
2001-08-24 15:40:24 +00:00
|
|
|
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <tr><td colspan=\"2\"><img src=\"themes/marvin/images/drop.gif\" alt=\"\" /> <b>". check_output($node->title) ."</b></td></tr>\n";
|
2001-08-24 15:40:24 +00:00
|
|
|
print " <tr valign=\"bottom\"><td colspan=\"2\" bgcolor=\"#000000\" width=\"100%\"><img src=\"themes/marvin/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" /></td></tr>\n";
|
2001-09-16 11:33:14 +00:00
|
|
|
print " <tr><td nowrap=\"nowrap\"><font color=\"#7C7C7C\"><small>". strtr(t("Submitted by %a on %b"), array("%a" => format_name($node), "%b" => format_date($node->timestamp, "large"))); ?><?php print "</small></font></td><td align=\"right\" valign=\"top\" nowrap><small>". node_index($node) ."</small></td></tr>\n";
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <tr><td colspan=\"2\"> </td></tr>\n";
|
|
|
|
print " <tr><td colspan=\"2\"><p>". check_output($node->body, 1) ."</p></td></tr>\n";
|
2001-09-21 21:10:47 +00:00
|
|
|
print " <tr><td colspan=\"2\"> </td></tr>\n";
|
2001-06-29 22:08:57 +00:00
|
|
|
if ($main) print " <tr><td colspan=\"2\">". $this->links(link_node($node)) ."</td></tr>\n";
|
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 = "") {
|
2001-06-17 18:31:25 +00:00
|
|
|
print "<a name=\"$comment->cid\">\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2000-12-23 23:25:28 +00:00
|
|
|
// Create comment header:
|
2001-06-17 18:31:25 +00:00
|
|
|
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#000000\" width=\"100%\">\n";
|
|
|
|
print " <tr bgcolor=\"#000000\">\n";
|
|
|
|
print " <td>\n";
|
|
|
|
print " <table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"100%\">\n";
|
|
|
|
print " <tr>\n";
|
|
|
|
print " <td bgcolor=\"#eaeaea\">\n";
|
|
|
|
print " <table border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"100%\">\n";
|
|
|
|
print " <tr>\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2000-12-23 23:25:28 +00:00
|
|
|
// Subject:
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <td align=\"right\" width=\"5%\"><b>". t("Subject") .":</b></td>\n";
|
|
|
|
print " <td width=\"80%\"><b><font color=\"#666699\">". check_output($comment->subject) ."</font></b></td>\n";
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2000-12-23 23:25:28 +00:00
|
|
|
// Moderation:
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <td align=\"right\" rowspan=\"3\" valign=\"middle\" width=\"15%\">\n";
|
2001-01-20 12:20:31 +00:00
|
|
|
print comment_moderation($comment);
|
2001-06-17 18:31:25 +00:00
|
|
|
print " </td>\n";
|
|
|
|
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";
|
2001-09-16 11:33:14 +00:00
|
|
|
print " <td align=\"right\" valign=\"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";
|
|
|
|
print " <td align=\"right\">". t("Date") .":</td><td>". format_date($comment->timestamp) ."</td>\n";
|
|
|
|
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) {
|
|
|
|
print " <tr><td bgcolor=\"#FFFFFF\">". check_output($comment->comment, 1) ."</td></tr>\n";
|
|
|
|
}
|
2000-09-26 07:34:33 +00:00
|
|
|
|
2000-12-23 23:25:28 +00:00
|
|
|
// Print bottom link(s):
|
2001-06-17 18:31:25 +00:00
|
|
|
print " <tr><td align=\"right\" bgcolor=\"#EAEAEA\">[ $link ]</td></tr>\n";
|
|
|
|
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";
|
2001-06-17 18:31:25 +00:00
|
|
|
print "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#000000\" width=\"100%\">\n";
|
|
|
|
print " <tr>\n";
|
|
|
|
print " <td>\n";
|
|
|
|
print " <table border=\"0\" cellpadding=\"5\" cellspacing=\"1\" width=\"100%\">\n";
|
2001-07-14 19:02:36 +00:00
|
|
|
print " <tr><td align=\"center\" bgcolor=\"#eaeaea\" nowrap=\"nowrap\"><font color=\"#404040\"><b>$subject</b></font></td></tr>\n";
|
|
|
|
print " <tr><td bgcolor=\"#ffffff\" valign=\"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>
|
|
|
|
<td valign="top" width="200">
|
2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2001-10-07 12:27:58 +00:00
|
|
|
$this->user("all", $this);
|
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>
|
|
|
|
<td align="center" colspan="2">
|
2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2001-07-14 12:12:41 +00:00
|
|
|
print "<p><small>". $this->links(link_page()) ."</small></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>
|
|
|
|
</body>
|
|
|
|
</html>
|
2001-03-10 11:07:52 +00:00
|
|
|
<?php
|
2000-09-26 07:34:33 +00:00
|
|
|
}
|
|
|
|
}
|
2001-10-20 18:57:09 +00:00
|
|
|
|
2000-12-27 12:44:27 +00:00
|
|
|
?>
|